Skip to content

Commit 9d2f03a

Browse files
committed
#375 - improve debug() to log stuffs
1 parent b4a18a1 commit 9d2f03a

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# RPA for Python :snake:
22

3-
[**v1.45**](https://github.com/tebelorg/RPA-Python/releases) | [**Use Cases**](#use-cases) | [**API Reference**](#api-reference) | [**About & Credits**](#about--credits) | [**Run on Cloud**](https://colab.research.google.com/drive/13bQO6G_hzE1teX35a3NZ4T5K-ICFFdB5?usp=sharing) | [**PyCon Video**](https://www.youtube.com/watch?v=F2aQKWx_EAE) | [**Telegram Chat**](https://t.me/rpa_chat)
3+
[**v1.46**](https://github.com/tebelorg/RPA-Python/releases) | [**Use Cases**](#use-cases) | [**API Reference**](#api-reference) | [**About & Credits**](#about--credits) | [**Run on Cloud**](https://colab.research.google.com/drive/13bQO6G_hzE1teX35a3NZ4T5K-ICFFdB5?usp=sharing) | [**PyCon Video**](https://www.youtube.com/watch?v=F2aQKWx_EAE) | [**Telegram Chat**](https://t.me/rpa_chat)
44

55
>_This tool was previously known as TagUI for Python. [More details](https://github.com/tebelorg/RPA-Python/issues/100) on the name change, which is backward compatible so existing scripts written with `import tagui as t` and `t.function()` will still work._
66
@@ -120,7 +120,7 @@ init()|visual_automation = False, chrome_browser = True|start TagUI, auto-setup
120120
close()||close TagUI, Chrome browser, SikuliX
121121
pack()||for deploying package without internet
122122
update()||for updating package without internet
123-
debug()|True or False|print & log debug info to rpa_python.log
123+
debug()|True or False or text_to_log|print & log debug info to rpa_python.log
124124

125125
>_by default RPA for Python runs at normal human speed, to run 10X faster use init(turbo_mode = True)_
126126

rpa_package/rpa.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Apache License 2.0, Copyright 2019 Tebel.Automation Private Limited
33
# https://github.com/tebelorg/RPA-Python/blob/master/LICENSE.txt
44
__author__ = 'Ken Soh <[email protected]>'
5-
__version__ = '1.45.0'
5+
__version__ = '1.46.0'
66

77
# for backward compatibility, invoke tagui.py functions to use in rpa.py
88
from tagui import *

rpa_package/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
setup(
44
name='rpa',
5-
version='1.45.0',
6-
py_modules=['rpa'], install_requires=['tagui>=1.45.0'],
5+
version='1.46.0',
6+
py_modules=['rpa'], install_requires=['tagui>=1.46.0'],
77
author='Ken Soh',
88
author_email='[email protected]',
99
license='Apache License 2.0',

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='tagui',
5-
version='1.45.0',
5+
version='1.46.0',
66
py_modules=['tagui'],
77
author='Ken Soh',
88
author_email='[email protected]',

tagui.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Apache License 2.0, Copyright 2019 Tebel.Automation Private Limited
33
# https://github.com/tebelorg/RPA-Python/blob/master/LICENSE.txt
44
__author__ = 'Ken Soh <[email protected]>'
5-
__version__ = '1.45.0'
5+
__version__ = '1.46.0'
66

77
import subprocess
88
import os
@@ -248,7 +248,11 @@ def coord(x_coordinate = 0, y_coordinate = 0):
248248
def debug(on_off = None):
249249
"""function to set debug mode, eg print debug info"""
250250
global _tagui_debug
251-
if on_off is not None: _tagui_debug = on_off
251+
if on_off is not None:
252+
if isinstance(on_off, int):
253+
_tagui_debug = on_off
254+
else:
255+
send('// ' + on_off)
252256
return _tagui_debug
253257

254258
def tagui_location(location = None):

0 commit comments

Comments
 (0)