Use sys.platform to detect OS instead of os.system.

This commit is contained in:
Eratosthenes 2010-12-17 22:16:19 -05:00
parent 15eb78c0c8
commit 6696cab13c

6
pyfpdb/HUD_main.pyw Executable file → Normal file
View File

@ -44,9 +44,11 @@ import Options
(options, argv) = Options.fpdb_options()
# get the correct module for the current os
if os.name == 'posix':
if sys.platform == 'linux2':
import XTables as Tables
elif os.name == 'nt':
elif sys.platform == 'darwin':
import OSXTables as Tables
else: # This is bad--figure out the values for the various windows flavors
import WinTables as Tables
import locale