PyWimVBA 5.3
✨✨ New on PythonWimVBA 5.3 ✨✨
- Added multiple threads (Run multiple RunPy functions)
- Improve function, add new
newengine
- Enhanced PyWimVBA performance
- Keeps the old PyWimVBA function (In version 5.2) and renames it to
RunPyOld
- Add new
RunPyWid()
- withshowcmd=True
function doesn't need to create file- Remove
keepFileData
attributes and addshowcmd
- Added
iline
attributes
- Remove
Usage
Command: LoadPy(file,[iline = False])
-
Load a python file and convert it to PyWimVBA Syntax
- For example, it'll convert this file code
examplefile.py
import time time.sleep(5)
- To
import time;time.sleep(5)
- APPLY TO USE:
RunPy(LoadPy("mycodefile.anyextension"))
Command: RunPy(code,[pythonPath = "python"] , [newengine = False], [ keepFileData = False] , [UseDebug = False])
- Code splitting by ";;" , e.x :
import time;;time.sleep(5)
- [Optional] newengine : Improve performance, doesn't need to create logfile - still create code file . But it's will show up a cmd splash - doesn't work with UseDebug
- [Optional] keepFileData: Keep the output file and code file after finishing execution.
- [Optional] UseDebug: Show cmd that runs python code and keep it alive with it's output [Use debug to catch errors, the output file may not catch them. So when debug is enabled, Output file does nothing.
- E.x :
MsgBox RunPy("Welcome to \'Python With VBA!\'")
Command: RunPyWid(code, [pythonPath = "python"], [showcmd = True], [iline = False], [UseDebug =False])
- Code splitting by ";;" , e.x :
import time;;time.sleep(5)
- With
showcmd=True
performance will be better thanshowcmd=False
(because ofshowcmd=False
must create logfile to catch log,showcmd=True
mustn't)
- [Optional OR Compulsory]iline
Iline
attributes convert code fromimport time
time.sleep(2)
- To
exec("import time\ntime.sleep(2)")
- (convert multiple line to single line)
⚠️ Iline
is custom withshowcmd=True
but it's must forshowcmd=False
- [Optional] UseDebug: Show-up cmd that runs python code, keep it alive with it's output [Use debug to catch errors, Output file may not catch them. Only works with
showcmd=False
]
- New release (Unstable!)
- Aready know bugs : Syntax error (Error with
\"
and\'
in string python, e.x:RunPyWid("print('This function failed with \'')")
, )
- Aready know bugs : Syntax error (Error with
Command: RunPyOld(code,pythonPath, [ keepFileData = False] , [UseDebug = False])
- Code splitting by ";;" , e.x :
import time;;time.sleep(5)
- [Optional] keepFileData: Keep the output file and code file after finishing execution.
- [Optional] UseDebug: Show cmd that runs python code and keep it alive with it's output [Use debug to catch errors, the output file may not catch them. So when debug is enabled, Output file does nothing.