Repository : http://git.fedorahosted.org/cgit/cura-tools.git
On branch : master
commit b8fac496845af12c4492e40dd0f58ee17ce90d45 Author: Peter Hatina phatina@redhat.com Date: Tue Mar 4 09:21:50 2014 +0100
fix local imports
cli/lmi/shell/LMIConsole.py | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/cli/lmi/shell/LMIConsole.py b/cli/lmi/shell/LMIConsole.py index cb287a2..a369617 100644 --- a/cli/lmi/shell/LMIConsole.py +++ b/cli/lmi/shell/LMIConsole.py @@ -158,6 +158,10 @@ class LMIConsole(code.InteractiveConsole): sys.ps1 = LMIConsole.SHELL_PS1 sys.ps2 = LMIConsole.SHELL_PS2
+ # Add current working directory into Python's search list, so we can + # properly import any module placed in CWD + sys.path.insert(0, os.getcwd()) + # Interact more = 0 while 1: @@ -242,6 +246,10 @@ class LMIConsole(code.InteractiveConsole): locals["connect"] = connect self.locals = dict(self.locals.items() + locals.items())
+ # Add current working directory into Python's search list, so we can + # properly import any module placed in CWD + sys.path.insert(0, os.getcwd()) + # Execute the script sys.argv = script_argv exit_code = 0
cura-tools-devel@lists.fedorahosted.org