by CyberFonic · 16y ago · 0 comments
I too had similar problems getting a hang of Python. "Dive into Python" was a help. But once it 'clicked' it became hard to write anything that didn't work. One thing that I still marvel is at, that you can often just make a guess and it works! The collection of 'batteries' is very useful. Typing help(some_function_or_class) at the command prompt is often very useful.
NB: if you are writing for Windows and Linux and OS/X, then you should use the functions in os.path module to avoid hard coding the directory and filename conventions.
This was a one-off for that particular task, so no cross platform writing, but I'm certainly use os.path in the future. Thanks for that!