Re: Mandrake 10.1 and Python 2.3.4

2005-05-15 Thread John Ridley
fix it? > > I think this is the reason why I'm getting errors when it comes to > importing other python packages. I have both python 2.3.4 and 2.4.1 installed on Mandrake 10.1 - and only 2.4.1 gives the error. So - have you tried to install python 2.4 recently? Al

Re: xmlrpclib and decoding entity references

2005-05-03 Thread John Ridley
r().translate_references(your_xml_sample) xmllib is now obsolete, but you could copy and paste the relevant parts to your project as they only amount to a fifty-line function and few regular expressions. HTH John Ridley Send instant messages to your online friends http://uk.messe

Re: gtk/qt scintilla help !

2005-05-01 Thread John Ridley
gt;>> # elif ... >>> return 0 >>> def description(self, style): >>> # if style == 0: >>> # return self.tr("Default") >>> # elif ... >>> return QString.null Of course, this is a minimal lexer class - it is possible to be a lot more sophisticated than what is suggested here. John Ridley Send instant messages to your online friends http://uk.messenger.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: kdialog and unicode

2005-04-28 Thread John Ridley
if you want more details on kdialog's markup handling, try this reference from the qt docs: http://doc.trolltech.com/qstylesheet.html HTH John Ridley Send instant messages to your online friends http://uk.messenger.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: kdialog and unicode

2005-04-27 Thread John Ridley
x85 si\xc4\x99 ... wolni i r\xc3\xb3wni pod wzgl\xc4\x99dem ... swej godno\xc5\x9bci i swych praw. S\xc4\x85 ... oni obdarzeni rozumem i sumieniem i powinni ... post\xc4\x99powa\xc4\x87 wobec innych w duchu ... braterstwa.""" >>> s = s.decode('utf-8').encode('ascii','xmlcharrefreplace') >>> k = os.popen('kdialog --inputbox "%s"' % s) John Ridley Send instant messages to your online friends http://uk.messenger.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: check instace already running...

2005-04-10 Thread John Ridley
ad starts here: http://mail.python.org/pipermail/python-list/2004-September/243294.html But see in particular this post: http://mail.python.org/pipermail/python-list/2004-September/243379.html There is also a cookbook recipe here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252495 H

Re: Installing Python 2.4 on Linux

2005-04-09 Thread John Ridley
27;: main() --- Then if $HOME/bin is on your PATH, you can simply run: idle2.4 > The problem is then using IDLE and pydoc for Python2.4 since neither > are .py scripts Really?! What are they on Fedora, then? John Ridley Send instant messages to your

Re: change the date string into timestamp

2005-04-09 Thread John Ridley
> import time, calendar >>> date_string = time.strftime('%c', time.gmtime(1112952134)) >>> print date_string Fri Apr 8 09:22:14 2005 >>> calendar.timegm(time.strptime(date_string)) 1112952134 John Ridley Send instant messages to your online friends http://uk.messenger.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing Python 2.4 on Linux

2005-04-05 Thread John Ridley
ecutable - by default the library is installed in '/usr/local/lib/python2.4'. See the README for details. John Ridley Send instant messages to your online friends http://uk.messenger.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: re module non-greedy matches broken

2005-04-05 Thread John Ridley
at you may need to take into account the behaviour of some of the module functions when composing your regexes. I'm sure it's possible to do what you want using a regex alone - however, it may also be worth looking at rolling your own search functions in order to get finer control over

Re: Super Newbie Question

2005-04-04 Thread John Ridley
--- John Ridley <[EMAIL PROTECTED]> blurted: > I suppose the simplest thing to do would be to write an empty string > to the file: > > >>> f = open('tmpfile.txt', 'w') > >>> f.write('') > >>> f.close() # or f.fl

Re: Super Newbie Question

2005-04-04 Thread John Ridley
x27;tmpfile.txt', 'w') >>> f.write('') >>> f.close() # or f.flush(), if keeping open HTH John Ridley Send instant messages to your online friends http://uk.messenger.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Eric3 under WinXP

2005-04-04 Thread John Ridley
n interface with pyd Files. > > Eric complains, that qtext is not found. > > Has anyone success with getting this to work and how? Hi Franz. If you don't get any help here, please try the mailing list at: http://mats.imk.fraunhofer.de/mailman/listinfo/pykde John Ridley Send i

Re: re module non-greedy matches broken

2005-04-04 Thread John Ridley
>>> vwre = re.compile("V[^V]*W") ['V1W', 'V2WWW'] >>> vwre = re.compile("V[^V]*?W") >>> vwre.findall(newdoc) ['V1W', 'V2W'] Not exactly rocket-science, but it gets the job done... John Ridley Send instant messages to your online friends http://uk.messenger.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: help with python-devel!!!

2005-04-04 Thread John Ridley
libpython: libpython2.3 libpython2.3-devel John Ridley Send instant messages to your online friends http://uk.messenger.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: re module non-greedy matches broken

2005-04-04 Thread John Ridley
letely understand your explanation, but does this get any closer to what your looking for? >>> vwre = re.compile("V[^V]*?W") >>> newdoc = "V1WVVV2WWW" >>> re.findall(vwre, newdoc) ['V1W', 'V2W'] That is: , then as few times as