-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+Fixed issues ( #1 ) and ( #2 ) +Remove EZ-Tool (start-env.py), the tool has been split into an independent repository(https://github.com/soranoo/Start-Python-Virtual-Environment). +Added `log_full_color` into the config file(config.example.toml) +Removed virtual environment +Convert a valid JSON string into JSON + Updated `.gitignore` +Updated package dependency
- Loading branch information
Showing
25 changed files
with
84 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
config.toml | ||
start-env.py | ||
**/env | ||
**/logs | ||
**/data | ||
**/src/__pycache__ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
env/Lib/site-packages/charset_normalizer-2.0.11.dist-info/RECORD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
# -----------------* reference *----------------- | ||
# https://stackoverflow.com/a/60781848 | ||
# ----------------------------------------------- | ||
|
||
import os | ||
import time | ||
|
||
path_env = r".\env\Scripts\activate" | ||
def load_env(env_name): | ||
open_env_cmd = f"cmd /k {os.path.join(os.getcwd(), env_name, 'Scripts', 'activate')}" | ||
create_env_cmd = f"py -m venv env" | ||
if os.path.isdir(os.path.join(os.getcwd(), env_name, "Scripts")): | ||
os.system(open_env_cmd) | ||
else: | ||
print("No virtual environment found.") | ||
# ask the user create a new venv or not | ||
o = input("Do you want to create a new virtual environment? [y/n] ") | ||
if o.lower() == "y": | ||
print("Creating virtual environment...") | ||
os.system(create_env_cmd) | ||
os.system(open_env_cmd) | ||
else: | ||
print("The program will shut down after 10s...") | ||
time.sleep(10) | ||
exit() | ||
|
||
''' | ||
Create venv 'py -m venv env' | ||
Freeze 'pip freeze -l > requirements.txt' | ||
With /k cmd executes and then remain open | ||
With /c executes and close | ||
''' | ||
if __name__ == "__main__": | ||
os.system(f"cmd /k {path_env}") | ||
load_env("env") |