Re: urllib2 timeout issue

2013-10-18 Thread Jérôme
call it a bug in urllib2, but I won't allow myself to do that until I've understood the explanation on SO. -- Jérôme -- https://mail.python.org/mailman/listinfo/python-list

Re: urllib2 timeout issue

2013-10-17 Thread Jérôme
e DNS delays ? Is there absolutely nothing I can do from the software side to limit this delay and give up if no answer is received before a second has passed ? -- Jérôme -- https://mail.python.org/mailman/listinfo/python-list

urllib2 timeout issue

2013-10-16 Thread Jérôme
: instantaneous on Debian, 10 secondes on RPi. I also added this, as suggested on some StackOverflow pages : import socket socket.setdefaulttimeout(5) and it didn't make any difference. In both cases, Python version is "Python 2.7.3". Am I missing something ? Thanks.

Re: generate Windows exe on Linux

2012-02-22 Thread Jérôme
chard creates executables from python scripts using a tool, such as py2exe [1], that requires windows. He would like to have an equivalent tool that runs on linux, to avoid going through the trouble of having to run a windows installation. I'm interested in such a tool as well. [1] http:

Re: First python project : Tuner

2012-01-26 Thread Jérôme
Fri, 20 Jan 2012 12:13:30 +0200 Anssi Saari a écrit: > Jérôme writes: > > > - I tried to clarify the dependencies of my program by adding > > "PyGObject (python-gi)." > > I believe PyGObject is the name, but python-gi being the name of the > > de

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Jérôme
time, on the upper "RIGHT" corner of the rejection > | page, i saw the following message: "your registration > | violated our anti-spam filter. > | > | If | i neither disable buffering nor manually flush after > | each print, the | program just hangs instead of printing > | "RIGHT" away. > | > | I play a lot of flash games, and "RIGHT" now i'm playing > | one that has coped poorly with a miniature slashdotting. > | > | The map() function is very similar to a generator > | expression, but it can iterate over multiple iterables at > | once: list(map(lambda x,y: x+y,[1,2,3],[40,50,60])) [41, > | 52, 63] note how the lambda keeps the code "RIGHT" there, > | whereas a def would separate it out. > | > | Yellow)# the "RIGHT" window line((x + 60, y + 71), > | (x + 80, y + 71), color=color. > | > | It is like the fortran example (just to show the syntax, > | has an infinite loop), everyone can understand that > | "RIGHT" away, even non fortran people: 10 loop1: do i=1,3 > | loop2: do j=1,4 print *,i,j goto 10 ! > | There's to much of it. I'm stopping here. Perhaps should you difficult-code some subsitution strings in your mail client, as of correct now. Have a nice day, guys. ---> [] -- Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Re: First python project : Tuner

2012-01-19 Thread Jérôme
Tue, 17 Jan 2012 15:16:01 +0100 Jérôme a écrit: > Hi all. > > Like others before me, I'd like to show you my first python attempt, in the > hope in can get advices on how to improve my coding. Hi. Thank you for your useful advices. - I tried to clarify the dependencies of my

Re: First python project : Tuner

2012-01-17 Thread Jérôme
here is still a lot of trial and error and sometimes my criterion ends up being "does it works or does it not", whithout comprehensive understanding. > otherwise your code looks very nice to me, though I just had a very > quick look ;) Thank you for the feedback. -- Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Re: First python project : Tuner

2012-01-17 Thread Jérôme
Here's an html rendering : http://devs.jolimont.fr/tuner/downloads/tuner_v2_0.py.html This is done with gvim. Too bad it lacks line numbering. -- Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Re: First python project : Tuner

2012-01-17 Thread Jérôme
Tue, 17 Jan 2012 08:48:13 -0800 (PST) Rick Johnson a écrit: > On Jan 17, 8:16 am, Jérôme wrote: > > > Any comment is welcome, be it about code optimization, coding style, > > pythonification, good practices, or simply program features and usability. > > Step one would

First python project : Tuner

