Python script to do simple task

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • necronn99
    New Member
    • Aug 2008
    • 1

    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(use r)

    grrr

    Details:

    It writes the file but only last entry

    Please any help would be much appreciated.

    Back to the problem
  • kaarthikeyapreyan
    New Member
    • Apr 2007
    • 106

    #2
    Open the file using append mode I think u must have used the write mode ... this could be one possible issue.

    Comment

    Working...