Re: standalone vs embedded interpreter

2013-04-09 Thread Chris Angelico
On Wed, Apr 10, 2013 at 1:52 AM, rusi wrote: > You probably need readline > See http://docs.python.org/2/library/cmd.html#cmd.Cmd.cmdloop > [Also try Control-P COntrol-N for up and down arrow] Be aware that GNU readline is GPL, not LGPL. This may have consequences if you distribute your code. Ch

Re: standalone vs embedded interpreter

2013-04-09 Thread Antoine Pitrou
Nick Gnedin gmail.com> writes: > I expect it to behave the same way as if I was running it as a > standalone program. On Windows this is indeed the case, but on my Linux > box (Python 3.3.1 (default, Apr 8 2013, 22:33:31) [GCC 4.1.2 20080704 > (Red Hat 4.1.2-51)]) I get a different behavior in

Re: standalone vs embedded interpreter

2013-04-09 Thread rusi
On Apr 9, 8:33 pm, Nick Gnedin wrote: > Folks, > > When simply I embed the interpreter: > >         #include "Python.h" > >         int main() >         { >           Py_Initialize(); >           PyRun_InteractiveLoop(stdin,"test"); >           Py_Finalize(); > >           return 0; >         } >

standalone vs embedded interpreter

2013-04-09 Thread Nick Gnedin
Folks, When simply I embed the interpreter: #include "Python.h" int main() { Py_Initialize(); PyRun_InteractiveLoop(stdin,"test"); Py_Finalize(); return 0; } I expect it to behave the same way as if I was running it as a