Search the web
Sign In
New User? Sign Up
PhillyPug · Python Users Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Best practices? Tools?   Message List  
Reply | Forward Message #276 of 364 |
Re: [PhillyPug] Best practices? Tools?

On Fri, Jun 6, 2008 at 10:57 AM, Kyle R. Burton <kyle.burton@...> wrote:
> I'm entirely new to Python at this point. I realize that I can Google
> to find specific items that address or answer my questions below, what
> I'm looking for is feedback based on first hand experiences, lessons
> you've learned etc (which isn't always discernible from the web).

Of course.

> E.g. for Perl, always use strict and warnings, it's worth the effort
> if stability and robustness are important.
> Does anyone have advice or best practices to follow for Python with respect
> to:
>
> - organizing projects, source, etc
> - developing, installing, finding libraries (Perl has CPAN, Java has
> Jars, Ruby has Gems)

Newer Pythons have eggs, but that's unlikely to help you with Jython
at this point. I'm unfamiliar
with Jython, but I assume that you'll be using the "old" system of
installing packages through the
distributed 'setup.py' file.

PyPi (CheeseShop) is the place to go for packages, though again, I'm
guessing that most of the
packages there will be of limited use for Jython.

http://pypi.python.org/pypi/


> - building or running (Perl has Makefile.PL, Ruby has Rake, Java has
> Ant and Maven)

See setup.py, it does bytecompiling and installation.

> - development tools, such as:
>
> - unit testing framework (eg: JUnit)

Batteries included. There are unittesting frameworks included in the
standard Python distribution. I know for certain
that the `doctest` module was included in 2.2
(http://www.python.org/doc/2.2.3/lib/module-doctest.html)

Doctest is interesting, because it actually acts as documention for
how to use the function or class. Python has
doctrings much like common lisp that are accessible through the
__doc__ property. (e.g. foo.__doc__)

Tthere's also `unittest`
(http://www.python.org/doc/2.2.3/lib/module-unittest.html)

> - a coverage analysis tool (eg: Devel::Cover for Perl)
>
> - debugger, profiler, etc

Python comes with a debugger, pdb. Some interesting things about it is
that you can fall into it interactively just by importing the module.
So, when you're testing something in your file, it throws an
exception, bam. import pdb followed by pdb.pm() and you're there.

I haven't looked at all about profilers, as I've never written
anything of critical value that has warranted speed increases.


> - recommended IDE or Editor (I'm an Emacs guy, but many of our devs
> are Eclipse experts) - or modules for existing editors

Emacs22 comes with python-mode.el, which allows interactive
programming through Emacs. I can't recommend any other IDEs, though I
know lots exist. cPython comes with IDLE, which more people than I
thought actually like and use.

> - does Python have an equivalent to Javadoc / POD for embedded
> documentation?

Docstrings and `pydoc` will probably suffice, and should already be
available, though I'm sure there are many others.

--
Andrew Gwozdziewycz
apgwoz@...
http://www.apgwoz.com | http://www.photub.com



Fri Jun 6, 2008 3:19 pm

jyrixx
Offline Offline
Send Email Send Email

Forward
Message #276 of 364 |
Expand Messages Author Sort by Date

I'm entirely new to Python at this point. I realize that I can Google to find specific items that address or answer my questions below, what I'm looking for...
Kyle R. Burton
kylerburton
Offline Send Email
Jun 6, 2008
2:57 pm

... A good place to start might be here: http://ivory.idyll.org/articles/advanced-swc/ It covers a lot of the issues you're asking about. If you have specific...
Kevin Hill
khill3210
Offline Send Email
Jun 6, 2008
3:14 pm

... This looks good, but I think a lot of the content is for Python > 2.2... -- Andrew Gwozdziewycz apgwoz@... http://www.apgwoz.com |...
Andrew Gwozdziewycz
jyrixx
Offline Send Email
Jun 6, 2008
3:22 pm

man they were very useful, thanks!! ... From: Kevin Hill &lt;khill@...&gt; Subject: Re: [PhillyPug] Best practices? Tools? To: PhillyPug@yahoogroups.com ...
David Etkins
detkins
Offline Send Email
Jun 6, 2008
4:05 pm

... Of course. ... Newer Pythons have eggs, but that's unlikely to help you with Jython at this point. I'm unfamiliar with Jython, but I assume that you'll be...
Andrew Gwozdziewycz
jyrixx
Offline Send Email
Jun 6, 2008
3:19 pm

i am using drpython, but i hate using an ide &nbsp; i think an ide is for wimps.. &nbsp; simple text editor like the crimson editor or winvi32 will be your...
David Etkins
detkins
Offline Send Email
Jun 6, 2008
4:08 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help