From: Ray Slakinski <ray.slakinski@gm...> - 2005-12-13 12:14:31
-----BEGIN PGP SIGNED MESSAGE-----
I'm attempting to write a small script that downloads a file using
pyObjc instead of httplib/urlib/urlib2 that has a text based progress
indicator. Is this even possible with pyObjc? any pointers would be
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
From: Bill Bumgarner <bbum@ma...> - 2005-12-13 17:08:37
On Dec 13, 2005, at 4:16 AM, Ray Slakinski wrote:
> I'm attempting to write a small script that downloads a file using
> pyObjc instead of httplib/urlib/urlib2 that has a text based
> progress indicator. Is this even possible with pyObjc? any
> pointers would be very helpful!
Assuming PyObjC on Mac OS X in a context with an active run loop
(say, Cocoa), I would suggest using the NSURL downloading
mechanisms. Works well, just don't get the threads crossed.
Alternatively, twisted works really well.
In all cases, you can hook 'em up to an NSProgressIndicator.
For command line stuff, Twisted or NSURL will both work, too.