Debian Codegraph @

scripts/airdrop-ng/airdrop/__init__.py

raw
1 import os
2 import sys
3
4 class bcolors:
5 """
6 class for using colored text
7 """
8 HEADER = '\033[95m' #pink
9 OKBLUE = '\033[94m' #blue
10 OKGREEN = '\033[92m' #green
11 WARNING = '\033[93m' #yellow
12 FAIL = '\033[91m' #red
13 ENDC = '\033[0m' #white
14
15 def disable(self):
16 """
17 function to disable colored text
18 """
19 self.HEADER = ''
20 self.OKBLUE = ''
21 self.OKGREEN = ''
22 self.WARNING = ''
23 self.FAIL = ''
24 self.ENDC = ''
25
26 encoding = sys.getfilesystemencoding()
27 current_file=""
28 if hasattr(sys, 'frozen'):
29 current_file = sys.executable
30 else:
31 current_file = __file__
32 if sys.version_info[0] < 3:
33 current_file = unicode(current_file, encoding)
34
35 install_dir = os.path.abspath(os.path.dirname(current_file))
36 try:
37 os.mkdir(install_dir + "/support")
38 except:
39 pass