Re: Using site-packages with alt-installed Python version

2010-05-16 Thread Tuomas Vesterinen
On 05/16/2010 02:38 PM, Alister wrote: On Sun, 16 May 2010 12:07:08 +0300, Tuomas Vesterinen wrote: I am testing an application GUI with Python 2.4, 2.5 and 2.6. The native Python (in Fedora 12) is 2.6. Versions 2.4 and 2.5 are alt-installed. Aplication GUI uses: import pygtk pygtk.require

Re: joining files

2010-05-16 Thread Tuomas Vesterinen
On 05/16/2010 05:04 PM, Dave Angel wrote: (You forgot to include the python-list in your response. So it only went to me. Normally, you just do reply-all to the message) mannu jha wrote: On Sun, 16 May 2010 13:52:31 +0530 wrote mannu jha wrote: Hi, I have few files like this: file1: 22

Using site-packages with alt-installed Python version

2010-05-16 Thread Tuomas Vesterinen
ocal/lib/python2.4/site-packages/gtk-2.0/glib/__init__.py", line 22, in ? from glib._glib import * ImportError: /usr/lib/libpyglib-2.0-python.so.0: undefined symbol: _PyObject_CallFunction_SizeT What I should say more to get access to the GTK? Tuomas Vesterinen -- http://mail.python.org/mailman/listinfo/python-list

Re: Connecting to the users preferred email client

2009-12-04 Thread Tuomas Vesterinen
Mike Driscoll wrote: On Dec 4, 5:28 am, Tuomas Vesterinen wrote: If I want to open a html-page from Python code I can say: >>> import webbrowser >>> webbrowser.open('index.html') Is there a standard way to init an email in users preferred email client lik

Connecting to the users preferred email client

2009-12-04 Thread Tuomas Vesterinen
If I want to open a html-page from Python code I can say: >>> import webbrowser >>> webbrowser.open('index.html') Is there a standard way to init an email in users preferred email client like Thubderbird, Evolution etc.? Tuomas Vesterinen -- http://mail.python

ANNOUNCEMENT: Tinybooker accounting released

2009-08-18 Thread Tuomas Vesterinen
Tinybooker 0.2.2 released at http://tinybooker.org/ Tinybooker is an accounting program offering the dual accounting core functionality for moderate size accountings: * Assisted establishing new accountings * Localized scheme templates * Easy entering and saving new entries * Sta

Re: Python preprosessor

2009-06-08 Thread Tuomas Vesterinen
Roger Binns wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tuomas Vesterinen wrote: I am intensively using 2to3.py. So I have 2 codebase: one in py2 and the other in py3. The expectation would be that you only maintain the py2 code and automatically generate the py3 code on demand

Re: Python preprosessor

2009-06-08 Thread Tuomas Vesterinen
R. David Murray wrote: Tuomas Vesterinen wrote: I am developing a Python application as a Python2.x and Python3.0 version. A common code base would make the work easier. So I thought to try a preprosessor. GNU cpp handles this kind of code correct: #ifdef python2 print u'foo&#x

Re: Get the class name

2009-06-07 Thread Tuomas Vesterinen
Kless wrote: Is there any way of to get the class name to avoid to have that write it? --- class Foo: super(Foo, self) --- * Using Py 2.6.2 >>> class Foo(object): ... def cls(self): ... return self.__class__ ... >>> Foo().cls() -- http://mail.python.or

Re: Python preprosessor

2009-06-07 Thread Tuomas Vesterinen
Peter Otten wrote: Tuomas Vesterinen wrote: I am developing a Python application as a Python2.x and Python3.0 version. A common code base would make the work easier. So I thought to try a preprosessor. GNU cpp handles this kind of code correct: Any other suggestions? http

Python preprosessor

2009-06-07 Thread Tuomas Vesterinen
'foo', 'bar') #endif results: > cpp -E -Dpython2 test_cpp.py ... print u'foo', u'bar' Any other suggestions? Tuomas Vesterinen -- http://mail.python.org/mailman/listinfo/python-list

Re: Ambiguous locale.strxfrm

2009-05-23 Thread Tuomas Vesterinen
Thanks. Bug report done, issue 6093. Tuomas Vesterinen Gabriel Genellina wrote: En Fri, 22 May 2009 06:32:40 -0300, Tuomas Vesterinen escribió: This was fixed once in Python 2.5, but in Python 3.0 the bug celebrates its comeback. The tail of the strxfrm result is ambiguous. Python 3.0.1

Ambiguous locale.strxfrm

2009-05-22 Thread Tuomas Vesterinen
ts" or "license" for more information. >>> import locale >>> locale.setlocale(locale.LC_COLLATE, 'en_US.utf8') 'en_US.utf8' >>> key1=locale.strxfrm('maupassant guy') >>>> for i in range(10): ... print(locale.strxf

Re: Problems with datetime.datetime.strptime

2009-05-10 Thread Tuomas Vesterinen
Nick Craig-Wood wrote: Tuomas Vesterinen wrote: I hoped that I could get rid of my special module _strptime2 when porting to Python 3.0. But testing is a disappointment. [snip] C : strftime('%a %b %e %H:%M:%S %Y')='Sat May 9 11:26:12 2009' strptime('Sat

Problems with datetime.datetime.strptime

2009-05-09 Thread Tuomas Vesterinen
r %Z' strftime('%m/%d/%Y')='05/09/2009' strptime('05/09/2009','%m/%d/%Y')= 2009-05-09 00:00:00 strftime('%r')='11:26:12 AM' strptime('11:26:12 AM','%r')= 'r' is a bad directi