Is there another way to obtain the same result in python without using 
magics?
There are many use cases but at least I would like to be able at least to:
1) run/call a script from another script
   this is achieved in ipython with %run -i myFile.py
2) make python use changes when you edit a file




Il giorno martedì 27 settembre 2016 21:52:22 UTC+2, Almar Klein ha scritto:
>
> No, its not possible to use magics in the script. This is deliberate, 
> since it would be invalid Python. Not sure why the use of the ipython API 
> calls would not work. Pyzo’s IPython shell is not completely a proper 
> IPython shell, so it might be that we don’t do enough for this to be picked 
> up somehow…
>
>  
>
> What is the problem that you’re trying to fix, or workflow that you’re 
> trying to achieve? Maybe there are other ways to make it work.
>
>  
>
> - Almar
>
>  
>
>  
>
>  
>
> *From: *Dietrich Pescoller <javascript:>
> *Sent: *27 September 2016 18:22
> *To: *Pyzo <javascript:>
> *Subject: *[Pyzo] how to execute python magics from script
>
>  
>
> Is there a way to execute ipython magics from script in IEP.
> In particular I'm interested in startup script
>
> I tired something like this:
>
> from IPython import get_ipython
>
> get_ipython().magic('load_ext autoreload')
>
> get_ipython().magic('autoreload 2')
>
>  
>
> Which works in a standard ipython console but does not work when using IEP.
>
>
>
> Any suggestion would be apprecieated
>
> Thanks,
> Dietrich
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Pyzo" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to pyzo+uns...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Pyzo" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pyzo+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to