robhagemans / pcbasic

PC-BASIC - A free, cross-platform emulator for the GW-BASIC family of interpreters
http://www.pc-basic.org
Other
396 stars 48 forks source link

Support for Python 2.7.15rc1 #77

Closed nmanumr closed 6 years ago

nmanumr commented 6 years ago

I install pcbasic using

pip install pcbasic

after installing successfully I tried to run it using

python -m pcbasic

I got following error:

[19:28:47.0820] ERROR: Unhandled exception
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pcbasic/main.py", line 27, in main
    run(*arguments)
  File "/usr/local/lib/python2.7/dist-packages/pcbasic/main.py", line 50, in run
    settings = config.Settings(temp_dir, arguments)
  File "/usr/local/lib/python2.7/dist-packages/pcbasic/config.py", line 348, in __init__
    python_version = tuple(int(v) for v in platform.python_version_tuple())
  File "/usr/local/lib/python2.7/dist-packages/pcbasic/config.py", line 348, in <genexpr>
    python_version = tuple(int(v) for v in platform.python_version_tuple())
ValueError: invalid literal for int() with base 10: '15rc1'

I guess the error is here

python_version = tuple(int(v) for v in platform.python_version_tuple())

I guess it will be better to use sys.version_info to get version info.

My python version: 2.7.15rc1