[CODE] - Python Newcomer Starting with Coding
Where can I find practical coding examples for real life coding problems? Something like a categorized solution guide? - My current problem: * create a folder * seems to be: os.mkdir(path) * obtain the path of a python package * copy the content of the package folder to the created folder alternatively (which would possibly preserve the file-attributes) * obtain the path of a python package * copy the content of the package folder to the destination folder, whlist giving a new name. I've looked in the Python 2.4 documentation, but the resulting possibilities are too much. Any suggestions welcome. . -- http://lazaridis.com -- http://mail.python.org/mailman/listinfo/python-list
Re: [CODE] - Python Newcomer Starting with Coding
Ilias Lazaridis wrote: Where can I find practical coding examples for real life coding problems? Probably in real life code ?-) Something like a categorized solution guide? Look for the Python cookbook (google is your friend). - My current problem: * create a folder * seems to be: os.mkdir(path) I wouldn't even count this as a coding problem, except perhaps for a total CS newbie. * obtain the path of a python package import package print package.__file__ * copy the content of the package folder to the created folder import shutil help(shutil.copytree) (snip) I've looked in the Python 2.4 documentation, but the resulting possibilities are too much. ??? -- bruno desthuilliers python -c print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')]) -- http://mail.python.org/mailman/listinfo/python-list
Re: [CODE] - Python Newcomer Starting with Coding
On 21/03/06, Ilias Lazaridis [EMAIL PROTECTED] wrote: Where can I find practical coding examples for real life coding problems? Something like a categorized solution guide? This sounds quite a lot like PLEAC. It certainly contains a lot that you would find useful. http://pleac.sourceforge.net/pleac_python/index.html Also, try using the python-tutor list. It's a lot more helpful for questions like these. My current problem: * create a folder * seems to be: os.mkdir(path) Try using the Path module. It makes all that stuff much easier: http://www.jorendorff.com/articles/python/path/ Ed -- http://mail.python.org/mailman/listinfo/python-list
Re: [CODE] - Python Newcomer Starting with Coding
bruno at modulix wrote: Ilias Lazaridis wrote: Where can I find practical coding examples for real life coding problems? Probably in real life code ?-) Something like a categorized solution guide? Look for the Python cookbook (google is your friend). ... http://www.oreilly.com/catalog/pythoncook/ sorry, I've not clarified that I mean an free internet resource. * copy the content of the package folder to the created folder import shutil help(shutil.copytree) ... this one was helpfull. thanks a lot. . -- http://lazaridis.com -- http://mail.python.org/mailman/listinfo/python-list
Re: [CODE] - Python Newcomer Starting with Coding
Ed Singleton wrote: On 21/03/06, Ilias Lazaridis [EMAIL PROTECTED] wrote: Where can I find practical coding examples for real life coding problems? Something like a categorized solution guide? This sounds quite a lot like PLEAC. It certainly contains a lot that you would find useful. http://pleac.sourceforge.net/pleac_python/index.html yes, this looks like the resource I was looking for. Also, try using the python-tutor list. It's a lot more helpful for questions like these. I've subscribed via gmane's nntp: news://news.gmane.org:119/gmane.comp.python.tutor will take a close look to this list. My current problem: * create a folder * seems to be: os.mkdir(path) Try using the Path module. It makes all that stuff much easier: http://www.jorendorff.com/articles/python/path/ looks very intresting. for now I am limited to the standard library. but I will for sure take a deeper look in near future. . -- http://lazaridis.com -- http://mail.python.org/mailman/listinfo/python-list
Re: [CODE] - Python Newcomer Starting with Coding
On Tue, 21 Mar 2006 20:05:48 +0200 in comp.lang.python, Ilias Lazaridis [EMAIL PROTECTED] wrote: bruno at modulix wrote: [...] Look for the Python cookbook (google is your friend). ... http://www.oreilly.com/catalog/pythoncook/ sorry, I've not clarified that I mean an free internet resource. Try the first hit from google rather than the third. http://aspn.activestate.com/ASPN/Python/Cookbook/ Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list