Use list name as string
Gary Herron
gherron at islandtraining.com
Wed Feb 4 11:35:32 EST 2009
Vincent Davis wrote:
> 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)
>
>
I need more information to answer this question -- because I have no
idea what the question means.
SO:
What is dataname?
What would you like filename to be after that line.
One example of dataname and the desired filename is probably enough to
answer your question.
> Thanks
> Vincent Davis
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list