2012-01-17 Thread Jérôme
to be. Any comment is welcome, be it about code optimization, coding style, pythonification, good practices, or simply program features and usability. Thanks. -- Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Jérôme
an audio library some day but I was merely interested in the way signalling and processes work. Thanks again. -- Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Jérôme
Tue, 3 Jan 2012 17:24:44 +0100 Jérôme a écrit: > > Too many libraries do too many questionable things with signal handlers > > so I find it much safer and easier just to avoid the damn things whenever > > possible. > > My small program _seems to_ work with the dirty

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Jérôme
Tue, 3 Jan 2012 07:03:08 -0800 (PST) Adam Skutt a écrit: > On Jan 3, 4:38 am, Jérôme wrote: > > I have an application that can spawn a subprocess to play a beep. I want > > it to kill the subprocess when exiting. > > Why? You shouldn't need to send a signal to tell

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Jérôme
ot;) (I'd need to figure out how to write Ctrl+C...) Would that be cross-platform ? -- Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Jérôme
Tue, 3 Jan 2012 19:58:57 +1100 Chris Angelico a écrit: > On Tue, Jan 3, 2012 at 7:44 PM, Jérôme wrote: > > If so, I don't see how I can protect myself from that. Checking the > > process is alive and then hoping that the time interval for the race > > condition is s

Re: Avoid race condition with Popen.send_signal

2012-01-03 Thread Jérôme
the time interval for the race condition is so small that there are few chances for that to happen (because the OS quarantines PID numbers for a while, for instance) ? -- Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Avoid race condition with Popen.send_signal

2012-01-02 Thread Jérôme
l an issue if the process ends between poll() and send_signal(). What is the clean way to avoid this race condition ? Should I use try/except to catch the error or is there a more elegant way to go ? Thanks. -- Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Re: Which library for audio playback ?

2011-12-31 Thread Jérôme
nts about jack not being running. I assume they could be tweaked to use ALSA instead. I haven't had time to dig any further. If I come up with something, I'll keep you posted. Thanks for your answer. -- Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Re: Is python.org down?

2011-12-30 Thread Jérôme
hon.org today? Is there a > > scheduled downtime? > Seems like it is down ... I downloaded the 2.7.2 Windows installer a > couple of hours ago, but now even the download page isn't accessible. http://www.python.org seems to be working, now. -- Jérôme France -- http://mail.python.org/mailman/listinfo/python-list

Which library for audio playback ?

2011-12-29 Thread Jérôme
criterions I should take into account ? Thanks. -- Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Re: Text Processing

2011-12-20 Thread Jérôme
0) + 4#seek 4 spaces #end = line.find(u"\u0009", start) end = line.find(" ", start) b_values.append(float(line[start:end].strip())) line = f.readline() print b_values It gets trickier if the amount of spaces is not constant. I would then try with

Threading issue (using alsaaudio)

2011-12-19 Thread Jérôme
be the project with the most recent updates. Yet it does not pretend to be (or aim at being) complete. Was that a sensible choice ? Would you recommend something else ? The learning curve is sometimes steep... I would be thankful for any lead. -- Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Re: Coroutines: unexpected behaviour

2010-06-16 Thread Jérôme Mainka
erful David Beazley's course [1] piqued my curiosity. But, indeed, this is a hard piece difficult to master. Thanks again, Jérôme [1] http://www.dabeaz.com/coroutines/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Coroutines: unexpected behaviour

2010-06-16 Thread Jérôme Mainka
will be the only method used resume your generator > function. This remark deals with constructions like: value = (yield i) For an excellent introduction to coroutines in python, I recommend: http://www.dabeaz.com/coroutines/ Thanks, Jérôme -- http://mail.python.org/mailman/listinfo/python-list

Coroutines: unexpected behaviour

2010-06-16 Thread Jérôme Mainka
xception comes from the pprint instruction... If i replace the main part with: == p1 = dump() p2 = sort(p1) for item in my_list: p2.send(item) == it works as expected. I don't understand what is goind wrong. Has someone an explanation for this issue? Thanks, Jérôme === from functo

Re: Problem with uuid package when embedding a python interpreter

