Re: Cocoa, httplib and threads?

Greg Ewing <[email protected]>
Newsgroups gmane.comp.python.pyobjc.devel
Message-ID <[email protected]>
This is getting extremely weird. It turns out that the
thread is hanging on the following line in httplib.py:

       host_enc = self.host.encode("ascii")

where the string being encoded in my test case is
'127.0.0.1'.

I can't for the life of me imagine what the ascii codec
could be doing to cause a thread to block.

Can anyone with more knowledge of the codec system
shed any light?

Some more data points:

* It doesn't happen when Cocoa is used in a simple way
   (just create an NSApplication and call its run() method).

* It also doesn't happen if I just create a PyGUI Application
   object and call its run() method.

So it's something about my big complicated PyGUI app... :-(

> Speaking of Cocoa. I don't know if you're doing anything that really requires
> threaded programming or python networking. If not, consider using the
> asynchronous Cocoa networking APIs.

This needs to be cross-platform, so I can't rely on anything
Cocoa-specific.

-- 
Greg

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.