[issue14708] distutils's checking for MSVC compiler

2012-05-02 Thread jamesf

New submission from jamesf <54740...@qq.com>:

I am using python 2.7.2 installed via the pre-built installer package, and my 
SDK version is v7.1.

1) The MSSdk environment variable is not set by lastest SDK's SetEnv.cmd 
anymore, but distutils still check for it.

2) I have also install MSVC 2010 Express Edition, and its vcvarsall.bat
can't be found.

Off-side question:
a) Can i use different version of MSVC from which python is built for extension 
development ?
b) Can i use mingw compiler to develop extension for the pre-built windows 
binary python ?

--
messages: 159833
nosy: jwfang
priority: normal
severity: normal
status: open
title: distutils's checking for MSVC compiler
type: behavior
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue14708>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14708] distutils's checking for MSVC compiler

2012-05-03 Thread jamesf

jamesf <54740...@qq.com> added the comment:

Thanks for your replying.

Here is my understanding of how the compiler chosen logic works, correct me if 
i am wrong:
1) If using MSVC, we should ALWAYS stick the compiler to the version which 
python was compiled with;
2) But we can change SDK version through DISTUTILS_USE_SDK with SetEnv.cmd 
already called.
3) It's the compiler version that matters, not SDK version.

But from distutils source:

if "DISTUTILS_USE_SDK" in os.environ and "MSSdk" in os.environ and ...:
^
does this mean i can not use lastest SDK since it does not set MSSdk variable?

--

___
Python tracker 
<http://bugs.python.org/issue14708>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16186] shlex bug?

2012-10-10 Thread jamesf

New submission from jamesf:

In [112]: def test_ws(s):
   .: sl = shlex.shlex(s)
   .: sl.whitespace = "|"
   .: sl.whitespace_split = True
   .: print list(sl)


In [114]: test_ws("h w")   # works fine
['h w']

In [115]: test_ws("'h' w")  # i expected ["'h' w"] here, but why?
["'h'", ' w']

--
messages: 172573
nosy: jwfang
priority: normal
severity: normal
status: open
title: shlex bug?
type: behavior
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue16186>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16186] shlex bug?

2012-10-10 Thread jamesf

jamesf added the comment:

but if i did this, it works again:

In [121]: test_ws(" 'h' w")  # prepend a whitespace at the beginning
[" 'h' w"]

--

___
Python tracker 
<http://bugs.python.org/issue16186>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16364] datetime.strftime and locale.getdefaultlocale conflict on Windows ?

2012-10-30 Thread jamesf

New submission from jamesf:

on windows(windows 7), python 2.7.3 compiled with VS 2008 and code page "cp936".

locale.getdefaultlocale call Win32 API GetACP and return "cp936",
but a small test program return "C" from 'getlocale' CRT function.
I am not sure if this behaviour is expected or bug?

It seems that datetime.strftime call the CRT function strftime to
do the real work, since the CRT locale is C, it use that to format
locale dependent directive like "%B" and "%x"; 
But since locale.getdefaultlocale return "cp936", so i expect
datetime.strftime to return locale formatted string.

--
components: Library (Lib)
messages: 174203
nosy: jwfang
priority: normal
severity: normal
status: open
title: datetime.strftime and locale.getdefaultlocale conflict on Windows ?
type: behavior
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue16364>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16364] datetime.strftime and locale.getdefaultlocale conflict on Windows ?

2012-10-30 Thread jamesf

jamesf added the comment:

i just found that locale.getlocale does return (None, None),
maybe defaultlocale just return the DEFAULT, which is the hints.

i will use locale.setlocale in my app, so close this issue.

--
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue16364>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com