26
26
27
27
import colorama
28
28
import sys
29
+ colorama .init (autoreset = True )
29
30
30
31
31
32
def show_usage ():
@@ -35,7 +36,6 @@ def show_usage():
35
36
sc += (' For info on all commands, type: "seleniumbase --help".\n ' )
36
37
sc += (' * (Use "pytest" for running tests) *\n ' )
37
38
if "linux" not in sys .platform :
38
- colorama .init (autoreset = True )
39
39
c1 = colorama .Fore .BLUE + colorama .Back .LIGHTCYAN_EX
40
40
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
41
41
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
@@ -52,7 +52,6 @@ def show_usage():
52
52
def show_basic_usage ():
53
53
from seleniumbase .console_scripts import logo_helper
54
54
seleniumbase_logo = logo_helper .get_seleniumbase_logo ()
55
- colorama .init (autoreset = True )
56
55
print (seleniumbase_logo )
57
56
print ("%s" % get_version ()[0 :1 ])
58
57
print ("" )
@@ -80,7 +79,6 @@ def show_basic_usage():
80
79
sc += (' * (EXAMPLE: "sbase install chromedriver latest") *\n ' )
81
80
sc += ("" )
82
81
if "linux" not in sys .platform :
83
- colorama .init (autoreset = True )
84
82
c1 = colorama .Fore .BLUE + colorama .Back .LIGHTCYAN_EX
85
83
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
86
84
cr = colorama .Style .RESET_ALL
@@ -90,7 +88,6 @@ def show_basic_usage():
90
88
91
89
92
90
def show_install_usage ():
93
- colorama .init (autoreset = True )
94
91
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
95
92
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
96
93
cr = colorama .Style .RESET_ALL
@@ -125,7 +122,6 @@ def show_install_usage():
125
122
126
123
127
124
def show_mkdir_usage ():
128
- colorama .init (autoreset = True )
129
125
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
130
126
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
131
127
cr = colorama .Style .RESET_ALL
@@ -147,7 +143,6 @@ def show_mkdir_usage():
147
143
148
144
149
145
def show_mkfile_usage ():
150
- colorama .init (autoreset = True )
151
146
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
152
147
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
153
148
cr = colorama .Style .RESET_ALL
@@ -180,7 +175,6 @@ def show_mkfile_usage():
180
175
181
176
182
177
def show_convert_usage ():
183
- colorama .init (autoreset = True )
184
178
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
185
179
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
186
180
cr = colorama .Style .RESET_ALL
@@ -200,7 +194,6 @@ def show_convert_usage():
200
194
201
195
202
196
def show_print_usage ():
203
- colorama .init (autoreset = True )
204
197
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
205
198
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
206
199
cr = colorama .Style .RESET_ALL
@@ -219,7 +212,6 @@ def show_print_usage():
219
212
220
213
221
214
def show_translate_usage ():
222
- colorama .init (autoreset = True )
223
215
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
224
216
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
225
217
cr = colorama .Style .RESET_ALL
@@ -255,7 +247,6 @@ def show_translate_usage():
255
247
256
248
257
249
def show_extract_objects_usage ():
258
- colorama .init (autoreset = True )
259
250
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
260
251
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
261
252
cr = colorama .Style .RESET_ALL
@@ -273,7 +264,6 @@ def show_extract_objects_usage():
273
264
274
265
275
266
def show_inject_objects_usage ():
276
- colorama .init (autoreset = True )
277
267
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
278
268
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
279
269
cr = colorama .Style .RESET_ALL
@@ -294,7 +284,6 @@ def show_inject_objects_usage():
294
284
295
285
296
286
def show_objectify_usage ():
297
- colorama .init (autoreset = True )
298
287
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
299
288
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
300
289
cr = colorama .Style .RESET_ALL
@@ -318,7 +307,6 @@ def show_objectify_usage():
318
307
319
308
320
309
def show_revert_objects_usage ():
321
- colorama .init (autoreset = True )
322
310
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
323
311
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
324
312
cr = colorama .Style .RESET_ALL
@@ -340,7 +328,6 @@ def show_revert_objects_usage():
340
328
341
329
342
330
def show_encrypt_usage ():
343
- colorama .init (autoreset = True )
344
331
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
345
332
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
346
333
cr = colorama .Style .RESET_ALL
@@ -358,7 +345,6 @@ def show_encrypt_usage():
358
345
359
346
360
347
def show_decrypt_usage ():
361
- colorama .init (autoreset = True )
362
348
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
363
349
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
364
350
cr = colorama .Style .RESET_ALL
@@ -376,7 +362,6 @@ def show_decrypt_usage():
376
362
377
363
378
364
def show_download_usage ():
379
- colorama .init (autoreset = True )
380
365
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
381
366
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
382
367
cr = colorama .Style .RESET_ALL
@@ -393,7 +378,6 @@ def show_download_usage():
393
378
394
379
395
380
def show_grid_hub_usage ():
396
- colorama .init (autoreset = True )
397
381
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
398
382
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
399
383
cr = colorama .Style .RESET_ALL
@@ -421,7 +405,6 @@ def show_grid_hub_usage():
421
405
422
406
423
407
def show_grid_node_usage ():
424
- colorama .init (autoreset = True )
425
408
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
426
409
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
427
410
cr = colorama .Style .RESET_ALL
@@ -461,7 +444,6 @@ def show_version_info():
461
444
462
445
463
446
def show_options ():
464
- colorama .init (autoreset = True )
465
447
c1 = colorama .Fore .BLUE + colorama .Back .LIGHTCYAN_EX
466
448
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
467
449
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
@@ -518,7 +500,6 @@ def show_options():
518
500
519
501
520
502
def show_detailed_help ():
521
- colorama .init (autoreset = True )
522
503
c2 = colorama .Fore .BLUE + colorama .Back .LIGHTGREEN_EX
523
504
c3 = colorama .Fore .BLUE + colorama .Back .LIGHTYELLOW_EX
524
505
c6 = colorama .Back .CYAN
@@ -590,7 +571,6 @@ def main():
590
571
elif command == "print" :
591
572
if len (command_args ) >= 1 :
592
573
if sys .version_info [0 ] == 2 :
593
- colorama .init (autoreset = True )
594
574
c5 = colorama .Fore .RED + colorama .Back .LIGHTYELLOW_EX
595
575
cr = colorama .Style .RESET_ALL
596
576
msg = '"sbase print" does NOT support Python 2! '
@@ -606,7 +586,6 @@ def main():
606
586
elif command == "translate" :
607
587
if len (command_args ) >= 1 :
608
588
if sys .version_info [0 ] == 2 :
609
- colorama .init (autoreset = True )
610
589
c5 = colorama .Fore .RED + colorama .Back .LIGHTYELLOW_EX
611
590
cr = colorama .Style .RESET_ALL
612
591
msg = "The SeleniumBase Translator does NOT support Python 2!"
0 commit comments