Problem with case insensitive volumes

2009-05-04 Thread dmoore
Does anyone know of a way to get the unique pathname for files stored on FAT32 or other case insensitive drives? For example: os.path.samefile('/media/usbkey/file1.jpg','/media/usbkey/FILE1.jpg') returns True but, is there a simple way to determine whether '/media/usbkey/ file1.jpg' or '/media/

Re: Embedding/Extending Python in/with C++: non-static members?

2007-07-19 Thread dmoore
thanks for the responses Nick and "AnonMail" > I'm doing a similar thing, and I would imagine others are also. > > 1. In a python file, set up wrapper functions that the python user > actually uses (e.g FunctionA). Each function corresponds to a > particular C/C++ extension function that you are

Re: Embedding/Extending Python in/with C++: non-static members?

2007-07-17 Thread dmoore
(I thought I'd follow up on this post so as not to send unsuspecting readers down a hopeless path) duh! I've obviously spent too much time with dynamic languages. The problem with what I'm trying to do is obvious: In C++ you simply can't pass pointers to call a particular instance of a C++ class

Embedding/Extending Python in/with C++: non-static members?

2007-07-16 Thread dmoore
Hi Folks: I have a question about the use of static members in Python/C extensions. Take the simple example from the "Extending and Embedding the Python Interpreter" docs: A simple module method: static PyObject * spam_system(PyObject *self, PyObject *args) { ... } listed in a method table: s

Re: Bug/Weak Implementation? popen* routines can't handle simultaneous read/write?

2007-06-08 Thread dmoore
On Jun 8, 12:30 pm, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > Windows has a really strange idea of non-blocking IO - it uses > something called overlapped io. You or in the FILE_FLAG_OVERLAPPED > flag when you create the file/pipe. You then pass in overlap buffers > for reading writing. > the

Re: Bug/Weak Implementation? popen* routines can't handle simultaneous read/write?

2007-06-07 Thread dmoore
r interest parties feel free to step up. cheers Damien On Jun 7, 8:59 pm, Noah <[EMAIL PROTECTED]> wrote: > On Jun 7, 9:01 am, dmoore <[EMAIL PROTECTED]> wrote: > > popen and friends will never do what you want it to do. Down that path > lies bitter disappointment. > You

Bug/Weak Implementation? popen* routines can't handle simultaneous read/write?

2007-06-07 Thread dmoore
Hi folks, I've seen the following issue come up in multiple posts to this mailing list: I have a python program that spawns a child process with popen or popen2 or popen3 or popen2.popen2 etc. the child process is interactive: it asks for input then spits out some output, asks for more input then