Changeset 3277 for lliurex-store/trunk
- Timestamp:
- Jan 12, 2017, 1:35:18 PM (4 years ago)
- Location:
- lliurex-store/trunk/fuentes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-store/trunk/fuentes/lliurex-appstore.install/usr/share/lliurex-store/lliurex-store-cli.py
r3252 r3277 2 2 import sys 3 3 import argparse 4 sys.path.append('/usr/share/lliurex-store')4 #sys.path.append('/usr/share/lliurex-store') 5 5 #sys.path.append('/home/lliurex/lliurex-store/trunk/fuentes/lliurex-appstore.install/usr/share/lliurex-store') 6 import storeManager6 import lliurexstore.storeManager as storeManager 7 7 import time 8 8 -
lliurex-store/trunk/fuentes/python3-lliurex-store.install/usr/share/lliurexstore/storeManager.py
r3275 r3277 6 6 #Load the plugin dir 7 7 #pluginDir='/home/lliurex/lliurex-store/trunk/fuentes/lliurex-appstore.install/usr/share/lliurex-store/plugins' #Path to the dir that stores the plugins 8 pluginDir='/usr/share/lliurex-store/plugins' #Path to the dir that stores the plugins 9 oldpwd=os.getcwd() 10 os.chdir(pluginDir) 11 exec ('import ' + os.path.basename(pluginDir)) #DON'T CHANGE!!! 12 os.chdir(oldpwd) 13 del (oldpwd) 8 #pluginDir='/usr/share/lliurex-store/plugins' #Path to the dir that stores the plugins 9 #oldpwd=os.getcwd() 10 #os.chdir(pluginDir) 11 #exec ('import ' + os.path.basename(pluginDir)) #DON'T CHANGE!!! 12 #os.chdir(oldpwd) 13 #del (oldpwd) 14 import lliurexstore.plugins as plugins 14 15 ###### 15 16 #Ver. 1.0 of storeManager.py … … 54 55 #### 55 56 def __init_plugins__(self): 56 os.chdir(self.pluginDir) 57 for mod in os.listdir(): 58 if not mod.startswith('_'): 59 modName=mod.split('.')[0] 60 strImport='from plugins.'+modName+' import *' 61 try: 62 exec (strImport) 63 except Exception as e: 64 print(str(e)) 57 # os.chdir(self.pluginDir) 58 # for mod in os.listdir(): 59 # if not mod.startswith('_'): 60 # modName=mod.split('.')[0] 61 # strImport='from plugins.'+modName+' import *' 62 # try: 63 # exec (strImport) 64 # except Exception as e: 65 # print(str(e)) 66 from plugins import * 65 67 for mod in (sys.modules.keys()): 66 68 if 'plugins.' in mod:
Note: See TracChangeset
for help on using the changeset viewer.