eric5_pluginrepository.py

changeset 896
f855351d5e98
parent 791
9ec2ac20e54e
child 945
8cd4d08fa9f6
child 1510
e75ecf2bd9dd
equal deleted inserted replaced
894:eab7b8d39807 896:f855351d5e98
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3
4 # Copyright (c) 2007 - 2011 Detlev Offenbach <detlev@die-offenbachs.de>
5 #
6
7 """
8 Eric5 Plugin Installer
9
10 This is the main Python script to install eric5 plugins from outside of the IDE.
11 """
12
13 import sys
14
15 for arg in sys.argv:
16 if arg.startswith("--config="):
17 import Utilities
18 configDir = arg.replace("--config=", "")
19 Utilities.setConfigDir(configDir)
20 sys.argv.remove(arg)
21 break
22
23 from Utilities import Startup
24
25 def createMainWidget(argv):
26 """
27 Function to create the main widget.
28
29 @param argv list of commandline parameters (list of strings)
30 @return reference to the main widget (QWidget)
31 """
32 from PluginManager.PluginRepositoryDialog import PluginRepositoryWindow
33 return PluginRepositoryWindow(None)
34
35 def main():
36 """
37 Main entry point into the application.
38 """
39 options = [\
40 ("--config=configDir",
41 "use the given directory as the one containing the config files"),
42 ]
43 appinfo = Startup.makeAppInfo(sys.argv,
44 "Eric5 Plugin Repository",
45 "",
46 "Utility to show the contents of the eric5"
47 " Plugin repository.",
48 options)
49 res = Startup.simpleAppStartup(sys.argv,
50 appinfo,
51 createMainWidget)
52 sys.exit(res)
53
54 if __name__ == '__main__':
55 main()

eric ide

mercurial