File: system_check.py

package info (click to toggle)
openrpg 1.6.1-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,564 kB
  • ctags: 3,390
  • sloc: python: 25,165; xml: 11,229; makefile: 34; sh: 34
file content (32 lines) | stat: -rw-r--r-- 987 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import sys
import time
import platform
try:
    from wxPython.wx import *
except ImportError:
    print "\n\nImporting wxPython Failed! You must install wxPython for OpenRPG to run"
    print "Download the latest version here: http://www.openrpg.com/orpgnuke/modules.php?name=GetORPG"

class system_check:

    def start(self,log_file='openrpg_sysinfo.txt'):
        self.log_file = open(log_file,'w')
        self.log_file.write("OpenRPG System Info " + time.strftime( '%d-%m-%y', time.localtime( time.time() ) ))
        self.check_py()
        self.check_wxpython()
        self.check_platform()
        self.log_file.close()

    def check_wxpython(self):
        self.log_file.write("\nwxPython Version: " + wx.__version__)

    def check_py(self):
        self.log_file.write("\nPython: " + sys.version)

    def check_platform(self):
        self.log_file.write("\nPlatform: " + platform.platform())


if __name__ == "__main__":
    syscheck = system_check()
    syscheck.start()