##// END OF EJS Templates
Added new option in %%cython cell magic to specify the module's name.
rossant -
Show More
@@ -147,6 +147,10 b' class CythonMagics(Magics):'
147 147 "multiple times)."
148 148 )
149 149 @magic_arguments.argument(
150 '-n', '--module_name', action='append', default=[],
151 help="Specify a name for the Cython module."
152 )
153 @magic_arguments.argument(
150 154 '-L', dest='library_dirs', metavar='dir', action='append', default=[],
151 155 help="Add a path to the list of libary directories (can be specified "
152 156 "multiple times)."
@@ -204,6 +208,9 b' class CythonMagics(Magics):'
204 208 # key which is hashed to determine the module name.
205 209 key += time.time(),
206 210
211 if args.module_name:
212 module_name = str(args.module_name[0])
213 else:
207 214 module_name = "_cython_magic_" + hashlib.md5(str(key).encode('utf-8')).hexdigest()
208 215 module_path = os.path.join(lib_dir, module_name + self.so_ext)
209 216
General Comments 0
You need to be logged in to leave comments. Login now