I was wondering is there a good IDE for python /wxpython/pygame? I was wanting something that would do all 3 very good, for when I do finally jump to a GUI... I was messing around a little with pygame, and I noticed it dose not like the python IDLE...

Recommended Answers

All 21 Replies

Heh heh, I love eclipse, but the interactive shell (a la IDLE) is pretty darn awesome for testing stuff out. Example:

>>> #start with your function
>>> def count_chars(char,string):
	"""A functiont that counts how many chars in the string"""
	pass

>>> strg = 'bunnies'
>>> count_chars('n',strg) #nothing happens!
>>> def count_chars(char,string):
	"""A functiont that counts how many chars in the string"""
	num = 0
	for x in string:
		if char == x:
			num += 1
	return num

>>> strg = 'bunnies'
>>> count_chars('n',strg)
2
>>> strg2 = 'sleepy...zzz'
>>> count_chars('z',strg2)
3

Then, you just copy and paste into your module:

def count_chars(char,string):
	"""A functiont that counts how many chars in the string
        >>> strg = 'bunnies'
        >>> count_chars('n',strg) 
        2
        >>> strg2 = 'sleepy...zzz'
        >>> count_chars('z',strg2)
        3
        """
	num = 0
	for x in string:
		if char == x:
			num += 1
	return num

And then you can use the doctest module. Fairly awesome. Eclipse is great for larger projects, though, keeps you organized.

Well I chose VIDLE...And it still does not work right, or maybe I am just stupid and not looking at things properly..I am just trying some pygame simple things, like making a window that will just close, instead its always busy and i have to use [ctrl+alt+del] to close it..

import pygame

screen = pygame.display.set_mode((480, 480))
running = 1

while running:
    event = pygame.event.poll()
    if event.type == pygame.QUIT:
        running = 0

I am not sure if (sys) is needed, but anyway it still gives a busy window.. I am on windows XP 32.

the interactive shell (a la IDLE) is pretty darn awesome for testing stuff out.

Agreed. I use Notepad++ for my editing and have it set up with all kinds of whiz-bangs. I hit F6 to pull up an instance of PyCrust which is a Python Shell with autocomplete, syntax highlights, etc... I've also got shortcuts for running syntax checks, running the program I'm editing in Python, and a few others.

Agreed. I use Notepad++ for my editing and have it set up with all kinds of whiz-bangs. I hit F6 to pull up an instance of PyCrust which is a Python Shell with autocomplete, syntax highlights, etc... I've also got shortcuts for running syntax checks, running the program I'm editing in Python, and a few others.

Hmmm, interesting. I'm going to check out PyCrust, since I'm NOT a fan of IDLEs many issues...

I have Python 3.1 installed in my XP machine and use PyScripter (Windows executable written with Delphi) or the Geany IDE.

For Python 2.5 I use Portable Python 2.5.4 that does not interfere with the installed Python 3.1 and that comes with the wonderful SPE IDE. SPE uses some great programs right from its tools, like WinPdb, Kiki, PyFilling, PyChecker, wxGlade, XRCed etc.

PyScripter from:
http://pyscripter.googlepages.com/

Portable Python from:
http://www.portablepython.com/releases/

Heh heh, I love eclipse, but the interactive shell (a la IDLE) is pretty darn awesome for testing stuff out.

Eclipse has an interactive shell

Eclipse is much too slow and too large, actually huge! Not really made for nimble Python programming.

Talk about a lean and nimble IDE, I am still a friend of ConText. You can set it to the language you are using, and even specify which version of Python you want to use. Best of all, I can run C, CPP, Ruby, Lua, IronPython and Python on it. It does recognize the syntax by the file extensions.

I have Python 3.1 installed in my XP machine and use PyScripter (Windows executable written with Delphi) or the Geany IDE.

I justed started with Python 3.1 and installed Geany to try it out.
I wrote a very small piece of code with 3 variables to test this IDE.
When I attempt to run the code, a cmd.exe window opens up with the message: : 'Python' is not recognized as an internal or external command, operable program or batch file. Press any key to continue..." Nothing else shows.

I have not located any documentation of configuring Geany to work with Python 3.1 regarding this issue. The file I created is saved with a .py extension, and can be accessed; it just will not execute. Any ideas...?

OS is Windows Vista.

Python is not in your path
Add it via
Start->Right Click My Computer->Properties->Advanced Properties tab->Environment variable

And for solved threads, it is beteer you start new one :)

To set Geany to use Python31 do the following ...
click on the Build dropdown menu
select Set Includes and Arguments
in Execute enter C:/python31/python "%f"

Well I chose VIDLE...And it still does not work right, or maybe I am just stupid and not looking at things properly..I am just trying some pygame simple things, like making a window that will just close, instead its always busy and i have to use [ctrl+alt+del] to close it..

import pygame

screen = pygame.display.set_mode((480, 480))
running = 1

while running:
    event = pygame.event.poll()
    if event.type == pygame.QUIT:
        running = 0

I am not sure if (sys) is needed, but anyway it still gives a busy window.. I am on windows XP 32.

instead of useing the running = 0 thing, maybe try sys.exit()?

import pygame, sys
from pygame.locals import * # i noticed you didn't have this either.

screen = pygame.display.set_mode((480, 480))


while running:
    event = pygame.event.poll()
    if event.type == pygame.QUIT:
        sys.exit()

As for IDE's I use PyScripter.

Thanks, it works.

here are several to consider...
I use Eric4 for most of what I write, It has a wealth of features. The major downside is the almost complete lack of documentation.

Ipython is great for testing small bits of code. it has a wealth of secialized features for reusing lines of code. The only thing that drives me crazy is that it doesn't handle reusing blocks with indented statements

Leo is interesting. It is written in python and I use it as a outliner. However, it can be used to develope code using the outline metaphor.

Lastly, Scite is a nice light weight editor that has coding function, syntax highlighting, code folding, etc

I use Netbeans. Its great for organising your projects, and it shows you errors as you type. It can do pretty much any language as well, if you download the plugins (python is a plugin!). Just download the base IDE and get the python plugin.

would someone start new thread instead of this one which is already solved?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.