Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

code review

0 views
Skip to first unread message

Zubin Mithra

unread,
Dec 23, 2009, 7:02:24 AM12/23/09
to pytho...@python.org
Hello,

I`m pretty new to developing applications using python and i would
like advance on this script i recently created which helps linux
programmers on the linux terminal. The code is very simple to
understand(i hope) and serves a simple purpose; however i am not sure
if my way of scripting is the right "pythonic" way of doing it.

The package can be found at www.code.google.com/p/pyautorun

I`d love any feedback, ideas and criticism after a code review. Thank
you in advance.

cheers!!!
Zubin Mithra

Jean-Michel Pichavant

unread,
Dec 23, 2009, 7:16:54 AM12/23/09
to Zubin Mithra, pytho...@python.org
Regarding the fact this code will serve personal purpose, the code is
pretty much satisfying.

JM

Lie Ryan

unread,
Dec 23, 2009, 9:20:34 AM12/23/09
to


- you should look at os.path.exists(), os.path.splitext()
- try to use %-interpolation or .format(); the code would look much
nicer and much more readable. Tips: store the format string in the dict;
then you can just do something like fmt % {'infile': infile, 'outfile':
outfile}
- don't put comments on the right of the code; its ugly. Move it above
the code being described.

PS: it's extension not extention

0 new messages