[IPython-dev] How to import python 7.x into python3 script
Chris Barker - NOAA Federal
chris.barker at noaa.gov
Mon Jan 27 11:59:54 EST 2020
I’m not sure I understand the question, but I don’t think you CAN use
iPytjon magic commands in scripts, they are designed to be used in the
interactive environment.
That being said, there may be some Particular commands’ functionality
available through the iPython API.
I, for one, would love to be able to put something like %timeit in a
script, if anyone knows how to do that.
-CHB
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 <x-apple-data-detectors://6/1> (206) 526-6317
main reception
On Jan 27, 2020, at 8:46 AM, Muhammad Fayed <m10fayed at gmail.com> wrote:
Sorry for my late reply,
I’ve tried “import IPython.ipapi”, but I get module not found error.
I think I’ll try to hack around my needs.
Thank you so much,
Sincerely,
Mohamed E. Fayed
On Jan 27, 2020, at 9:53 AM, Steve Holden <steve at holdenweb.com> wrote:
Hi there,
Thanks for your note. Unfortunately "Python 7.x" does not allow us to
identify the component you are trying to install. As far as magic commands
go, you msy get some assistance from the page at
https://stackoverflow.com/questions/10361206/how-to-run-an-ipython-magic-from-a-script-or-timing-a-python-script,
which details ways to make magics available inside scripting.
The auto-response message should also give you many possible sources for
further answers to your questions.
Kind regards,
Steve
On Mon, Jan 27, 2020 at 5:04 AM Muhammad Fayed <m10fayed at gmail.com> wrote:
> Hi,
> Hope my mail find you well,
> First, I want to make use of some python magic commands in my python
> script. How I could do it?
> Second, What if I’ll reuse the function in the script in ani python
> session, will it work or not? If not, what is the difference?
> Thank you so much,
> Sincerely,
> Mohamed E. Fayed
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at python.org
> https://mail.python.org/mailman/listinfo/ipython-dev
>
_______________________________________________
IPython-dev mailing list
IPython-dev at python.org
https://mail.python.org/mailman/listinfo/ipython-dev
_______________________________________________
IPython-dev mailing list
IPython-dev at python.org
https://mail.python.org/mailman/listinfo/ipython-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20200127/5658c072/attachment-0001.html>
More information about the IPython-dev
mailing list