Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #55481
| References | <fa461da1-19d9-41e5-8af2-de6c73540023@googlegroups.com> <CAHVvXxTnF+spc7Q5arvu54UF28yoZsPnvz_RJEgyjQ=wJ94_tg@mail.gmail.com> |
|---|---|
| Date | 2013-10-04 07:16 -0700 |
| Subject | Re: ipy %run noob confusion |
| From | Jeff Shrager <jshrager@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.723.1380896217.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
Thank you. This is extremely helpful. The key that I was missing is that it's running them outside of the ipy context. I also discovered that if you call the script .ipy instead of .py, it actually does more or less what I was expecting -- that is, it allows magic commands, and I got the thing working as desired through this means. I do appreciate the concern that my script should be "real" python, and I would aim for that eventually, but while I'm experimenting, it's useful to be able to have the interactive and script work the same way. I'm happy to "real-ify" it later. BTW, I generally work the opposite way than %edit: I code in emacs, and have a shell that's running ipy. Actually ipy is bad at this because it sends all sorts of terminal crap that I can probably get rid of somehow, but working this way has many advantages, not the least of which is that you don't have to fire up editors over and over (my editor context is primary), and I get an automatic log of my whole session in the shell buffer. This mode has served me well using regular python, because I didn't have the .ipy v. .py problem, but when I started into ipyton, things no longer worked. But your guidance (and others) have help deconfuse me on this. Thanks again!
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
ipy %run noob confusion jshrager@gmail.com - 2013-10-03 10:42 -0700 Re: ipy %run noob confusion Terry Reedy <tjreedy@udel.edu> - 2013-10-03 15:26 -0400 Re: ipy %run noob confusion Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-03 20:34 +0100 Re: ipy %run noob confusion Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-10-04 10:36 +0100 Re: ipy %run noob confusion Jeff Shrager <jshrager@gmail.com> - 2013-10-04 07:16 -0700
csiph-web