[issue46767] [Doc] sqlite3 Cursor.execute() return value is unspecified

2022-02-16 Thread Pierre Thierry
New submission from Pierre Thierry : In the documentation of the sqlite3 module, the return value for Connection.execute() is told to be the Cursor that was implicitly created, but nothing is said about the return value/type when using Cursor.execute(). -- components: Library (Lib

[issue31753] Unnecessary closure in ast.literal_eval

2021-05-12 Thread Thierry Excoffier
Thierry Excoffier added the comment: I assumed that the standard python library does not create circular references, so the GC can be disabled safely in real time application. Each time 'literal_eval' is called, it creates a circular reference and so a memory leak. The source of this leak

[issue38894] Path.glob() sometimes misses files that match

2019-11-22 Thread Thierry Parmentelat
Thierry Parmentelat added the comment: to clarify, when I said 'lambda user' I mean regular, non-root user that has no permission to read in /root -- ___ Python tracker <https://bugs.python.org/issue38

[issue38894] Path.glob() sometimes misses files that match

2019-11-22 Thread Thierry Parmentelat
New submission from Thierry Parmentelat : I have observed this on a linux box running fedora29 $ python3 --version Python 3.7.5 $ uname -a Linux faraday.inria.fr 5.3.11-100.fc29.x86_64 #1 SMP Tue Nov 12 20:41:25 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux $ cat /etc/fedora-release Fedora release

[issue35237] Allow Path instances in sys.path ?

2018-11-13 Thread Thierry Parmentelat
New submission from Thierry Parmentelat : Hi; this is my first entry in this repo I ran today into a rather frustrating experience, that I'd to avoid it for others as far as possible In a nutshell I had a sphinx stub that read: import sys sys.path.append("..") import mymodule a

match point

2015-12-22 Thread Thierry
hat anchor makes a pattern match in only a single position, and is therefore useless in functions like re.findall, re.finditer or re.split? Thanks, Thierry -- https://mail.python.org/mailman/listinfo/python-list

Re: match point

2015-12-22 Thread Thierry Closen
te exactly this, so it makes sense to add an easy-to-use fullmatch function to the re namespace. It may not be the real historical reason behind re.fullmatch, but personally I will stick with that one :) Cheers, Thierry -- https://mail.python.org/mailman/listinfo/python-list

Re: Evaluation order

2015-07-10 Thread Thierry Chappuis
Hi, No, the value of t is a reference to tje list. So first, (1) the value of the reference t is recovered, (2) the parenthesis is evaluated, (...) the whole expression is evaluated. To evaluate (2), the .sort() call is executed in place with the side effect of sorting the content of t. t.sort()

Re: Evaluation order

2015-07-10 Thread Thierry Chappuis
Hi, No, the value of t is a reference to tje list. So first, (1) the value of the reference t is recovered, (2) the parenthesis is evaluated, (...) the whole expression is evaluated. To evaluate (2), the .sort() call is executed in place with the side effect of sorting the content of t. t.sort()

Re: Evaluation order

2015-07-10 Thread Thierry Chappuis
Anyway, if we enter this kind of discussion, it is a reliable indication that the code smells. There is a pythonic way to express the same task: t.sort() t kind regards Thierry On ven., juil. 10, 2015 at 2:28 PM, Terry Reedy tjre...@udel.edu [tjre...@udel.edu] wrote: On 7/10/2015 8:04 AM

Re: Creating .exe file in Python

2015-06-15 Thread Thierry Chappuis
and that's my prefered solution. If installing the Python interpreter is an issue for the end user, we can make the installer do it for him. Installer programs like Inno Setup let you do it quite easily. Kind regards Thierry On lun., juin 15, 2015 at 4:10 PM, subhabrata.bane...@gmail.com

problem while using os.walk with utf-8 characters

2015-05-12 Thread Thierry GAYET
a reboot i need to restart the code to make it work properly without any error. Any idea about the first fact related to the usf-8 support with external files that can be encoded with any charset (latin-1, utf-8, ... ) Secondly, why it can works after a restart of the python script ? BR Thierry

[issue19056] Windows 7, script exec not working without explicit cal of python.exe

2013-09-21 Thread Thierry Seunevel
Thierry Seunevel added the comment: Many thanks for your answers. printing the sys.path gave me this output (parsed with newlines) '', 'D:\\soft\\python\\lib', 'D:\\Thierry\\python\\d\\thierry\\python', mispelled 'C:\\Windows\\system32\\python27.zip', 'd:\\soft\\python\\DLLs', 'd:\\soft

[issue19056] Windows 7, script exec not working without explicit cal of python.exe

2013-09-20 Thread Thierry Seunevel
New submission from Thierry Seunevel: Executing a script from the command prompt works if Python.exe called explicitly, doesn't work if script name only. Example : python.exe script.py is ok script.py gives the following : Traceback (most recent call last): File D:\soft\python\lib\site.py

[issue13486] msvc9compiler.py doesn't properly generate manifest files.

