I just posted a question here why python imports take as long as they do. Are there environments that don't require reinitializing modules? If so, what are they?
Details: I'm trying to learn basic python syntax while using extended libraries (matplotlib, mayavi), and each time I test my code I wait (several!!) seconds for the modules to load. There must be a faster way to do this, but I don't know what environments are well suited. Suggestions?
-
1Sounds like your setup is broken to me. Look at this to see what it's doing stackoverflow.com/questions/7332299/trace-python-imports. Also maybe check the problem is with the imports using the timeit module? And for completeness there's a builtin profiler as well. stackoverflow.com/questions/582336/…demented hedgehog– demented hedgehog2015年08月24日 04:12:37 +00:00Commented Aug 24, 2015 at 4:12
-
@dementedhedgehog the answer to the question I reference suggests that some modules just take a long time to load. I did a bit of profiling, and that seemed reasonableanon01– anon012015年08月24日 04:19:59 +00:00Commented Aug 24, 2015 at 4:19
2 Answers 2
Take a look at ipython and pandas they might be closer to what you want. Python does have a reload for modules but I'm not sure how well it works so anything that keeps a single python instance running and doesn't spawn python child processes is likely to fit the bill (sorry not sure what's available in that area).
2 Comments
Any environment with client/server architecture (short-lived cli/gui/web-clients, long-lived computational kernels) such as https://jupyter.org/ will do.
Comments
Explore related questions
See similar questions with these tags.