Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ScadeBlock authored Jul 7, 2023
1 parent 3f50dda commit c5ca857
Showing 1 changed file with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,37 @@
---
**✨✨ New on PythonWimVBA 5.3 ✨✨**
+ Added multiple threads (Run multiple RunPy functions)
+ Improve function; the new `RunPy()` - with `showcmd=True` function doesn't need to create file, with `showcmd=`
+ Remove `keepFileData` attributes and add `showcmd`
+ Improve function, add new `newengine`
+ Enhanced PyWimVBA performance
+ Keeps the old PyWimVBA function (In version 5.2) and renames it to `RunPyOld`
+ Added iline attributes
- Add new `RunPyWid()` - with `showcmd=True` function doesn't need to create file
- Remove `keepFileData` attributes and add `showcmd`
- Added `iline` attributes
# Where's the lower version of PythonWimVBA?
> **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**.
# Usage
**Command:** `RunPy(code, [pythonPath = "python"], [showcmd = True], [iline = False], [UseDebug =False])`
**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 than `showcmd=False` (because of `showcmd=False` must create logfile to catch log, `showcmd=True` mustn't)
- **[Optional OR Compulsory]iline**
Expand All @@ -23,7 +44,9 @@
- (convert multiple line to single line)
+ :warning: `Iline` is custom with `showcmd=True` but it's must for `showcmd=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 \'')")` , )

**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.
Expand All @@ -32,13 +55,11 @@

---

| Information | `RunPy()` | `RunPyOld()` |
| ----------- | ----------- | ----------- |
| Performance | :zap: (amazing) | :+1: (good) |
| Easy-Debug | :star: (very good, with `showcmd = False & UseDebug=True`,`showcmd = True` is not recommend for debugging) | :star2: (amazing,with `UseDebug & keepFileData=True`)|
| Easy-To-Use | :ok_hand: |:ok_hand: |
| Cache file | :raised_hands: (no cache, but `showcmd=False` needs create logfile) | :turtle: (must create logfile,code file) |
| Stable | :neutral_face: (New release,so it's unstable) | :star2: (Stable) |
| Information | `RunPy()` | `RunPyWid()` |`RunPyOld()` |
| ----------- | ----------- | ----------- | ----------- |
| Performance | :star: ( Works good, more in `newengine=true` |:zap: (Amazing) | :+1: (Old but not wasted) |
| Easy-Debug | :star2: (`UseDebug` for it) | :star: (`UseDebug` available, but a little bad) | :star2: (`UseDebug` for it)|
| Easy-To-Use | :ok_hand: (Easy attributes) | :+1: (A little hard to start) |:ok_hand: (Easy attributes) |
| 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) |
| Stable & error | :star2: (Works well) | :neutral_face: (New releases,contains many errors)| :star2: (Stable) |

# Some advices?
+ 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 comments on commit c5ca857

Please sign in to comment.