Skip to content

Commit c5ca857

Browse files
authored
Update README.md
1 parent 3f50dda commit c5ca857

File tree

1 file changed

+35
-14
lines changed

1 file changed

+35
-14
lines changed

README.md

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,37 @@
33
---
44
**✨✨ New on PythonWimVBA 5.3 ✨✨**
55
+ 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`
87
+ Enhanced PyWimVBA performance
98
+ 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
1112
# Where's the lower version of PythonWimVBA?
1213
> **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**.
1314
1415
# 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])`
1637
+ Code splitting by ";;" , e.x : `import time;;time.sleep(5)`
1738
+ With `showcmd=True` performance will be better than `showcmd=False` (because of `showcmd=False` must create logfile to catch log, `showcmd=True` mustn't)
1839
- **[Optional OR Compulsory]iline**
@@ -23,7 +44,9 @@
2344
- (convert multiple line to single line)
2445
+ :warning: `Iline` is custom with `showcmd=True` but it's must for `showcmd=False`
2546
+ [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+
2750
**Command:** ``RunPyOld(code,pythonPath, [ keepFileData = False] , [UseDebug = False])``
2851
+ Code splitting by ";;" , e.x : `import time;;time.sleep(5)`
2952
+ [Optional] keepFileData: Keep the output file and code file after finishing execution.
@@ -32,13 +55,11 @@
3255

3356
---
3457

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) |
4265

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

Comments
 (0)