Skip to content

Commit

Permalink
IPython integration tinyerp#51
Browse files Browse the repository at this point in the history
this is presuming that people who have IPython installed also want to use IPython, maybe there should be an option to turn off IPython?
  • Loading branch information
Kasper Souren committed Jul 29, 2014
1 parent 94675a7 commit e30900b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions erppeek.py
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,15 @@ def main():
if client.connect is not None:
if not client.user:
client.connect()
# Enter interactive mode
_interact(global_vars)

try:
# First try IPython
import IPython
sys.argv = [sys.argv[0]]
return IPython.start_ipython(user_ns=global_vars)
except ImportError:
# Enter interactive mode
_interact(global_vars)

if __name__ == '__main__':
main()

0 comments on commit e30900b

Please sign in to comment.