Anyone understand this syntax error?

2006-12-02 Thread Sean Hammond
Anyone understand this? Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02) [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2 Type help, copyright, credits or license for more information. def markdown_perl(input): ... Send 'input' (string) to the markdown perl script, and return

Re: Why don't optional mutable objects show up in vars(func)?

2006-09-27 Thread Sean Hammond
On Wed, 2006-09-27 at 09:32 -0700, [EMAIL PROTECTED] wrote: So I just got bitten by the don't use a mutable object as an optional argument gotcha. I now realize that for this function: def func(x, y=[]): ... y.append(x) ... print y ... y is initialized when the function is

Embed Python in HTML?

2006-09-25 Thread Sean Hammond
Forgive my ignorance, but I sometimes write custom dynamic web-pages using PHP, by simply embedding PHP in HTML with ?php ? tags, and renaming for example index.html to index.php and making it executable. I only use this for very minor things like calling a script, and don't really want to learn

Help - strange behaviour from python list

2006-04-11 Thread Sean Hammond
I've managed to create a scenario in which editing an object in a list of objects seems to edit every object in the list, rather than just the one. I'm totally stumped and wondered if anyone would be kind enough to read my explanation and see if they have any suggestions. I have probably

Re: Help - strange behaviour from python list

2006-04-11 Thread Sean Hammond
Right, thanks everyone, that's a useful lesson learned. As I suspected I was being tripped over by some feature of Python I was unaware of. I had been looking up lists in the documentation, not functions, and could find no explanation. Prbolem solved! -- --

Console UI library for Python

2006-03-21 Thread Sean Hammond
Anyone know of a good library for building text-mode user-interfaces in Python, like if I wanted to make an email program like Pine or Mutt? A quick Google reveals Urwid: http://excess.org/urwid/ which looks pretty good. -- -- http://mail.python.org/mailman/listinfo/python-list