Partially invalid sys.path - how can I fix it (not append to it)?

2015-09-28 Thread Pierre Rouleau
Hi, On a OS/X 101.10.5 (Yosemite) system, the system Python just got updated to 2.7.10 but it sys.path is partially invalid. How can I fix that? I don't want to add something in PYTHONPATH. I know I can create a softlink at the invalid location to where the real files are located.I just w

Re: Any reason www.python.org is slow?

2010-07-10 Thread Pierre Rouleau
> > It is possible that the way Linux (or some Linux setups: many of the > recipes above are for Ubuntu, I use Mandriva myself) handles IPv6 > "connectivity" is suboptimal in some cases, and that connection > attempts don't fail immediately when they should. I don't have enough > knowledge to diag

Re: Any reason www.python.org is slow?

2010-07-10 Thread Pierre Rouleau
On Jul 10, 9:48 am, Antoine Pitrou wrote: > On Sat, 10 Jul 2010 06:30:11 -0700 (PDT) > > > I have been finding python.org site very slow for the last year and > > probably before. Is there any known reason why the site is slow? > > For the last year?? > It's been mostly zippy here. > Is IPv6 enab

Any reason www.python.org is slow?

2010-07-10 Thread Pierre Rouleau
All, I have been finding python.org site very slow for the last year and probably before. Is there any known reason why the site is slow? I tried accessing it from several locations and I always get to wait several seconds for a page to load (in any browser/OS). Thanks -- Pierre -- http://mail

Re: os.popen3 hangs in Windows XP SP1, SP2. Python 2.5 & 2.4. Consistent test case.

2006-12-12 Thread Pierre Rouleau
On Dec 12, 10:11 am, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Pierre Rouleau wrote: > > Hi all, > > > I have a consistent test case where os.popen3() hangs in Windows. The > > system hangs when retrieving the lines from the child process stdout. > > I kno

os.popen3 hangs in Windows XP SP1, SP2. Python 2.5 & 2.4. Consistent test case.

2006-12-11 Thread Pierre Rouleau
nt '- CMD 1 , stdout print : HANGS ---' stdout, stderr_lines, pgm_exit_code = popen3(cmd1, print_stream, list) print 'stderr_lines: ', stderr_lines print 'program exit code : ', pgm_exit_code # - -- Pierre Rouleau -- http://mail.python.org/mailman/listinfo/python-list

Python 2.4 does not marshal infinity floating point properly under Win32

2006-11-30 Thread Pierre Rouleau
\dev\python\test>t_marshal Nan: 0x67 0x0 0x0 0x0 0x0 0x0 0x0 0xf8 0xff : g Infinity : 0x67 0x0 0x0 0x0 0x0 0x0 0x0 0xf0 0x7f : g...¦ Infinity : 0x67 0x0 0x0 0x0 0x0 0x0 0x0 0xf0 0x7f : g...¦ Infinity : 0x67 0x0 0x0 0x0 0x0 0x0 0x0 0xf0 0x7f : g.

Re: atexit.register does not return the registered function. IMHO, it should.

2006-11-16 Thread Pierre Rouleau
On 11/16/06, Skip Montanaro <[EMAIL PROTECTED]> wrote: > > Since that the decorator syntax is upon us, I think it would be good if > > atexit.register() was returning the function passed as argument. This > > simple change to the library would solve a problem with the use of > > atexit.register as

Re: Is the only way to connect Python and Lua through a C interface?

2006-05-16 Thread Pierre Rouleau
Casey Hawthorne wrote: > Is the only way to connect Python and Lua through a C interface? Take a look at Lunatic Python (http://labix.org/lunatic-python) -- Pierre Rouleau -- http://mail.python.org/mailman/listinfo/python-list

Re: Can we create an_object = object() and add attribute like fora class?

2006-04-29 Thread Pierre Rouleau
Fredrik Lundh wrote: > Pierre Rouleau wrote: > > >>I can understand the design decision not to give object a __dict__, but >>I wonder if i'd be a good idea to have a class that derives from object >>and has a __dict__ to be in the standard library. > > &g

Re: Can we create an_object = object() and add attribute like for a class?

2006-04-29 Thread Pierre Rouleau
Alex Martelli wrote: > Pierre Rouleau <[EMAIL PROTECTED]> wrote: > > >>Hi all, >> >>Is there any reason that under Python you cannot instantiate the object >>class and create any attributes like you would be able for a normal class? > > > Yep:

Can we create an_object = object() and add attribute like for a class?

2006-04-29 Thread Pierre Rouleau
pass ... >>> a = Object() >>> a.data = 1 >>> print "a.data = ", a.data a.data = 1 >>> >>> class Object2(object): ... pass ... >>> b = Object2() >>> b.data = 2 >>> b.data 2 I also tried with Python 2.4.3 with the same results. Being able to do it would seem a natural way of declaring namespaces. -- Pierre Rouleau -- http://mail.python.org/mailman/listinfo/python-list

Re: Why is Python not supporting full derivation of built-in file class?

2005-04-25 Thread Pierre Rouleau
Jeff Epler wrote: This issue was discussed in another recent python-list thread, called "Writing to stdout and a log file". My second post includes a patch to Python's "fileobject.c" that made the code that started that thread work, but for reasons I mentioned in that post I didn't want to push for

Why is Python not supporting full derivation of built-in file class?

2005-04-23 Thread Pierre Rouleau
> >>> dg = DelegatedFile("temp.txt","w") >>> hello(dg) >>> dg.close() >>> dg.strings ['Bonjour!', '\n'] >>> for line in file("temp.txt"): print line ... Bonjour! >>> df = DerivedFile("temp2.txt","w") >>> hello(df) >>> df.close() >>> df.strings [] >>> for line in file("temp2.txt"): print line ... Bonjour! >>> >>> sf <__main__.StringFile instance at 0x008D86C0> >>> dg <__main__.DelegatedFile object at 0x008D50B0> >>> df >>> -- Pierre Rouleau -- http://mail.python.org/mailman/listinfo/python-list

Problem deriving a class from the built-in file object

2005-04-22 Thread Pierre Rouleau
Hi all! I'm trying to extend the functionality of the file object by creating a class that derives from file. MyFile class re-implements __init__(), write(), writelines() and close() to augment the capabilities of file. All works fine, except for one thing: 'print >> myfile' does not execute