[issue18490] Error embedding datetime in C++
New submission from abdulet: Hi all, I'm ebedding a python program into C++ ecap library. Everything works fine until I'v try to import sqlite3. When I try to import it I give the following exception: Traceback (most recent call last): ', ' File /usr/local/squid/bin/putAdds.py, line 4, in module import sqlite3 ', ' File /usr/lib/python2.7/sqlite3/__init__.py, line 24, in module from dbapi2 import * ', ' File /usr/lib/python2.7/sqlite3/dbapi2.py, line 24, in module import datetime ', 'ImportError: /usr/lib/python2.7/lib-dynload/datetime.i386-linux-gnu.so: undefined symbol: PyExc_SystemError So it seems that is a problem in datetime module. How can i solve that? Thanks and regards Abdul -- components: Extension Modules messages: 193280 nosy: abduelt priority: normal severity: normal status: open title: Error embedding datetime in C++ versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18490] Error embedding datetime in C++
abdulet added the comment: Ok it looks like a bug for me, sorry for the inconveniences Thanks and regards Abdul TECNOCOM Abdul Pallarès Calvi Técnico Especialista Sistemas gestionados Entença, 335 Barcelona 08029 Tel. Fijo: (+34) 934953167 Tel. Móvil / Fax: (+34) 647970296 / (+34) email: abdul.palla...@tecnocom.es http://www.tecnocom.es Por favor, antes de imprimir este mensaje, asegúrate de que es necesario. Ayudemos a cuidar el medio ambiente Este mensaje puede contener información confidencial o privilegiada. Si le ha llegado por error, rogamos no haga uso del mismo, avise al remitente y bórrelo. Consulte aviso legal This message may contain confidential or privileged information. If it has been sent to you in error, please do not use it, notify the sender of the error and delete it. SPAN style=FONT-SIZE: 7pt; COLOR: gr De: Christian Heimes rep...@bugs.python.org Enviat el: dijous, 18 / juliol / 2013 13:13 Per a: Pallares Calvi, Abdul Sabur Tema: [issue18490] Error embedding datetime in C++ Christian Heimes added the comment: Hello Abdulet, the issue tracker isn't the best place to get help for your problem. May I suggest that you write a mail to the Python user list or one of the more specialized lists like the CAPI SIG and C++ SIG? http://mail.python.org/mailman/listinfo -- nosy: +christian.heimes resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18490 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18490 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
Bug? concatenate a number to a backreference: re.sub(r'(zzz:)xxx', r'\1'+str(4444), somevar)
Well its this normal? i want to concatenate a number to a backreference in a regular expression. Im working in a multprocess script so the first what i think is in an error in the multiprocess logic but what a sorprise!!! when arrived to this conclussion after some time debugging i see that: import re aa = zzz:xxx re.sub(r'(zzz:).*',r'\1'+str(),aa) '[33' ¿?¿?¿? well lets put a : after the backreference aa = zzz:xxx re.sub(r'(zzz).*',r'\1:'+str(),aa) 'zzz:' now its the expected result so should i expect that python concatenate the string to the backreference before substitute the backreference? or is a bug tested on: Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 Python 2.5.2 (r252:60911, Jan 4 2009, 17:40:26) [GCC 4.3.2] on linux2 with the same result Cheers! -- http://mail.python.org/mailman/listinfo/python-list
Re: Bug? concatenate a number to a backreference: re.sub(r'(zzz:)xxx', r'\1'+str(4444), somevar)
On 23 oct, 13:54, Peter Otten __pete...@web.de wrote: abdulet wrote: Well its this normal? i want to concatenate a number to a backreference in a regular expression. Im working in a multprocess script so the first what i think is in an error in the multiprocess logic but what a sorprise!!! when arrived to this conclussion after some time debugging i see that: import re aa = zzz:xxx re.sub(r'(zzz:).*',r'\1'+str(),aa) '[33' If you perform the addition you get r\1. How should the regular expression engine interpret that? As the backreference to group 1, 13, ... or 1? It picks something completely different, [33, because \133 is the octal escape sequence for [: chr(0133) '[' You can avoid the ambiguity with extra = str(number) extra = re.escape(extra) re.sub(expr r\g1 + extra, text) The re.escape() step is not necessary here, but a good idea in the general case when extra is an arbitrary string. Peter Aha!!! nice thanks i don't see that part of the re module documentation and it was in front of my eyes :(( like always its something silly jjj so thanks again and yes!! is a nice idea to escape the variable ;) cheers -- http://mail.python.org/mailman/listinfo/python-list