PluginProjectPyramid.py

changeset 12
a8d87f7de3e1
parent 7
d8545e81637f
child 13
227a115ab2a1
equal deleted inserted replaced
11:efb7227e5bbd 12:a8d87f7de3e1
118 self.__defaults = { 118 self.__defaults = {
119 "VirtualEnvironmentPy2" : "", 119 "VirtualEnvironmentPy2" : "",
120 "VirtualEnvironmentPy3" : "", 120 "VirtualEnvironmentPy3" : "",
121 "Python2ConsoleType": "python", 121 "Python2ConsoleType": "python",
122 "Python3ConsoleType": "python", 122 "Python3ConsoleType": "python",
123 "ServerPort": 0,
124 "PyramidDocUrl": "http://docs.pylonsproject.org/en/latest/docs/pyramid.html", 123 "PyramidDocUrl": "http://docs.pylonsproject.org/en/latest/docs/pyramid.html",
125 } 124 }
126 if isWindowsPlatform(): 125 if isWindowsPlatform():
127 self.__defaults["ConsoleCommandNoClose"] = "cmd.exe /k" 126 self.__defaults["ConsoleCommandNoClose"] = "cmd.exe /k"
128 self.__defaults["ConsoleCommand"] = "cmd.exe /c" 127 self.__defaults["ConsoleCommand"] = "cmd.exe /c"
327 326
328 @param key the key of the value to get 327 @param key the key of the value to get
329 @param prefClass preferences class used as the storage area 328 @param prefClass preferences class used as the storage area
330 @return the requested setting 329 @return the requested setting
331 """ 330 """
332 if key == "ServerPort": 331 return Preferences.Prefs.settings.value("Pyramid/" + key,
333 return int(Preferences.Prefs.settings.value("Pyramid/" + key, 332 self.__defaults[key])
334 self.__defaults[key]))
335 else:
336 return Preferences.Prefs.settings.value("Pyramid/" + key,
337 self.__defaults[key])
338 333
339 def setPreferences(self, key, value): 334 def setPreferences(self, key, value):
340 """ 335 """
341 Public method to store the various settings. 336 Public method to store the various settings.
342 337

eric ide

mercurial