Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
627484ef
Commit
627484ef
authored
Jun 27, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify IPython %%cython_inline implementation; avoid unnecessary global import
parent
6fda5a45
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Cython/Build/IpythonMagic.py
Cython/Build/IpythonMagic.py
+4
-3
No files found.
Cython/Build/IpythonMagic.py
View file @
627484ef
...
...
@@ -73,8 +73,9 @@ from IPython.utils import py3compat
from
IPython.utils.path
import
get_ipython_cache_dir
from
IPython.utils.text
import
dedent
import
Cyth
on
from
..Shadow
import
__version__
as
cython_versi
on
from
..Compiler.Errors
import
CompileError
from
.Inline
import
cython_inline
from
.Dependencies
import
cythonize
...
...
@@ -107,7 +108,7 @@ class CythonMagics(Magics):
"""
locs
=
self
.
shell
.
user_global_ns
globs
=
self
.
shell
.
user_ns
return
Cython
.
inline
(
cell
,
locals
=
locs
,
globals
=
globs
)
return
cython_
inline
(
cell
,
locals
=
locs
,
globals
=
globs
)
@
cell_magic
def
cython_pyximport
(
self
,
line
,
cell
):
...
...
@@ -211,7 +212,7 @@ class CythonMagics(Magics):
code
=
cell
if
cell
.
endswith
(
'
\
n
'
)
else
cell
+
'
\
n
'
lib_dir
=
os
.
path
.
join
(
get_ipython_cache_dir
(),
'cython'
)
quiet
=
True
key
=
code
,
sys
.
version_info
,
sys
.
executable
,
Cython
.
__version__
key
=
code
,
sys
.
version_info
,
sys
.
executable
,
cython_version
if
not
os
.
path
.
exists
(
lib_dir
):
os
.
makedirs
(
lib_dir
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment