473,387 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Python script to do simple task

Guys / gals.. Please help me on this..

I have been going crazy to such a simple thing i can do in perl but this needs to be done in python.

I need a script that basically can list out the users (from a call to a server using an API ), the call and login is working great however i can only stdout the list help:: When the list is given the using:

print user

Works great i see

bill
tony
ben
so
phil

Now when i try to write this ..

I get:

phil


WTH.. lol ..

I have tried write(user) i have tried writelines(user) i have tried user.append(user)

grrr

Details:

It writes the file but only last entry

Please any help would be much appreciated.

Back to the problem
Aug 7 '08 #1
1 1276
Open the file using append mode I think u must have used the write mode ... this could be one possible issue.
Aug 7 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
13
by: Peter Mutsaers | last post by:
Hello, Up to now I mostly wrote simple filter scripts in Perl, e.g. while(<>) { # do something with $_, regexp matching, replacements etc. print; } Now I learned Python and like it much...
0
by: O'Neal Computer Programmer | last post by:
*** First of all, if there is a previous post on Temple of Elemental Evil, please provide a link to that/them so in order to create a larger resource on this game. Thanks! (Merci) ;-) *** Temple...
4
by: Paddy McCarthy | last post by:
This is really a comment on "Python in Systems Administration: Part I -- Better Scripting" http://www.samag.com/documents/s=8964/sam0312a/0312a.htm by Cameron Laird. Reading the article,...
1
by: Carlos Andrade | last post by:
I have a working python script that takes in content from a form, cleans it up, adds html formatting and then places it into my index.html page on my server. When I had index.html set up as :...
15
by: Qopit | last post by:
I'm setting up a system that consists of several small python applications that all communicate amongst each other on the same pc. When running in Windows, launching each application generates a...
16
by: diffuser78 | last post by:
I want to write a python program and call OS specific commands in it. So basically, instead of typing in on the command line argument I want to have it in a python program and let it do the action....
15
by: kyosohma | last post by:
Hi, I am trying to get a small group of volunteers together to create Windows binaries for any Python extension developer that needs them, much like the package/extension builders who volunteer...
2
by: korean_dave | last post by:
Does anyone know how to properly kick off a script using Windows Scheduled Task? The script calls other python modules within itself. HERE'S THE CATCH: I am used to running the script directly...
0
by: Andreas Tawn | last post by:
Does anyone know how to properly kick off a script using Windows Import os and add os.system("pause") at the end of AutomatedTestRun.py to keep cmd open. As far as not seeing any output, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.