Use list name as string

Discussion in 'Python' started by Vincent Davis, Feb 4, 2009.

  1. Do to laking knowledge my google searches have not turned up an answer for me.
    I know this is wrong it uses the items in the list as the filename,
    how do I refer to the dataname and not the items in it.

    def savedata(dataname):
    filename = str(dataname) # this does not do what I would like it to
    ext1 = '\.csv'
    flex = filename + ext1
    datawrite = csv.writer(open(flex, "wb"))
    datawrite.writerows(dataname)


    Thanks
    Vincent Davis
    Vincent Davis, Feb 4, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?iso-8859-1?B?bW9vcJk=?=
    Replies:
    7
    Views:
    817
    Roedy Green
    Jan 2, 2006
  2. ding feng
    Replies:
    2
    Views:
    2,801
    ding feng
    Jun 25, 2003
  3. Bobby Chamness
    Replies:
    2
    Views:
    2,388
    Joe Smith
    Apr 22, 2007
  4. Jack-2
    Replies:
    3
    Views:
    262
    Jack-2
    Dec 24, 2003
  5. Java  script  Dude

    IE name="name" & form.name property bug

    Java script Dude, Jun 29, 2004, in forum: Javascript
    Replies:
    5
    Views:
    237
    Java script Dude
    Jun 30, 2004
Loading...

Share This Page