On 02/02/16 17:46, Chelsea G wrote:

> ...but then in the def json_output instead of having the
> filename which i have now is 'test.txt' I want to have weekly_20160102.txt
> same naming convention as the csv file i am inputting. 

Take a look at the os.path module documentation.
There are several functions for manipulating
filenames including splitting and joining
the various constituent parts (basename,
extension, path etc).

You might decide to use os.rename() too.

hth
-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to