Re: AttributeError: 'module' object has no attribute 'HTTPSHandler'

2007-08-10 Thread [EMAIL PROTECTED]
On 8/10/07, Matt McCredie <[EMAIL PROTECTED]> wrote: > > I built and installed python 2.5 from source and when I do this: > > opener = urllib2.build_opener(SmartRedirectHandler(), > > DefaultErrorHandler(), urllib2.HTTPSHandler()) > > I get this error. > > AttributeError: 'module' object has no att

[no subject]

2007-08-10 Thread Christian Justo
Hi, I'm simply trying to get mod_python working on my apache server but when I create a .py file the output returned from the browser is the code in the file and not just the output from the script. I have read the manual and tried mptest.py with an .htaccess file both in /var/www/html/ and st

Re: Python Dies on "make install"

2007-08-10 Thread fartknuckle
On Fri, 10 Aug 2007 23:39:39 +0200, Jarek Zgoda wrote: > fartknuckle : > >> When I try to build and install python from source It configures and >> makes fine but upon 'make install' I always get to this >> point: >> >> >> >> Listing /usr/local/lib/python2.5/xml/sax ... >> Compiling /usr/loca

Re: float to string with different precision

2007-08-10 Thread Roger Miller
On Aug 10, 8:37 am, Zentrader <[EMAIL PROTECTED]> wrote: > > If the above does not work > [/code]test_list = [ 5.32, 10.35634, 289.234 ] > for num in test_list : >str_num = "%11.5f" % (num) ## expand to at least 5 >print str_num, "-->", str_num.strip()[:5][/code] This has the disadva

Re: The Future of Python Threading

2007-08-10 Thread Justin T.
On Aug 10, 10:34 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > >I'm not an expert, but I understand that much. What greenlets do is > >force the programmer to think about concurrent programming. It doesn't > >force them to think about real threads, which is good, because a > >computer shoul

Error calling module

2007-08-10 Thread fartknuckle
When I try to call gtk like so: import gtk I get the error: ImportError: No module named gtk I installed a new Python and a new pygtk. Is the gtk module not a part of pygtk??? I have PYTHONPATH=/usr/local/lib/python2.5/site-packages set. So what am I doing wrong? Thanks -- Take summa dis

Re: Threaded Design Question

2007-08-10 Thread half . italian
On Aug 9, 9:45 pm, "Mark T" <[EMAIL PROTECTED]> wrote: > <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > > Hi all! I'm implementing one of my first multithreaded apps, and have > > gotten to a point where I think I'm going off track from a standard > > idiom. Wondering if

Threading

2007-08-10 Thread Pablo Yabo
Hello, I'm trying to call Python routines from C/C++. These routines must intereact in a multi-thread environment. I mean that routine A will loop waiting for a condition of routine B. This condition are coded in C so I don't need routine A running in the same interpreter of routine B. I tried u

Re: Extending logging module

2007-08-10 Thread Richard Levasseur
On Aug 9, 9:08 am, jay <[EMAIL PROTECTED]> wrote: > Hello, > > I've been using the python logging module a lot lately, and I've come > across an instance where I need some new levels. Specifically, python > does not include ALERT and NOTICE in the default set of logging > levels. I am wondering h

Re: wxPython - drawing without paint event

2007-08-10 Thread glenn . chappell
On Aug 10, 1:40 am, 7stud <[EMAIL PROTECTED]> wrote: > On Aug 9, 7:46 pm, Matt Bitten <[EMAIL PROTECTED]> wrote: > > > I've got a wxPython program that needs to do some drawing on a DC on a > > regular basis And there is no event, > > so my code doesn't get called. What do I do? > > Then the ev

Weekly Python Patch/Bug Summary

2007-08-10 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 404 open ( +0) / 3855 closed ( +8) / 4259 total ( +8) Bugs: 1065 open ( +6) / 6790 closed ( +6) / 7855 total (+12) RFE : 263 open ( +0) / 295 closed ( +0) / 558 total ( +0) New / Reopened Patches __ MSVC++8 x

Re: The Future of Python Threading

2007-08-10 Thread Beorn
Btw, although overly simple (single CPU system!), this benchmark is pretty interesting: http://muharem.wordpress.com/2007/07/31/erlang-vs-stackless-python-a-first-benchmark/ About the GIL: I think I've heard Guido say the last attempt at removing the Global Interpreter Lock (GIL) resulted in

Hex editor - Python beginner's code open to review

2007-08-10 Thread CC
Hi: http://web.newsguy.com/crcarl/python/hexl.py This is my first Python program other than tutorial code snippet experimentation. I chose a hex line editor. I may do a hex screen editor once this is done, if I feel like playing with the curses module. Or move straight to wxPython. This i

Re: The Future of Python Threading

2007-08-10 Thread Seun Osewa
> I think I've heard Guido say the last attempt at removing the Global > Interpreter Lock (GIL) resulted in a Python that was much slower... What is it about Python that makes a thread-safe CPython version much slower? Why doesn'ttrue threading slow down other languages like Perl and Java? I'm t

Re: The Future of Python Threading

2007-08-10 Thread Paul Rubin
Seun Osewa <[EMAIL PROTECTED]> writes: > What is it about Python that makes a thread-safe CPython version much > slower?... > I'm thinking it might be the reference counting approach to memory > management... Yes. In the implementation that was benchmarked, if I understand correctly, every refco

Re: Help with Dictionaries and Classes requested please.

2007-08-10 Thread Alex Martelli
Sion Arrowsmith <[EMAIL PROTECTED]> wrote: > special_dragonfly <[EMAIL PROTECTED]> wrote: > >if key in FieldsDictionary: > >FieldsDictionary[key].append(FieldClass(*line.split(","))) > >else: > >FieldsDictionary[key]=[FieldClass(*line.split(","))] > > These

Re: Something in the function tutorial confused me.

2007-08-10 Thread Alex Martelli
greg <[EMAIL PROTECTED]> wrote: > Steve Holden wrote: > > > For some reason your reply got right up my nose, > > I'm sorry about that. Sometimes it's hard to judge the > level of experience with Python that a poster has. In Because of this, a Google search for " " python may sometimes help;

Re: Something in the function tutorial confused me.

2007-08-10 Thread Alex Martelli
Neil Cerutti <[EMAIL PROTECTED]> wrote: ... > The Python Language Reference seems a little confused about the > terminology. > > 3.4.7 Emulating numeric types > 6.3.1 Augmented assignment statements > > The former refers to "augmented arithmetic operations", which I > think is a nice termi

Re: Destruction of generator objects

2007-08-10 Thread Alex Martelli
Stefan Bellon <[EMAIL PROTECTED]> wrote: > On Thu, 09 Aug, Graham Dumpleton wrote: > > > result = application(environ, start_response) > > try: > > for data in result: > > if data:# don't send headers until body appears > > write(data) > > i

Re: Threaded Design Question

2007-08-10 Thread greg
[EMAIL PROTECTED] wrote: > I ended up taking this route for the most part. The worker thread > first moves the file to be processed into a temp directory, No, the watcher thread should do this itself *before* putting it into the work queue. Then there's no chance of it picking up the same file tw

<    1   2