-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
platform.version() don't work as expected in Vista in portuguese #47660
Comments
Using Vista in Portuguese platform.version is returning "32bits" To solve this issue simple change: 'Version ([\d.]+))') for '\S+ ([\d.]+))') |
Could you please check whether this is still the case with the current http://svn.python.org/view/python/trunk/Lib/platform.py?rev=64233&view=markup |
I tried platform.version() on a non-English Vista and XP and I got |
Ezio Melotti wrote:
Could you please run the platform function win32_ver() through |
The Vista machine is running Py 2.5.2 but is not mine so I can't Here on WinXP with 2.6 I get ('XP', '5.1.2600', 'SP2', u'Uniprocessor On Monday I'll have access to more Windows machines (including Vista) |
Ezio Melotti wrote:
Interesting. Looking at the code in win32_ver() should be getting
Do you have the win32 tools installed on that machine ? This could
Please check the results of win32_ver() on those machines. The Thanks,Marc-Andre Lemburg ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 |
On my XP machine I have them installed for Py 2.4 only, "import I'll let you know about the result of win32_ver() on the other machines. |
Here are the results.
Windows Vista SP2 in English
Python 3.0.1:
>>> platform.platform()
'Windows-Vista-6.0.6002-SP2'
>>> platform.version()
'6.0.6002'
>>> platform.win32_ver()
('Vista', '6.0.6002', 'SP2', 'Multiprocessor Free')
Python 2.6.2:
>>> platform.platform()
'Windows-Vista-6.0.6002-SP2'
>>> platform.version()
'6.0.6002'
>>> platform.win32_ver()
('Vista', '6.0.6002', 'SP2', u'Multiprocessor Free')
Windows 2003 Server SP2 in English
Python 3.1
>>> platform.platform()
'Windows-2003Server-5.2.3790-SP2'
>>> platform.version()
'5.2.3790'
>>> platform.win32_ver()
('2003Server', '5.2.3790', 'SP2', 'Uniprocessor Free') Everything seems fine, however I don't have any non-English Windows |
Ezio Melotti wrote:
> Ezio Melotti <ezio.melotti@gmail.com> added the comment:
>
> Here are the results.
> Windows Vista SP2 in English
> Python 3.0.1:
> >>> platform.platform()
> 'Windows-Vista-6.0.6002-SP2'
> >>> platform.version()
> '6.0.6002'
> >>> platform.win32_ver()
> ('Vista', '6.0.6002', 'SP2', 'Multiprocessor Free')
>
> Python 2.6.2:
> >>> platform.platform()
> 'Windows-Vista-6.0.6002-SP2'
> >>> platform.version()
> '6.0.6002'
> >>> platform.win32_ver()
> ('Vista', '6.0.6002', 'SP2', u'Multiprocessor Free')
>
> Windows 2003 Server SP2 in English
> Python 3.1
> >>> platform.platform()
> 'Windows-2003Server-5.2.3790-SP2'
> >>> platform.version()
> '5.2.3790'
> >>> platform.win32_ver()
> ('2003Server', '5.2.3790', 'SP2', 'Uniprocessor Free') Thanks.
Indeed.
I'm not sure whether that would make a difference. On XP this does not make a difference - I've tested this with I think the best strategy is to run win32_ver() through the BTW: Do you have the win32 tools installed on that machine ? |
On the Vista machine that returned ('', '6.0.6002', 'SP2', I managed to run pdb on it and the result was http://dpaste.com/hold/63642/ However, I also tried to run what the OP said and indeed I found some
where _ver_output = re.compile(r'(?:([\w ]+) ([\w.]+) ' In non-English versions instead the regex doesn't match:
Since 'Version' is translated, the regex fails if the translation is Later I can try on another non-English XP and see if the regex match. |
Ezio Melotti wrote:
Ah, that makes sense: Vista support only got added in Python 2.6. Note however that platform.py does work with multiple Python versions,
Thanks for checking.
Interesting. In the German XP uses 'Version' as well, so the regexp I'll correct the regexp to only try matching on 'Ver\w+'.
|
Won't that fail with Windows versions in Japanese, Chinese, Arab and |
The same happens in Portuguese version ... the regex fails because ver []'s On Mon, Jul 6, 2009 at 7:54 AM, Ezio Melotti <report@bugs.python.org> wrote:
|
According to Google Translate, in Vietnamese 'Version' is 'Phiên bản'. |
I've checked in patch r74005 to address the problem. Could you check whether the current SVN version of platform.py works on Thanks. |
Beemp. |
I couldn't find a non-English Windows machine to test this, so I'm just going to close it. Feel free to reopen it or create a new issue if there are other problems. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: