Skip to content
Browse files

hacks to get it (barely) working

  • Loading branch information...
1 parent 2ccc9fa commit 7cd6598b29ddbc9ef2eba5ed88df6174ea260652 @bfroehle committed Sep 27, 2012
View
2 IPython/core/magics/code.py
@@ -12,6 +12,8 @@
# Imports
#-----------------------------------------------------------------------------
+from __future__ import print_function
+
# Stdlib
import inspect
import io
View
2 IPython/core/magics/execution.py
@@ -12,6 +12,8 @@
# Imports
#-----------------------------------------------------------------------------
+from __future__ import print_function
+
# Stdlib
try:
import __builtin__ as builtin_mod
View
2 IPython/core/magics/namespace.py
@@ -12,6 +12,8 @@
# Imports
#-----------------------------------------------------------------------------
+from __future__ import print_function
+
# Stdlib
import gc
import re
View
3 IPython/utils/pickleshare.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-
""" PickleShare - a small 'shelve' like datastore with concurrency support
Like shelve, a PickleShareDB object acts like a normal dictionary. Unlike
@@ -33,6 +32,8 @@
"""
+from __future__ import print_function
+
from IPython.external.path import path as Path
import os,stat,time
import collections
View
16 ipython.py
@@ -19,6 +19,22 @@
# Py3 compatibility hacks, without assuming IPython itself is installed with
# the full py3compat machinery.
+# Egad!
+try:
+ os.getcwdu
+except AttributeError:
+ os.getcwdu = os.getcwd
+
+try:
+ import cPickle
+except:
+ import pickle
+ sys.modules['cPickle'] = pickle
+
+ import builtins
+ builtins.unicode = str
+ builtins.basestring = str
+
try:
execfile
except NameError:

0 comments on commit 7cd6598

Please sign in to comment.
Something went wrong with that request. Please try again.