[pytango] 109/483: removed store feature because ipython 0.11 doesn't have it
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.
commit 6652432bdde5e7d211967b5dc6feed1eba9b4c0b
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date: Mon Mar 12 13:28:03 2012 +0000
removed store feature because ipython 0.11 doesn't have it
git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@19681 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
PyTango/ipython/ipython_00_11/ipython_00_11.py | 41 +-------------------------
1 file changed, 1 insertion(+), 40 deletions(-)
diff --git a/PyTango/ipython/ipython_00_11/ipython_00_11.py b/PyTango/ipython/ipython_00_11/ipython_00_11.py
index de6c55c..b17ac94 100644
--- a/PyTango/ipython/ipython_00_11/ipython_00_11.py
+++ b/PyTango/ipython/ipython_00_11/ipython_00_11.py
@@ -201,9 +201,6 @@ def __get_device_subscriptions(dev_name):
if data is not None:
return data[4]
-def __switchdb_completer(ip, evt):
- return __get_store(ip, "database_list").keys()
-
__monitor_completer = __AttributeProxy_completer
#-------------------------------------------------------------------------------
@@ -673,33 +670,6 @@ def __build_color_scheme(ip, name):
ret["TBThreaded"] = TBThreadedColors, TBThreadedTangoColors
return ret
-def __set_store(ip, key=None, value=None):
- if key is not None:
- tango_store = ip.user_ns.get(_TANGO_STORE)
- tango_store[key] = value
- __store(ip, _TANGO_STORE)
-
-def __get_store(ip, key, nvalue=None):
- tango_store = ip.user_ns.get(_TANGO_STORE)
- if tango_store is None:
- ip.user_ns[_TANGO_STORE] = tango_store = {}
- v = tango_store.get(key)
- if v is None and nvalue is not None:
- tango_store[key] = nvalue
- v = nvalue
- return v
-
-def __store(ip, var):
- # this executes the magic command store which prints a lot of info. So, first
- # we hide the standard output
-
- stdout = sys.stdout
- try:
- sys.stdout = StringIO.StringIO()
- ip.magic("store %s" % var)
- finally:
- sys.stdout = stdout
-
#-------------------------------------------------------------------------------
# Initialization methods
#-------------------------------------------------------------------------------
@@ -820,20 +790,16 @@ def init_db(ip, parameter_s=''):
db._db_cache = db_cache
# Add this DB to the list of known DBs (for possible use in magic commands)
- valid_dbs = __get_store(ip, "database_list", {})
if db.get_db_port_num() == 10000:
db_name = db.get_db_host()
else:
db_name = "%s:%s" % (db.get_db_host(), db.get_db_port())
- valid_dbs[db_name] = None
- __set_store(ip)
-
return db
def init_magic(ip):
__expose_magic(ip, "refreshdb", magic_refreshdb)
__expose_magic(ip, "reloaddb", magic_refreshdb)
- __expose_magic(ip, "switchdb", magic_switchdb, __switchdb_completer)
+ __expose_magic(ip, "switchdb", magic_switchdb)
__expose_magic(ip, "lsdev", magic_lsdev)
__expose_magic(ip, "lsdevclass", magic_lsdevclass)
__expose_magic(ip, "lsserv", magic_lsserv)
@@ -880,11 +846,6 @@ def init_ipython(ip=None, store=True, pytango=True, colors=True, console=True,
global _tango_init
if _tango_init is True: return
- # 0.11 doesn't have store magic command so we ignore any store atempts
- if 'store' not in ip.lsmagic():
- global __store
- __store = lambda a, b : None
-
if pytango:
init_pytango(ip)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git
More information about the debian-science-commits
mailing list