Skip to main content
gamedev.net
🔒 Locked

[web] Python tools for web development

Started by kindjie Sep 22, 2010 at 2:39 PM 10 replies 2.8k views
Original Post
kindjie
kindjie
Hi,

Quick intro - I'm an experienced C++ developer who recently switched from console development to web based development. I've gone from MS Visual Studio to Notepad++ and Adobe Flash Builder using Flex 4. I'm targeting Google App Engine using Python 2.5.5 and Django non-rel.

My question: What tools do Python developers use for writing code, refactoring, debugging, profiling, testing, etc.? Does anyone have a workflow they're particularly proud of?

I'll give you an example of a task that I'd like to make simpler: I have a bunch of code I received from another developer, and it's poorly organized with confusing names. I'd like to move the .py files into folders (they're all stuffed into one), rename some of them, and delete some of them outright. My problem is that I have to do all this essentially by hand, then I have to actually run through everything to see if something breaks! Obviously I'm missing something. :P

CPU and memory consumption isn't that big a concern - I'm on a relatively beefy machine (i.e. the Eclipse-based Flash Builder actually feels snappy!).

Thanks!
[size="1"]Try GardenMind by Inspirado Games !
All feedback welcome.
[s]
[/s] [size="1"]Twitter: [twitter]Owen_Inspirado[/twitter]
Facebook: Owen Wiggins [size="1"]Goog
Kylotan
Kylotan
I currently just use Notepad++ for Python. I'm not recommending it, but most of the editors and IDEs I try are bugged, bloated, slow, or some permutation of the three. And that's just for writing code; I don't recall seeing much in the way of debugging or profiling support in most of them, never mind refactoring or testing.

(Bear in mind that Python is difficult to automatically refactor due to its dynamic nature. You can't easily guarantee to catch all references to a given identifier, nor can you easily ensure that all the references you did find actually refer to the identifier in question.)

Hopefully someone will have some good suggestions for an IDE or workflow as I could certainly do with an improvement in this area too.
Ezbez
Ezbez
Vim is well suited to Python for the more adventurous.
Sander
Sander
There's an enhanced Python CLI out there for easy run-time debugging and other features. I can't find it right now though, but it's similar to pydbgr but mor extensive.

Someone should really build a SLIME-like environment for Python.
kindjie
kindjie
So I'm not completely on the wrong track with just using a text editor? That's too bad - Python's great, and I can just imagine the amazing tools that could be built for it with all the information available at runtime. In the meanwhile, I guess I'll just keep trying stuff out in the interpreter when I get stuck, and coding in a regular text editor. :P Maybe I'll give Vim another shot.

Thanks everyone!
[size="1"]Try GardenMind by Inspirado Games !
All feedback welcome.
[s]
[/s] [size="1"]Twitter: [twitter]Owen_Inspirado[/twitter]
Facebook: Owen Wiggins [size="1"]Goog
kindjie
kindjie
Quote:
Original post by Kylotan
Now for a more helpful response than my last one.

See:
InfoWorld review: Nine fine Python development tools
Python editors @ wiki.python.org

I'm also hearing positive things about PyCharm at the moment.


Wow. If PyCharm does half of what it says on their site, it'd be worth way more than their full price to me. Great find. Downloading their trial now...
[size="1"]Try GardenMind by Inspirado Games !
All feedback welcome.
[s]
[/s] [size="1"]Twitter: [twitter]Owen_Inspirado[/twitter]
Facebook: Owen Wiggins [size="1"]Goog
Kylotan
Kylotan
Let us know how you get on! I'm currently using NetBeans with the Python add-ins and that seems pretty good for my needs, although the debugger doesn't work...
kindjie
kindjie
Quote:
Original post by Kylotan
Let us know how you get on! I'm currently using NetBeans with the Python add-ins and that seems pretty good for my needs, although the debugger doesn't work...


Ok. So it's still in beta and I've had a few issues crop up, but I honestly feel like I couldn't live without it now.

It took me about 10 minutes to have it hook up to my Google App Engine/Django Non-Rel project. It runs a local GAE server for me, and I can set breakpoints and have them hit while debugging from within Flash Builder. Things like basic types, lists, and dictionaries you can inspect in the debugger, but it has issues with some classes.

Without exaggerating - the jump from text editor to a proper IDE with graphical debugger is massive. I've saved hours. I can start up my Flash Builder project and set a breakpoint on the client-side callback of an RPC as well as on the server-side and see exactly where something is going wrong.

If that was all I'd be ecstatic, but it also understands that I'm using Django and even shows errors and suggestions while I'm editing Django templates. This is a huge help to me as I'm still finding my way around the framework.

I did post on Facebook and Twitter about it, and had a few people suggest Wingware Python IDE: Wingware Products. I probably won't try it out since I'm pressed for time and PyCharm is working so well, but you might want to check that out as well.

I haven't used NetBeans with Python so I can't comment on how they compare. I also can't really comment on the performance of PyCharm since my machine is quite powerful, but I've had no issues with that and the beta version is surprisingly solid.

Sincerely thank you for your suggestion!

Edit: One thing I forgot to mention that might trip up some people - if you're using the Google App Engine Launcher to run a local server, you'll have to put it on a different port or stop it since it will mess up the PyCharm one.

I've also yet to get around to actually doing a significant chunk of refactoring. That'll probably have to wait until next week.
[size="1"]Try GardenMind by Inspirado Games !
All feedback welcome.
[s]
[/s] [size="1"]Twitter: [twitter]Owen_Inspirado[/twitter]
Facebook: Owen Wiggins [size="1"]Goog
LarryWP
LarryWP
Have you tried the Wing IDE? Here is the link for it:
http://www.wingware.com/
I have use it for about a year and a half and it is well supported with continual patches. It's not free and there is a trial download. It's very stable and with all the stupid things I have thrown at it, it's never locked up on me. That's a miracle in itself. I can lock up about anything I believe. ;-)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.