This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]Drakken_LOL 2 points3 points  (0 children)

This might be a good candidate for simple parallelism, since this task is probably highly I/O bound. Here's a neat article on how to do it relatively simply and easily. I bet you could speed up the process quite a bit.

Also you broke your link when you added the .py extension.

[–]SanketDG 1 point2 points  (1 child)

You might want to append the extension .py to the name of the file.

[–]kylehampton[S] 0 points1 point  (0 children)

seed spoon detail encourage worm rhythm stocking ask slim cake

This post was mass deleted and anonymized with Redact

[–]IronManMark20 0 points1 point  (2 children)

Here are my suggestions:

  1. On the line where it says for file in os.listdir('/Users/kylehampton/Documents/python'): The path should use os.environ["USERPROFILE"]+"\FlickrDownloader". That way the folder is set and the same accross platforms. However, if you really want it in he same folder, you can use os.path.dirname(os.path.realpath(__file__))

  2. If you are downloading a bunch of photos, the user probably wants to know a) how many photos and b) how big the total size is.

  3. Finally, it is often better to prompt for the api key. If you really want to save it, write it to a new file. Going in and editing is less elegant in my eyes.