I have 64-bit Windows. But if I use platform.architecture()[0]
or sublime.arch()
in my Sublime Text plugin, I get 32bit
value.
I create a file ExampleSashaPlugin.py
in $packages/TestPlugin
folder. Content of this file:
import platform
import sublime
get_bitness = platform.architecture()[0]
print(get_bitness)
get_bitness_2 = sublime.arch()
print(get_bitness_2)
I reproduce the problem in a version of Sublime Text without plugins and user settings.
I save ExampleSashaPlugin.py
.
If I get Windows bitness in Python interpreter:
>>> import platform
>>> platform.architecture()[0]
'64bit'
Sublime Text console output:
key evt: control+s
command: save
reloading plugin TestPlugin.ExampleSashaPlugin
32bit
x32
Operating system and version:
Windows 10 Enterprise LTSB 64-bit EN
Sublime Text:
Build 3126 portable for Windows 64-bit
Thanks.
As Keith Hall say, I had 32-bit Sublime Text in my 64-bit machine. I need use Sublime Text 64-bit for correct working platform.architecture()
and sublime.arch()
methods.
I don't understand, why I had 32-bit Sublime Text. I download Sublime Text Build 3126 x64.zip
file — 64-bit portable version from official site. Perhaps, in Sublime Text site posted an incorrect version, when I download 64-bit version.
If you also have 32-bit Sublime Text version in 64-bit PC by some reasons, you can solve the problem use these actions.
Copy these files from new 64-bit Sublime Text root directory to root Sublime Text directory, that you will use:
crash_reporter.exe
,msvcr100.dll
,plugin_host.exe
,python33.dll
,subl.exe
,sublime_text.exe
,update_installer.exe
.Actually for April 2017.