2012-03-25 Thread Thierry Bastian
Thierry Bastian thier...@filewave.com added the comment: I have the same issue. To be honest it is because I'm using MSVC2010. I know it is not a supported platform but the patch to fix the problem is really just the following (and it is compatible with MSVC2008): --- Lib/distutils

Re: sys.stdout, urllib and unicode... I don't understand.

2008-11-12 Thread Thierry
Thank you to both of you (Marc and Tino). I feel a bit stupid right now, because as both of you said, encoding my source string to utf-8 do not produce an exception when I pass it to urllib.quote() and is what it should be. I was certain that this created an error sooner, and id not tried it

Re: sys.stdout, urllib and unicode... I don't understand.

2008-11-12 Thread Thierry
Are you sure that Python wasn't just printing out \n because you'd asked it to show you the repr() of a string containing newlines? Yes, I am sure. Because I dumped the ord() values to check them. But again, I'm stumped on how complicated I have made this. I should not try to code anymore at

sys.stdout, urllib and unicode... I don't understand.

2008-11-11 Thread Thierry
Hello fellow pythonists, I'm a relatively new python developer, and I try to adjust my understanding about how things works to python, but I have hit a block, that I cannot understand. I needed to output unicode datas back from a web service, and could not get back unicode/multibyte text before

Converting a time string to a more readable date, time

2008-10-27 Thread Thierry Lam
I have a python time string which has the following value: 1225137896 The above corresponds to 2008/10/27 16:04:56 What can I use to convert 1225137896 to a more readable date, time format? -- http://mail.python.org/mailman/listinfo/python-list

Re: what is meaning of @ in pyhon program.

2008-06-28 Thread Thierry
ie: @if os.exists(foo):    etc    etc and @for blah:    etc    etc This sounds more like PHP code, where a @ prefixing a function means that even if there are errors or warnings, you don't want to see them. -- http://mail.python.org/mailman/listinfo/python-list

new to python, looking for streams clues

2008-06-04 Thread Thierry
Hello peoples, As I said, I'm new to python, and particularly to XML generation in python. Using the 4suite XML package, I have been able to produce XML, but only directly to STDOUT. Refering to the 4suite markupWriter refrence, the class needs a stream to output the generated XML, and if none

Re: new to python, looking for streams clues

2008-06-04 Thread Thierry
On Jun 4, 1:50 pm, Bruno Desthuilliers bruno. [EMAIL PROTECTED] wrote: Thierry a écrit : Hello peoples, As I said, I'm new to python, and particularly to XML generation in python. Using the 4suite XML package, I have been able to produce XML, but only directly to STDOUT. Refering

Re: writing Python in Emacs

2008-01-19 Thread Thierry Volpiatto
-gnu-emacs mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/help-gnu-emacs -- A + Thierry Pub key: http://pgp.mit.edu -- http://mail.python.org/mailman/listinfo/python-list

Extending Python with C API

2007-09-13 Thread Thierry Masson
, maintainer = thierry masson, maintainer_email = [EMAIL PROTECTED], description = test module, ext_modules = [Extension(gtestmodule,[gtestmodule.c])], ) test.py: -- import gtestmodule print gtestmodule.GetInt(36); print gtestmodule.GetString(); The setup script

Re: Extending Python with C API

2007-09-13 Thread Thierry Masson
On 9/13/07, Carsten Haese wrote: Your module C code uses an unknown function by the name of PyBuildValue. The actual name of the function you mean is Py_BuildValue. Thank you so much, Carsten. I can't believe I missed that underscore! I'm posting the working code below in case it ever turns out

Re: Yet Another Software Challenge

2007-05-15 Thread Thierry
you could find. Enjoy. Cheers. Thierry -- http://mail.python.org/mailman/listinfo/python-list

Yet Another Software Challenge

2007-05-14 Thread Thierry
and feedbacks about this initiative and its relevance. Enjoy! Thierry -- http://mail.python.org/mailman/listinfo/python-list

WMI Python, writing remotely and retrieving env variables values

2007-01-12 Thread Thierry Lam
, for example SystemDrive? Thierry -- http://mail.python.org/mailman/listinfo/python-list

Re: HTTPS Login

