summaryrefslogtreecommitdiff
path: root/venv/Scripts/Activate.ps1
diff options
context:
space:
mode:
authorpravindalve2020-02-14 13:04:30 +0530
committerGitHub2020-02-14 13:04:30 +0530
commita80b6726f5f70d9a2ec1cbf361e7f607849343bf (patch)
tree333d34f58255003939e70b800d2cd57e40253b6b /venv/Scripts/Activate.ps1
parent8189de7d424964aac11b81c8297b7af7fcedd2b8 (diff)
parentdf141f35dccc6b21fcfa575707c6435a39d0002f (diff)
downloadChemical-Simulator-GUI-a80b6726f5f70d9a2ec1cbf361e7f607849343bf.tar.gz
Chemical-Simulator-GUI-a80b6726f5f70d9a2ec1cbf361e7f607849343bf.tar.bz2
Chemical-Simulator-GUI-a80b6726f5f70d9a2ec1cbf361e7f607849343bf.zip
Merge pull request #2 from pravindalve/master
Code restructured, some ui improvizations, undo redo implementation and Binary envelops utility
Diffstat (limited to 'venv/Scripts/Activate.ps1')
-rw-r--r--venv/Scripts/Activate.ps151
1 files changed, 51 insertions, 0 deletions
diff --git a/venv/Scripts/Activate.ps1 b/venv/Scripts/Activate.ps1
new file mode 100644
index 0000000..a46533f
--- /dev/null
+++ b/venv/Scripts/Activate.ps1
@@ -0,0 +1,51 @@
+function global:deactivate ([switch]$NonDestructive) {
+ # Revert to original values
+ if (Test-Path function:_OLD_VIRTUAL_PROMPT) {
+ copy-item function:_OLD_VIRTUAL_PROMPT function:prompt
+ remove-item function:_OLD_VIRTUAL_PROMPT
+ }
+
+ if (Test-Path env:_OLD_VIRTUAL_PYTHONHOME) {
+ copy-item env:_OLD_VIRTUAL_PYTHONHOME env:PYTHONHOME
+ remove-item env:_OLD_VIRTUAL_PYTHONHOME
+ }
+
+ if (Test-Path env:_OLD_VIRTUAL_PATH) {
+ copy-item env:_OLD_VIRTUAL_PATH env:PATH
+ remove-item env:_OLD_VIRTUAL_PATH
+ }
+
+ if (Test-Path env:VIRTUAL_ENV) {
+ remove-item env:VIRTUAL_ENV
+ }
+
+ if (!$NonDestructive) {
+ # Self destruct!
+ remove-item function:deactivate
+ }
+}
+
+deactivate -nondestructive
+
+$env:VIRTUAL_ENV="C:\Part of my life\iit bombay\3 Jan 2020 updated\venv"
+
+if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) {
+ # Set the prompt to include the env name
+ # Make sure _OLD_VIRTUAL_PROMPT is global
+ function global:_OLD_VIRTUAL_PROMPT {""}
+ copy-item function:prompt function:_OLD_VIRTUAL_PROMPT
+ function global:prompt {
+ Write-Host -NoNewline -ForegroundColor Green '(venv) '
+ _OLD_VIRTUAL_PROMPT
+ }
+}
+
+# Clear PYTHONHOME
+if (Test-Path env:PYTHONHOME) {
+ copy-item env:PYTHONHOME env:_OLD_VIRTUAL_PYTHONHOME
+ remove-item env:PYTHONHOME
+}
+
+# Add the venv to the PATH
+copy-item env:PATH env:_OLD_VIRTUAL_PATH
+$env:PATH = "$env:VIRTUAL_ENV\Scripts;$env:PATH"