|
2 | 2 | > Python With VBA ! Run python via VBA
|
3 | 3 | ---
|
4 | 4 | **✨✨ New on PythonWimVBA 5.3 ✨✨**
|
5 |
| -+ Added multiple threads (Run multiple RunPy function) |
6 |
| -+ Remove output file Path and filename (remove!, Added auto random generate name) |
7 |
| - |
| 5 | ++ Added multiple threads (Run multiple RunPy functions) |
| 6 | ++ Improve function; the new `RunPy()` - with `showcmd=True` function doesn't need to create file, with `showcmd=` |
| 7 | ++ Remove `keepFileData` attributes and add `showcmd` |
| 8 | ++ Enhanced PyWimVBA performance |
| 9 | ++ Keeps the old PyWimVBA function (In version 5.2) and rename it to `RunPyOld` |
| 10 | ++ Added iline attributes |
8 | 11 | # Where's the lower version of PythonWimVBA?
|
9 | 12 | > **Lower Version is tested privately; some versions are publicly released, but they are pre-release. They're outdated, unsecure and unstable, so please use only version 5.2 or above**
|
10 | 13 |
|
11 | 14 | # Usage
|
| 15 | +**Command:** `RunPy(code, [pythonPath = "python"], [showcmd = True], [iline = False],[UseDebug=False])` |
| 16 | ++ Code splitting by ";;" , e.x : `import time;;time.sleep(5)` |
| 17 | ++ With `showcmd=True` performance will be better than `showcmd=False` (because of `showcmd=False` must create logfile to catch log, `showcmd=True` mustn't) |
| 18 | +- **iline** |
| 19 | + - `Iline` attributes convert code from |
| 20 | + - `import time` |
| 21 | + - `time.sleep(2)` |
| 22 | + - To `exec("import time\ntime.sleep(2)")` |
| 23 | + - (convert multiple line to single line) |
| 24 | ++ :warning: `Iline` is custom with `showcmd=True` but it's must for `showcmd=False` |
| 25 | ++ [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`] |
| 26 | + |
12 | 27 | **Command:** ``RunPy(code,pythonPath, [ keepFileData = False] , [UseDebug = False])``
|
13 |
| -+ Code splitting by ";;" , e.x : "import time;;time.sleep(5)" |
| 28 | ++ Code splitting by ";;" , e.x : `import time;;time.sleep(5)` |
14 | 29 | + [Optional] keepFileData: Keep the output file and code file after finishing execution.
|
15 | 30 | + [Optional] UseDebug: Show cmd that runs python code, keep it alive with it's output [Use debug to catch errors, Output file may not catch them. So when debug is enabled, Output file does nothing.]
|
| 31 | + |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +| Information | `RunPy()` | `RunPyOld()` | |
| 36 | +| ----------- | ----------- | ----------- | |
| 37 | +| Performance | :zap: (amazing) | :+1: (good) | |
| 38 | +| Easy-Debug | :star: (very good, with `showcmd = False & UseDebug=True`,`showcmd = True` is not recommend for debugging) | :star2: (amazing,with `UseDebug & keepFileData=True`)| |
| 39 | +| Easy-To-Use | :ok_hand: |:ok_hand: | |
| 40 | +| Cache file | :raised_hands: (no cache, but `showcmd=False` needs create logfile) | :turtle: (must create logfile,code file) | |
0 commit comments