Making extension modules play nice with help()?

2009-02-17 Thread Nicholas Bastin
I've always provided doc strings through PyMethodDef in the past, without paying much attention to what happens in help() - they print fine when you just use the doc string. However, in help, you end up with methods that have an indeterminate signature. We generally make doc strings that look

Re: Python on Leopard issues

2007-11-08 Thread Nicholas Bastin
On Nov 8, 2007 4:59 PM, Nicholas Bastin [EMAIL PROTECTED] wrote: Also, Apple distributes the standard library in a zip file, so you won't find all the packages just lying around. They should all be stored in /Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip. I'll eat my

Re: Python on Leopard issues

2007-11-08 Thread Nicholas Bastin
On Nov 8, 2007 4:13 PM, Chris [EMAIL PROTECTED] wrote: Are others having fundamental issues on OSX 10.5 with python 2.5.1? I was excited that Python 2.5 was included, but this excitement was very short lived. Almost nothing works. Upon startup I get this message: 'import site' failed; use -v

Re: C++ version of the C Python API?

2007-10-21 Thread Nicholas Bastin
On 10/21/07, Carl Banks [EMAIL PROTECTED] wrote: Now, a C++ API for CPython would necessarily be built on top of the C API, which carries some limitations relative to the OOP abilities of C++ itself. It wouldn't have to be, although it'd be much more of a maintenance nightmare if it poked into

Re: C++ version of the C Python API?

2007-10-21 Thread Nicholas Bastin
On 10/21/07, Robert Dailey [EMAIL PROTECTED] wrote: On 10/21/07, Martin v. Löwis [EMAIL PROTECTED] wrote: No, I literally meant that the Python C API is object-oriented. You don't need an object-oriented language to write object-oriented code. I disagree with this statement. C is not an

Re: pytz has so many timezones!

2007-10-09 Thread Nicholas Bastin
On 10/9/07, Sanjay [EMAIL PROTECTED] wrote: It's not clear at all from the OPs post exactly what functionality he is trying to derive from the timezone. Since timezones (obviously) contain more information than just the GMT offset (otherwise we wouldn't even have them), he may very well

Re: pytz has so many timezones!

2007-10-09 Thread Nicholas Bastin
On 10/9/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Oct 8, 8:27?pm, Nicholas Bastin [EMAIL PROTECTED] wrote: On 10/8/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Because they publish maps? I'm not sure what this has to do with it. Maybe you've never had to navigate? I don't

Re: Mixing Python and C classes in a module

2007-10-09 Thread Nicholas Bastin
On 10/9/07, Chris Mellon [EMAIL PROTECTED] wrote: On 09 Oct 2007 16:56:30 +0200, Stefan Arentz [EMAIL PROTECTED] wrote: Is it possible to mix classes defined in both Python and C in the same module? Ideally I would like to be able to do: from some.module import MyPythonClass, MyCClass

Re: pytz has so many timezones!

2007-10-08 Thread Nicholas Bastin
On 10/8/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: What do you mean by the military and why do you think they're authoritative on the topic of timezones? Because they publish maps? I'm not sure what this has to do with it. but as far as I know they don't define timezones. Ok, maybe

Re: Cross platform way of finding number of processors on a machine?

2007-10-07 Thread Nicholas Bastin
On 10/6/07, Lawrence Oluyede [EMAIL PROTECTED] wrote: John [EMAIL PROTECTED] wrote: Is there a way to find the number of processors on a machine (on linux/ windows/macos/cygwin) using python code (using the same code/cross platform code)? From processing

Re: supplying password to subprocess.call('rsync ...'), os.system('rsync ...')

2007-10-07 Thread Nicholas Bastin
On 05 Oct 2007 16:23:50 GMT, Stargaming [EMAIL PROTECTED] wrote: On Fri, 05 Oct 2007 08:37:05 -0700, timw.google wrote: I can't ssh w/o supplying a password. That's the way the security is set up here. How do I use python to do this, or do I just have to write a zsh script? Thanks.

Re: Problem using subprocess.Popen on windows

2007-10-07 Thread Nicholas Bastin
On 10/7/07, jorma kala [EMAIL PROTECTED] wrote: from subprocess import * p1 = Popen([dir], stdout=PIPE) output = p1.communicate()[0] But I get a WindowsError : [Error 2] File Not Found Tim answered your actual question, but why are you doing this in the first place? The Python

Re: Cross platform way of finding number of processors on a machine?

2007-10-04 Thread Nicholas Bastin
On 10/4/07, John [EMAIL PROTECTED] wrote: Is there a way to find the number of processors on a machine (on linux/ windows/macos/cygwin) using python code (using the same code/cross platform code)? There's no single call that will give you the same info on every platform, but you can obviously

Re: Python 3.0 migration plans?

2007-10-04 Thread Nicholas Bastin
On 9/27/07, Steve Holden [EMAIL PROTECTED] wrote: I wondered if a straw poll could get some idea of readers' thoughts about when they will be migrating to 3.0 on, so I used the new widget on Blogger to add a poll for that. I'd appreciate if if you would go to

Re: Howto Launch a windows application ?

2007-10-04 Thread Nicholas Bastin
On 10/3/07, stef mientki [EMAIL PROTECTED] wrote: hello, I'm trying to launch a windows application, but as many others on this list, I've some trouble. I read some other threads about this topic, but sorry, I still don't understand all this (never heard of pipes). When I use a batch file,

Re: Real time plot

2007-10-04 Thread Nicholas Bastin
On 10/4/07, Jean-Francois Canac [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] I would draw dots on a suitably sized Tkinter canvas, after drawing a schematic of the race track (laborious). 20 per second will be no problem, provided the machine is half decent. What is the speed at which