Re: webbrowser.py

2005-02-14 Thread Timothy Babytch
Jeremy Sanders wrote: It occurs to me that webbrowser could be more intelligent on Linux/Unix systems. Both Gnome and KDE have default web browsers, so one could use their settings to choose the appropriate browser. I haven't been able to find a freedesktop common standard for web browser, however

ANN: LJ pyGTK clien Zapys-0.3 released

2005-01-25 Thread Timothy Babytch
Usable simple app for posting messages to LiveJournal. Easy extandable. Main feature: character substitution. I mean (tm) to â, (c) to Â, quote to matching pairs and so on. The list can be easily extended with your own regexps. submit on Ctrl+Enter. Edit/delete last entry. screenshot: http://img

how to print unicode structures?

2005-01-17 Thread Timothy Babytch
Imagine you have some list that looks like ('unicode', 'not-acii', 'russian') and contains characters not from acsii. or list of dicts, or dict of dicts. how can I print it? not on by one, with "for" - but with just a simple print? My debugging would be MUCH simpler. Now when I try print or ppr

Re: do you master list comprehensions?

2004-12-14 Thread Timothy Babytch
Will Stuyvesant wrote: data = [['foo','bar','baz'],['my','your'],['holy','grail']] sum(data, []) ['foo', 'bar', 'baz', 'my', 'your', 'holy', 'grail'] The sec

Re: Recursive list comprehension

2004-12-06 Thread Timothy Babytch
Serhiy Storchaka wrote: >>>sum([['N', 'F'], ['E'], ['D']], []) ['N', 'F', 'E', 'D'] THE BEST! -- Timothy Babytch, PHP-dev Teamleader -- http://mail.python.org/mailman/listinfo/python-list

Re: Recursive list comprehension

2004-12-06 Thread Timothy Babytch
: data = [] for sub in [['N', 'F'], ['E'], ['D']]: ... data.extend(sub) ... Thanks. Both tips were helpful. -- Timothy Babytch -- http://mail.python.org/mailman/listinfo/python-list

Recursive list comprehension

2004-12-06 Thread Timothy Babytch
t look pythonic.. I tried print [x for x in y for y in c_vars] and got NameError: name 'y' is not defined. -- Timothy Babytch -- http://mail.python.org/mailman/listinfo/python-list