|
3 | 3 | ---
|
4 | 4 | **✨✨ New on PythonWimVBA 5.3 ✨✨**
|
5 | 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` |
| 6 | ++ Improve function, add new `newengine` |
8 | 7 | + Enhanced PyWimVBA performance
|
9 | 8 | + Keeps the old PyWimVBA function (In version 5.2) and renames it to `RunPyOld`
|
10 |
| -+ Added iline attributes |
| 9 | +- Add new `RunPyWid()` - with `showcmd=True` function doesn't need to create file |
| 10 | + - Remove `keepFileData` attributes and add `showcmd` |
| 11 | + - Added `iline` attributes |
11 | 12 | # Where's the lower version of PythonWimVBA?
|
12 | 13 | > **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 versions 5.2 or above**.
|
13 | 14 |
|
14 | 15 | # Usage
|
15 |
| -**Command:** `RunPy(code, [pythonPath = "python"], [showcmd = True], [iline = False], [UseDebug =False])` |
| 16 | +**Command:** ``LoadPy(file,[iline = False])`` |
| 17 | ++ Load a python file and convert it to PyWimVBA Syntax |
| 18 | + - For example, it'll convert this file code |
| 19 | + |
| 20 | + `examplefile.py` |
| 21 | + |
| 22 | + ``` |
| 23 | + import time |
| 24 | + time.sleep(5) |
| 25 | + ``` |
| 26 | + - To `import time;time.sleep(5)` |
| 27 | + - APPLY TO USE: `RunPy(LoadPy("mycodefile.anyextension"))` |
| 28 | + |
| 29 | +**Command:** ``RunPy(code,[pythonPath = "python"] , [newengine = False], [ keepFileData = False] , [UseDebug = False])`` |
| 30 | ++ Code splitting by ";;" , e.x : `import time;;time.sleep(5)` |
| 31 | ++ [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 |
| 32 | ++ [Optional] keepFileData: Keep the output file and code file after finishing execution. |
| 33 | ++ [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. |
| 34 | ++ E.x : `MsgBox RunPy("Welcome to \'Python With VBA!\'")` |
| 35 | + |
| 36 | +**Command:** `RunPyWid(code, [pythonPath = "python"], [showcmd = True], [iline = False], [UseDebug =False])` |
16 | 37 | + Code splitting by ";;" , e.x : `import time;;time.sleep(5)`
|
17 | 38 | + 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 | 39 | - **[Optional OR Compulsory]iline**
|
|
23 | 44 | - (convert multiple line to single line)
|
24 | 45 | + :warning: `Iline` is custom with `showcmd=True` but it's must for `showcmd=False`
|
25 | 46 | + [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 |
| - |
| 47 | +- New release (Unstable!) |
| 48 | + - Aready know bugs : Syntax error (Error with `\"` and `\'` in string python, e.x: `RunPyWid("print('This function failed with \'')")` , ) |
| 49 | + |
27 | 50 | **Command:** ``RunPyOld(code,pythonPath, [ keepFileData = False] , [UseDebug = False])``
|
28 | 51 | + Code splitting by ";;" , e.x : `import time;;time.sleep(5)`
|
29 | 52 | + [Optional] keepFileData: Keep the output file and code file after finishing execution.
|
|
32 | 55 |
|
33 | 56 | ---
|
34 | 57 |
|
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) | |
41 |
| -| Stable | :neutral_face: (New release,so it's unstable) | :star2: (Stable) | |
| 58 | +| Information | `RunPy()` | `RunPyWid()` |`RunPyOld()` | |
| 59 | +| ----------- | ----------- | ----------- | ----------- | |
| 60 | +| Performance | :star: ( Works good, more in `newengine=true` |:zap: (Amazing) | :+1: (Old but not wasted) | |
| 61 | +| Easy-Debug | :star2: (`UseDebug` for it) | :star: (`UseDebug` available, but a little bad) | :star2: (`UseDebug` for it)| |
| 62 | +| Easy-To-Use | :ok_hand: (Easy attributes) | :+1: (A little hard to start) |:ok_hand: (Easy attributes) | |
| 63 | +| Cache file (codefile & logfile) | :raised_hands: (With `newengine=True`, only needs to create logfile)| :muscle: (No cache-file, but `showcmd=True` requires logfile) | :turtle: (Use both cache file and logfile) | |
| 64 | +| Stable & error | :star2: (Works well) | :neutral_face: (New releases,contains many errors)| :star2: (Stable) | |
42 | 65 |
|
43 |
| -# Some advices? |
44 |
| -+ Although both PyWimVba Function - New and old have it debug method, i suggest you write and debug your code in a code editor like `Visual Studio Code`, `Sublime Text`. And then , replace all the newline with `;;` and paste it into your vba scripts |
|
0 commit comments