Slashdot Mirror


Python Development Environments?

baxissimo asks: "I've played around with Python a bit, and as a scripting language I quite like it. So I sat down the other day to see if I could use it to make a modest OpenGL/GUI application on Windows. The short story is I gave up. I couldn't get the Python IDE I had to run--but that didn't stop me. At first I just shrugged my shoulders and said to myself 'Ah, who needs it? I've got emacs,' and then proceeded to waste a few hours trying to cobble together an app that would run before it dawned on me that Python without a decent IDE is definitely not easier to use than C++ with an IDE. So is anyone out there actually using Python to make serious apps? What tools are you using?" "I've heard the wxPython bindings are nice for the GUI bits, so I downloaded those, and pyOpenGL, and numPy, and PIL, etc. The only recommendation I really saw anywhere for an IDE was for boaConstructor, so I got that. Unfortunately it only spit out a useless error messages on startup and died. What I'd really like to start doing is creating C++/Python hybrids, but given that I was unable to successfully debug a pure Python app, I'm wondering what it's going to be like when my bugs might be in either language. How do people deal with this? What tools help you get the job done? If there's nothing free that works, are there any commercial IDE's worth the money?"

5 of 87 comments (clear)

  1. Options by Fished · · Score: 5, Informative
    There are several options out there that you may not have tried: Not all of these provide any tools for graphical development, so you'll need to look to see which meets your needs. One other option might be to use Jython and swing/awt/swt.
    --
    "He who would learn astronomy, and other recondite arts, let him go elsewhere. " -- John Calvin, commenting on Genesis 1
    1. Re:Options by UberChuckie · · Score: 4, Informative

      There is also a Python plugin for Eclipse, a popular Java IDE.

  2. Excluding bugs that is by madmaxx · · Score: 5, Insightful

    So C++ is easier than Python without an IDE?

    I think you might be missing out on some of the most important features of Python (or any decent scripting language these days): it's a high level lanugage, intended to be easier to use than lower-level languages like C/C++. Whining about a lack of GUIs is besides the point.

    Once you know Python, and understand some of the GUI toolkits, it's far more productive than C/C++ with similar toolkits. So is Perl, Java, or C# for that matter. It sounds like you don't know Python and related GUI toolkits very well yet, though, which is one place where an IDE can be used to limp along for a while.

    In case you haven't noticed, an IDE is really a simple set of tools, which exist for nearly every language already -- though not always packaged together. Get over it: your best toolkits won't come in one package, ever. Any good craftsman will learn to piece together a master's toolkit for any problem set, and use those tools when/where appropriate. IDEs, in general, are the Walmart AllInOne toolkit. Okay if you don't know any better, and the problems are small, but not often suited for anything of scale. Think I'm being a twit? How many IDEs are used in production build environments? (Hint: none)

    So back to your baseless productivity point: Python is more productive, in general, than C/C++. This includes GUI work without an IDE, and a lot of server problems that are usually mashed into using C/C++. Why? The language (and libraries) focus on ease of use ... and are not encumbered by aspects of the underlying hardware leaking through the abstractions. Things like direct memory access, pointers, and references have their place, but are the root of a large amount of debugging time. GUIs in the lower-level languages waste a lot of time with low-level bugs (though there is a chance that performance will be better).

    GUI work without a GUI builder you say? If it's too tedious for you, then automate it (Python happens to be really handy for that). Most GUIs are built around schemas or specifications anyways -- using a GUI builder only speeds up the tedium (it doesn't solve it). And you'll want to know the GUI toolkit well enough to automate with it anyway (using it in ignorance with a GUI builder is buggy in itself). Don't get me wrong, there are some great GUI builders for Python, but don't rely on it to save you from learning something.

    One of the best IDEs I've found (and I've used a lot of IDEs) is the OS, and tangent language tools themselves. For Perl, I use Vi, Gedit, or Textpad for my editor, GladeXML or perl scripts to generate UIs, bash/MakeMaker for my build system, and the other Unix tools to fill in the gaps. I've used some of the Perl IDEs in production environments, and they're all limited somewhere. Don't settle for one tool, as your tools contribute to the quality/quantity of what you produce. You can be in control.

    --
    mx
  3. A few options by The+Bungi · · Score: 4, Informative
    Komodo
    Wing IDE

    Now, you mention you had trouble with boa. You're going to want to get it working unless you want to spend some money, because for $0.00 that's as good as it's going to get. Otherwise the two above are good investments. IIRC Komodo has a free version, but I'm not sure. PythonWorks had great potential but it's not being developed any more. It only supported Tkinter anyway.

    That's as far as GUI designer support. If you're not having any luck you might want to try wxWorkshop. I've heard some people have luck embedding their dialogs in C++ libraries and binding them to Python programs. YMMV.

    If all you want is a good Python editor with debugger support there are a bunch of them out there:

    http://drpython.sourceforge.net
    http://pype.sourceforge.net/ (more mature)

    Personally the best Python-specialized editor I've used is IDLE, though it has no GUI capabilities. IDLE ships with the full Python distribution for Linux and Windows, and it behaves essentially the same in both platforms.

    You might also want to check this article out. And of course, the clearing house.

  4. boaConstructor Rocks by Coventry · · Score: 4, Interesting

    But for most day-to-day stuff I use SciTE for my Python/Jython development.

    That said, the wx toolkit and boaConstructor are _very_ powerful. Have you sent your 'meaningless error message' to anyone on the boaConstructor lists to get feedback? I'm pretty sure the error means something to someone - heck, even _I_ might know what the problem is.

    Honestly, and I'm not trying to be a troll here, how do you get anything done as a developer if you give up every time you get an error message? I'm not saying that you should have to debug everyone else's code as a part of day-to-day work, but if you just give up on something (boaConstructor) without Googling for an answer or consulting others or just digging in, then that doesn't bode well for what you'll do when you encounter a bug of your own creation. boaConstructor is used by a lot of people, and is under active development - if everyone got the 'meaningless error message' you got when they installed it, then either no one would use it, or it would already of been fixed. The most likely causes for your problem are:

    A) You checked out a bad build from CVS (Get another)
    B) You don't have the prerequisites installed correctly, or you installed boaConstructor incorrectly
    C) Your Path is messed up (this will affect any/all dev projects - if a library or file cant be found, errors will happen)
    D) Invalid permissions
    E) Version conflicts (You could be on an old redhat box with Python 1.5.2, and boaConstructor needs a newer version, for example).

    Instead of bothering slashdot with this issue, why didn't you post to the python list and/or the boaConstructor list? I'm sure that with the proper info people will be able to solve your problem.

    --
    man is machine