2009-07-01 Thread Jérôme Fuselier
On Jun 30, 7:02 pm, "Gabriel Genellina" wrote: > En Tue, 30 Jun 2009 13:05:42 -0300, Jérôme Fuselier > escribió: > > > > >   I've tried to import a script in an embedded python intrepreter but > > this script fails when it imports the uuid module. I ha

Problem with uuid package when embedding a python interpreter

2009-06-30 Thread Jérôme Fuselier
Hello, I've tried to import a script in an embedded python intrepreter but this script fails when it imports the uuid module. I have a segmentation fault in Py_Finalize(). Here is a simple program which imitate my problem. main.c : #include "Python.h" void test() { Py_Initialize(); Py

Re: Have a very Pythonic Christmasolstihanukwanzaa

2005-12-25 Thread Jérôme Laheurte
On Fri, 23 Dec 2005 07:52:54 -0800, infidel wrote: > Happy holidays to my fellow Pythonistas. This will never get old. Reminds me of something on Slashdot: "Happy random day in december!" Maybe it's next year's version. Merry Christmas :) -- http://mail.python.org/mailman/listinfo/python-lis

Re: Python on GP2X (Linux Based Handheld Console)

2005-12-17 Thread Jérôme Laheurte
On Sat, 17 Dec 2005 02:50:29 +, Michael wrote: > I must admit personally I wouldn't be interested in python on a PSP because > you never know when homebrew code on a PSP is going to be locked out... Yes, but it only concerns new buyers and people who upgrade their firmware. Upgrading the firm

Re: Python on GP2X (Linux Based Handheld Console)

2005-12-16 Thread Jérôme Laheurte
On Thu, 15 Dec 2005 08:43:34 +, Michael Sparks wrote: > I hadn't seen any announcements regarding this, but there's a little > device recently released called a GP2X which is a small dual CPU > (2x200Mhz) device which runs Linux. > > Anyway, I thought there might be someone in here interested

Re: Still Loving Python

2005-12-14 Thread Jérôme Laheurte
On Wed, 14 Dec 2005 08:53:26 +, Steve Holden wrote: > It isn't often done, but I quite like the idea of giving users the GUI > builder so that they can specify their preferred task interface, at > least to a first approximation. That would be a valid use for these things, prototyping the UI

Re: Still Loving Python

2005-12-14 Thread Jérôme Laheurte
On Wed, 14 Dec 2005 12:35:56 -0600, Brian van den Broek wrote: > It seems to me that long tradition has it that "evil" in a context > such as this really is not that strong a term. See > . Thanks. Next time I'll spell it 'vil', in the hope that i

Re: Still Loving Python

2005-12-14 Thread Jérôme Laheurte
On Wed, 14 Dec 2005 08:35:56 -0800, Paul Boddie wrote: > I imagine that Jérôme was referring to code generated by pyuic. Of > course, there are various extensions for PyQt which let you build the > user interface directly from the XML-based descriptions. Indeed, that's what I m

Re: Still Loving Python

2005-12-14 Thread Jérôme Laheurte
On Wed, 14 Dec 2005 08:21:30 -0800, Daniel Crespo wrote: >> So wxPython doesn't need a runtime? I don't think so. wxPython for me >> sucks under Linux (built on gtk2) and I don't like its API at all. It >> seems a bit awkward to me. Anyway... what do you mean with "much better" ? > > It's much b

Re: Still Loving Python

2005-12-13 Thread Jérôme Laheurte
On Tue, 13 Dec 2005 17:35:40 +0100, Ivan Voras wrote: > Maybe the OP really wants a GUI builder. > More than 5 years ago, i programmed in Visual Basic and Delphi and I > still miss the wonderful ease of graphically creating the user interface > in WYSIWYG mode. If you haven't tried it, you don'

Re: os.rename copies when old is in-use - is this deliberate?

2005-12-03 Thread Jérôme Laheurte
On Sat, 03 Dec 2005 22:32:22 +1300, Tony Meyer wrote: os.rename(sys.executable, "d:\\python24.exe") What happens if you specify a destination file on the same drive as the source file ? -- http://mail.python.org/mailman/listinfo/python-list