37 lines
917 B
Python
Executable File
37 lines
917 B
Python
Executable File
#!/usr/bin/env python
|
|
'''
|
|
Created on 23.10.2010
|
|
|
|
@author: Sergey Morozov
|
|
'''
|
|
|
|
import sys
|
|
|
|
if __name__ == '__main__':
|
|
modules = ['sys',
|
|
'os',
|
|
'MySQLdb',
|
|
'json',
|
|
'hashlib',
|
|
'smtplib',
|
|
'string',
|
|
'random',
|
|
'email',
|
|
'cgitb',
|
|
'urlparse',
|
|
'wsgiref',
|
|
'cgi']
|
|
error = False
|
|
for module in modules:
|
|
sys.stdout.write('Checking for module %s: ' % module)
|
|
try:
|
|
__import__(module)
|
|
except ImportError:
|
|
sys.stdout.write('import error\n')
|
|
error = True
|
|
else:
|
|
sys.stdout.write('OK\n')
|
|
if error == False:
|
|
sys.stdout.write('\nDependencies check completed successfully.\n\n')
|
|
else:
|
|
sys.stdout.write('\nOne or more dependency are not found.\n\n') |