[issue3928] os.mknod missing on Solaris

2008-09-22 Thread Erik Sandberg
New submission from Erik Sandberg <[EMAIL PROTECTED]>: When building Python on Solaris, I don't get the os.mknod function. This seems to be a combination of two errors: 1. The definition of posix_mknod() in posixmodule.c is surrounded by: #if defined(HAVE_MKNOD) && defined(HAV

[issue3963] Problems when calling exec from a function

2008-09-25 Thread Erik Sandberg
New submission from Erik Sandberg <[EMAIL PROTECTED]>: When an exec statement called from a function f defines a top-level function g, the body of g cannot access the top-level symbols defined by the exec statement (which also happen to be the local variables of f). Example: x = 2

[issue3963] Problems when calling exec from a function

2008-09-25 Thread Erik Sandberg
Erik Sandberg <[EMAIL PROTECTED]> added the comment: Thanks! Passing an explicit global namespace solves the problem and is something I wanted to do anyways, when I think about it. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue6450] normpath() sometimes maps unicode to str

2009-07-09 Thread Erik Sandberg
New submission from Erik Sandberg : On Linux, I get the following: >>> import os >>> os.path.normpath(u'/') '/' I would expect unicode to be mapped to unicode. os.path.abspath() has the same problem, see also issue 3426. This causes problems in my

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-10-14 Thread Erik Sandberg
Erik Sandberg added the comment: An alternative solution which I would have considered, is to extend stat/fstat on Windows to set st_dev and st_ino to sensible values (based on dwVolumeSerialNumber and nFileIndexLow/High), and then use the POSIX implementations of samefile/sameopenfile. There

[issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis

2009-03-13 Thread Erik Sandberg
New submission from Erik Sandberg : When subprocess.call is told to execute a .bat file on Windows, and the path to the batch file is given as an absolute path, and the path includes a left parenthesis ('('), then the call fails with a message similar to the following; it appear

[issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis

2009-03-13 Thread Erik Sandberg
Erik Sandberg added the comment: I'm using Python 2.5.1, by the way. -- ___ Python tracker <http://bugs.python.org/issue5484> ___ ___ Python-bugs-list m

[issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis

2009-03-13 Thread Erik Sandberg
Erik Sandberg added the comment: I have narrowed down the problem further: The same error happens with the following code: import win32process win32process.CreateProcess(None, 'f(o.bat', None, None, 1, 0, None, None, win32process.S

[issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis

2009-03-13 Thread Erik Sandberg
Erik Sandberg added the comment: argh, it seems that the problem is in how CreateProcess works; exactly the same error can be provoked from C. -- Added file: http://bugs.python.org/file13321/parenbug.c ___ Python tracker <http://bugs.python.

[issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis

2009-03-13 Thread Erik Sandberg
Erik Sandberg added the comment: I experimented further, the only way to run a .bat file whose name contains funny characters, seems to be: subprocess.call('""f(o.bat""', shell=True) -- ___ Python tracker <

[issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis

2009-03-13 Thread Erik Sandberg
Erik Sandberg added the comment: Did you test your code? I'm pretty sure I tried almost exactly the code you suggest, and got an error like "'t' is not recognized as an internal or external command...' (I cannot test this right now as I don't have access to Wind

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

2009-05-10 Thread Erik Sandberg
New submission from Erik Sandberg : It would be nice if samefile / sameopenfile was present on Windows. Right now I usually work around this by keeping a platform-specific hack for Windows that approximates samefile by comparing normalized paths; this is ugly and doesn't handle junc