2006-08-31 Thread Thierry Lam
Instead of using the following: req = urllib2.Request(https://web.site.com/default.aspx;, params) data = urllib2.urlopen(req) Try: data = urllib.urlopen(https://web.site.com/default.aspx;, param) Thierry Tom Grove wrote: I am trying to login to a secure website and I am having some

Finding yesterday's date with datetime

2006-05-15 Thread Thierry Lam
Is there an easy way to determine the yesterday's date(year-month-day) from the python datetime library if I know today's date? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Python poly obsolete?

2006-03-17 Thread Thierry Lam
I have a piece of python code which goes like the following: import poly list = [1, 2, 3] result = poly.scan(list) I'm using Python 2.3.4 and I don't think that poly library is working properly, I read somewhere that's it's obsolete now. What's the alternative? Thanks Thierry -- http

Re: Timeout at command prompt

2006-01-12 Thread Thierry Lam
Which Python version are you using? I'm getting the following error with Python 2.3.4: Traceback (most recent call last): File C:\home\pciroot\vcur\sdk\tools\inter.py, line 32, in ? signal.signal(signal.SIGALRM, input) AttributeError: 'module' object has no attribute 'SIGALRM' Thierry

Re: Timeout at command prompt

2006-01-12 Thread Thierry Lam
Is there a windows equivalent for that solution? -- http://mail.python.org/mailman/listinfo/python-list

Re: Timeout at command prompt

2006-01-12 Thread Thierry Lam
I got the signal to work on linux with sys.stdin.readline() but the process timeout after x seconds even when I input something. Is there a way to close the signal after getting a correct input from the console window? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Timeout at command prompt

2006-01-11 Thread Thierry Lam
I can use the python function raw_input() to read any input from the user but how can I add a timeout so that my program exits after x period of time when no input has been entered. Thierry -- http://mail.python.org/mailman/listinfo/python-list

Renaming files in ftplib

2006-01-07 Thread Thierry Lam
Let's say I have a file called 'test.c' on my local machine and I'm ftping a file with similar name from a remote computer. I want to prefix the file ftped over with a T_, how do I do that through ftplib in python? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Copying files between different linux machines

2006-01-07 Thread Thierry Lam
Let's say I have two linux machines with the following names: -linone -lintwo If I'm currently on linone and if I want to copy a bunch of files from lintwo into linone, how can that be done in a python script without using ftp? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python

Help in File selector window in pygtk

2005-11-21 Thread Thierry Lam
Let's say I have a main window which has a File menu. When I click on the File menu and the open button, I have a File selector window which comes in front of my main window. How do I make the main window unselectable? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Help with modal in Gtk::FileChooserDialog

2005-11-21 Thread Thierry Lam
Does anyone know how to set modal to True for Gtk::FileChooserDialog? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Walking through directories and files

2005-09-16 Thread Thierry Lam
the filenames first and then the directory names. Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating Pie Chart from Python

2005-09-16 Thread Thierry Lam
Those python pie chart add ons are not very useful. For my specific pie chart, I have some 6-8 items to show up and some of them occupy only 2-5% of the pie. This cause the names and percentages to overlap each other. -- http://mail.python.org/mailman/listinfo/python-list

Creating Pie Chart from Python

2005-09-15 Thread Thierry Lam
Let's say I have the following data: 500 objects: -100 are red -300 are blue -the rest are green Is there some python package which can represent the above information in a pie chart? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating Pie Chart from Python

2005-09-15 Thread Thierry Lam
In a web browser, having a pie chart in some image format will be great. -- http://mail.python.org/mailman/listinfo/python-list

Writing at the beginning of a file

2005-09-14 Thread Thierry Lam
that method if there's an alternative way. Another way of doing it is to buffer the whole file writing into some variable, but that means I have to change 2000+ lines of codes and change fp.write() to something else. Any suggestions please? Thanks Thierry -- http://mail.python.org/mailman

Python xml.dom, help reading attribute data

2005-09-06 Thread Thierry Lam
Let's say I have the following xml tag: para role=success1/para I can't figure out what kind of python xml.dom codes I should invoke to read the data 1? Any help please? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Ignoring ampersand() as a special character in xml

2005-09-06 Thread Thierry Lam
Let's say I have the following xml tag: para role=sourcea b/para Currently, an xml parser will treat as a special character. Does anyone know the special characters to use around the ampersand so that the xml parser can treat a b as a whole value? Thanks Thierry -- http://mail.python.org

Mapping network drive on Linux

2005-08-31 Thread Thierry Lam
On windows, if I want to map a network drive to a local drive on my computer, I do the following: data = { 'remote' : '\\blah\data', 'local' : 'Z:' } win32net.NetUseAdd(None, 1, data) How am I supposed to do similar thing on Linux? Thanks Thierry -- http

Calling ftp commands from python

2005-08-31 Thread Thierry Lam
have permission. Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Mapping a drive to a network path

2005-07-22 Thread Thierry Lam
In DOS, if I want to map a network path to a drive, I do the following: net use z: \\computer\folder How do we do something similar in python? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Re: Mapping a drive to a network path

2005-07-22 Thread Thierry Lam
Thanks, that helps. Thierry -- http://mail.python.org/mailman/listinfo/python-list

Reading output from standard out

2005-05-02 Thread Thierry Lam
Lets say I have a python program which prints output to standard out, lets call it HelloApp. How do I capture these outputs from the python GUI tkinter? For example, I want to call HelloApp from my GUI program and I want to send the output live to a tkinter text area. Thanks Thierry

Reading output from standard out

2005-05-02 Thread Thierry Lam
Lets say I have a python program which prints output to standard out, lets call it HelloApp. How do I capture these outputs from the python GUI tkinter? For example, I want to call HelloApp from my GUI program and I want to send the output live to a tkinter text area. Thanks Thierry