(Feb-04-2017, 04:50 AM)hsunteik Wrote: Nevermind,my mistake,found the problem and fixed it.Some pointer,there are a style issues and none stander way of doing this stuff.
So here we go:
Indentation is always 4 space,object make no sense in Python 3.x,and class should have capital letter.
PEP 396 Module Version Numbers:
Quote:3) When a module (or package) includes a version number, the version SHOULD be available in the __version__ attribute.Eg:
5) The __version__ attribute's value SHOULD be a string.
class Information: __version__ = '1.0'Use it:
>>> Information.__version__ '1.0' >>> obj = Information() >>> obj.__version__ '1.0'
Quote:str(majorVersion)+'.'+str(minorVersion)Drop
str()
and +
Python has string formatting.>>> majorVersion = 1.0 >>> minorVersion = 0.98 >>> print('majorVersion is: {}\nminorVersion is: {}'.format(majorVersion, minorVersion)) majorVersion is: 1.0 minorVersion is: 0.98In 3.6 there is also f-string.
>>> majorVersion = 1.0 >>> minorVersion = 0.98 >>> print(f'majorVersion is: {majorVersion}\nminorVersion is: {minorVersion}') majorVersion is: 1.0 minorVersion is: 0.98