News for hackers. Stuff that matters.
Re:Python 3000 Alpha 1 Released by mattculbreth on Friday August 31, 2007 @04:05PM (#48930)
The print(x) instead of print x thing is going to kill me in interactive sessions. I can feel it now. It's those little things that get ingrained in your daily work that are hard to break.
Re:Python 3000 Alpha 1 Released by sri on Friday August 31, 2007 @05:29PM (#48983)
I made this http://defcraft.org/hacks/pycmds/pii.py to help define "commands" in the interactive interpreter. Commands like "ls" and "h os".

"ls" is a simple command -- invokes the Unix command "ls -l". A more complicated one: "h os" -- run help on the os module (just like "help(os)"). This is kinda tricky because "h os" is actually a syntax error in Python. When interactive, I catch syntax errors and see if they are user defined commands, in which case I execute the desired command. This works for Python 2.5, but shouldn't be too hard to port to Python 3.0.

I briefly looked at IPython, but that seemed to complicated for my needs.

(Also, http://defcraft.org/hacks/pycmds/strftime_helper.py uses the above file to help the user with strftime spec usage. I can never remember all the special characters.)

Re:Python 3000 Alpha 1 Released by nirs on Friday August 31, 2007 @06:41PM (#49017)
Nice!

We use similar technic with hpy - you type in Hebrew Python http://nirs.freeshell.org/code/hpy/ , then each line is translated to Python and executed.

How do create more fancy links here?