Skip to content

Commit e2023f6

Browse files
committed
add pipinstall wrapper
-to use do import pipinstall as pip pip.install('mymodule')
1 parent ce47d1c commit e2023f6

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎Content/Scripts/pipinstall.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import runcmd as cmd
2+
import sys
3+
from threading import Thread
4+
5+
def pipModuleAction(command, module):
6+
cmd.run('pip ' + command + ' ' + module, sys.path[1] + "/Scripts")
7+
8+
def install(module):
9+
t = Thread(target=installModule, args=('install',module,))
10+
t.start()
11+
12+
def uninstall(module):
13+
t = Thread(target=installModule, args=('uninstall',module,))
14+
t.start()

0 commit comments

Comments
 (0)