|
1 | 1 | """INTEGRATION ENGINE FOR TAGUI PYTHON PACKAGE ~ TEBEL.ORG"""
|
2 | 2 | __author__ = 'Ken Soh <[email protected]>'
|
3 |
| -__version__ = '1.8.0' |
| 3 | +__version__ = '1.9.0' |
4 | 4 |
|
5 | 5 | import subprocess
|
6 | 6 | import os
|
@@ -413,6 +413,11 @@ def init(visual_automation = False, chrome_browser = True):
|
413 | 413 | # sync tagui delta files for current release if needed
|
414 | 414 | if not _tagui_delta(tagui_directory): return False
|
415 | 415 |
|
| 416 | + # on Windows, check if there is space in folder path name |
| 417 | + if platform.system() == 'Windows' and ' ' in os.getcwd(): |
| 418 | + print('[TAGUI][INFO] - to use TagUI for Python on Windows, avoid space in folder path name') |
| 419 | + return False |
| 420 | + |
416 | 421 | # create entry flow to launch SikuliX accordingly
|
417 | 422 | if visual_automation:
|
418 | 423 | # check for working java jdk for visual automation mode
|
@@ -492,6 +497,12 @@ def init(visual_automation = False, chrome_browser = True):
|
492 | 497 | print('[TAGUI][ERROR] - TagUI process ended unexpectedly')
|
493 | 498 | return False
|
494 | 499 |
|
| 500 | + # remove generated tagui flow, js code and custom functions files |
| 501 | + if os.path.isfile('tagui_python'): os.remove('tagui_python') |
| 502 | + if os.path.isfile('tagui_python.js'): os.remove('tagui_python.js') |
| 503 | + if os.path.isfile('tagui_python.raw'): os.remove('tagui_python.raw') |
| 504 | + if os.path.isfile('tagui_local.js'): os.remove('tagui_local.js') |
| 505 | + |
495 | 506 | # increment id and prepare for next instruction
|
496 | 507 | _tagui_id = _tagui_id + 1
|
497 | 508 |
|
@@ -627,12 +638,6 @@ def close():
|
627 | 638 | # loop until tagui process has closed before returning control
|
628 | 639 | while _process.poll() is None: pass
|
629 | 640 |
|
630 |
| - # remove generated tagui flow, js code and custom functions files |
631 |
| - if os.path.isfile('tagui_python'): os.remove('tagui_python') |
632 |
| - if os.path.isfile('tagui_python.js'): os.remove('tagui_python.js') |
633 |
| - if os.path.isfile('tagui_python.raw'): os.remove('tagui_python.raw') |
634 |
| - if os.path.isfile('tagui_local.js'): os.remove('tagui_local.js') |
635 |
| - |
636 | 641 | # remove generated tagui log and data files if not in debug mode
|
637 | 642 | if not debug():
|
638 | 643 | if os.path.isfile('tagui_python.log'): os.remove('tagui_python.log')
|
|
0 commit comments