Alright, after some more searching I figured out my answer.  First
off, the test statements I posted were wrong.  The first argument
passed to execlp is the executable name, so:
> os.execlp(self.executable_name, "-?")
Should be
> os.execlp(self.executable_name, self.executable_name, "-?")

That works now.  So I applied the same thing to the original client.py
file:
    def runshell(self):
-        args = ['']
+        args = [self.executable_name]
        db = settings.DATABASE_OPTIONS.get('db',
settings.DATABASE_NAME)
        user = settings.DATABASE_OPTIONS.get('user',
settings.DATABASE_USER)
        ...
        print "self.executable_name:", self.executable_name
        print "args:", args
        os.execvp(self.executable_name, args)
And I get this:
> self.executable_name: mysql
> args: ['mysql', '--user=test', '--password=test', 'test']
>
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 212
> Server version: 5.0.51a-community-nt-log MySQL Community Edition (GPL)
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql>

So it looks like passing '' as the first argument to execvp() on
Windows for mysql doesn't work.  If using self.executable_name as the
first arg works on other platforms, it looks like this should be
changed to fix this bug and make client.py more cross-platform.

Can anyone see if it works on unix?  Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to