Skip to content

Commit 0a00335

Browse files
committed
update the activate environment readme
1 parent 61f59de commit 0a00335

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ So, what could `zipapps` be?
6969
1. > python3 venv.pyz entry.py
7070
2. the cache will be unzipped to `./zipapps_cache/venv` for `-u` is not null
7171

72+
## 4. Activate the `.pyz` environment
73+
74+
1. `import zipimport; zipimport.zipimporter('bottle.pyz').load_module("ensure_zipapps")`
75+
1. automatically unzip cache, and add the path to sys.path
76+
2. it can be run multiple times
77+
2. if they are all pure-python code
78+
1. `impory sys; sys.path.insert(0, "bottle.pyz")`
79+
80+
7281
# Command line usage
7382

7483
![image](https://github.com/ClericPy/zipapps/raw/master/args.png)

0 commit comments

Comments
 (0)