Re: How to record the console's content in the interpreter?
eryk sun於 2019年8月24日星期六 UTC+8上午2時53分56秒寫道: > On 8/23/19, jf...@ms4.hinet.net wrote: > > > > it won't show output from print command, and "print" is the most > > command used in a module when a response was needed > > ConEmu is an alternate console for Windows that allows logging all > console output to a file: > > https://conemu.github.io/en/AnsiLogFiles.html Thank you for introducing this alternate console for Windows. I have downloaded the portable version and will give it a try soon. --Jach -- https://mail.python.org/mailman/listinfo/python-list
Re: How to record the console's content in the interpreter?
Terry Reedy於 2019年8月23日星期五 UTC+8下午7時27分50秒寫道: > On 8/23/2019 3:42 AM, jf...@ms4.hinet.net wrote: > > > Say I like to record everything showing in the console into a file > > after I start a debug session, and stop it when finished. It's not > > a console redirection. I still need to see what is going on during > > the session. > > > After a quick try on IPython 6.5.0, I saw only the commands I had typed, > > not include the output of those commands:-( > > IDLE saves exactly what you see in the window, including with a shell > session. One can also select and paste into a new editor window and > then save. > > > > -- > Terry Jan Reedy IDLE is the closest one to the command console I currently use. The mouse used in its shell really helps on my requirement:-) Thank you for reminding. --Jach -- https://mail.python.org/mailman/listinfo/python-list
Re: How to record the console's content in the interpreter?
On 8/23/19, jf...@ms4.hinet.net wrote: > > it won't show output from print command, and "print" is the most > command used in a module when a response was needed ConEmu is an alternate console for Windows that allows logging all console output to a file: https://conemu.github.io/en/AnsiLogFiles.html -- https://mail.python.org/mailman/listinfo/python-list
Re: How to record the console's content in the interpreter?
On Thu, Aug 22, 2019 at 07:38:54PM -0700, jf...@ms4.hinet.net wrote: > Say I like to record everything showing in the console into a file > after I start a debug session, and stop it when finished. It's not a > console redirection. I still need to see what is going on during the > session. > You may be looking for Eshell, but to be sure you have to try, I have no idea how well this works in Windows. After running your stuff in it, all session is present in Emacs' buffer (if I undestand it correctly) and you can do with a buffer however you please (within limitations of Emacs, which are broad), including save to file: Eshell is a shell-like command interpreter implemented in Emacs Lisp. It invokes no external processes except for those requested by the user. It is intended to be an alternative to the IELM (see Emacs Lisp Interaction) REPL for Emacs and with an interface similar to command shells such as bash, zsh, rc, or 4dos. [ https://www.gnu.org/software/emacs/manual/html_mono/eshell.html ] -- Regards, Tomasz Rola -- ** A C programmer asked whether computer had Buddha's nature. ** ** As the answer, master did "rm -rif" on the programmer's home** ** directory. And then the C programmer became enlightened... ** ** ** ** Tomasz Rola mailto:tomasz_r...@bigfoot.com ** -- https://mail.python.org/mailman/listinfo/python-list
Re: How to record the console's content in the interpreter?
On 8/23/2019 3:42 AM, jf...@ms4.hinet.net wrote: Say I like to record everything showing in the console into a file after I start a debug session, and stop it when finished. It's not a console redirection. I still need to see what is going on during the session. After a quick try on IPython 6.5.0, I saw only the commands I had typed, not include the output of those commands:-( IDLE saves exactly what you see in the window, including with a shell session. One can also select and paste into a new editor window and then save. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-list
Re: How to record the console's content in the interpreter?
Manfred Lotz於 2019年8月23日星期五 UTC+8下午6時08分11秒寫道: > On Fri, 23 Aug 2019 00:42:26 -0700 (PDT) > jf...@ms4.hinet.net wrote: > > > Manfred Lotz於 2019年8月23日星期五 UTC+8下午2時58分48秒寫道: > > > On Thu, 22 Aug 2019 21:48:33 -0700 (PDT) > > > jf...@ms4.hinet.net wrote: > > > > > > > Cameron Simpson於 2019年8月23日星期五 > > > > UTC+8下午12時09分54秒寫道: > > > > > On 22Aug2019 19:38, Jach Fong wrote: > > > > > >Say I like to record everything showing in the console into a > > > > > >file after I start a debug session, and stop it when finished. > > > > > >It's not a console redirection. I still need to see what is > > > > > >going on during the session. > > > > > > > > > > If you're in a terminal you can run the 'script" command. This > > > > > starts a new shell inside a session which records itself to the > > > > > file "typescript" (by default). See "man script" for further > > > > > details. > > > > > > > > > > Cheers, > > > > > Cameron Simpson > > > > > > > > Mine is Windows:-( No 'script' command? > > > > > > > > --Jach > > > > > > If I understand you correctly you want to save an interactive > > > session!? > > > > > > Then you could use ipython. In ipython the lines get numbererd. If > > > your last line is, for example: In [100] you could do this: > > > > > > save mysave 1-100 > > > > > > in the ipython shell. > > > > > > -- > > > Manfred > > > > After a quick try on IPython 6.5.0, I saw only the commands I had > > typed, not include the output of those commands:-( > > > > Sorry, that's true. > > I found only this. After starting ipython type: > > %logstart -o > > Then you get also command output. The log file name is: ipython_log.py > > But it doesn't seem to show output from print command. > > > -- > Manfred You are right, it won't show output from print command, and "print" is the most command used in a module when a response was needed for the user:-( --Jach -- https://mail.python.org/mailman/listinfo/python-list
Re: How to record the console's content in the interpreter?
On Fri, 23 Aug 2019 00:42:26 -0700 (PDT) jf...@ms4.hinet.net wrote: > Manfred Lotz於 2019年8月23日星期五 UTC+8下午2時58分48秒寫道: > > On Thu, 22 Aug 2019 21:48:33 -0700 (PDT) > > jf...@ms4.hinet.net wrote: > > > > > Cameron Simpson於 2019年8月23日星期五 > > > UTC+8下午12時09分54秒寫道: > > > > On 22Aug2019 19:38, Jach Fong wrote: > > > > >Say I like to record everything showing in the console into a > > > > >file after I start a debug session, and stop it when finished. > > > > >It's not a console redirection. I still need to see what is > > > > >going on during the session. > > > > > > > > If you're in a terminal you can run the 'script" command. This > > > > starts a new shell inside a session which records itself to the > > > > file "typescript" (by default). See "man script" for further > > > > details. > > > > > > > > Cheers, > > > > Cameron Simpson > > > > > > Mine is Windows:-( No 'script' command? > > > > > > --Jach > > > > If I understand you correctly you want to save an interactive > > session!? > > > > Then you could use ipython. In ipython the lines get numbererd. If > > your last line is, for example: In [100] you could do this: > > > > save mysave 1-100 > > > > in the ipython shell. > > > > -- > > Manfred > > After a quick try on IPython 6.5.0, I saw only the commands I had > typed, not include the output of those commands:-( > Sorry, that's true. I found only this. After starting ipython type: %logstart -o Then you get also command output. The log file name is: ipython_log.py But it doesn't seem to show output from print command. -- Manfred -- https://mail.python.org/mailman/listinfo/python-list
Re: How to record the console's content in the interpreter?
Manfred Lotz於 2019年8月23日星期五 UTC+8下午2時58分48秒寫道: > On Thu, 22 Aug 2019 21:48:33 -0700 (PDT) > jf...@ms4.hinet.net wrote: > > > Cameron Simpson於 2019年8月23日星期五 UTC+8下午12時09分54秒寫道: > > > On 22Aug2019 19:38, Jach Fong wrote: > > > >Say I like to record everything showing in the console into a file > > > >after I start a debug session, and stop it when finished. It's not > > > >a console redirection. I still need to see what is going on during > > > >the session. > > > > > > If you're in a terminal you can run the 'script" command. This > > > starts a new shell inside a session which records itself to the > > > file "typescript" (by default). See "man script" for further > > > details. > > > > > > Cheers, > > > Cameron Simpson > > > > Mine is Windows:-( No 'script' command? > > > > --Jach > > If I understand you correctly you want to save an interactive session!? > > Then you could use ipython. In ipython the lines get numbererd. If your > last line is, for example: In [100] you could do this: > > save mysave 1-100 > > in the ipython shell. > > -- > Manfred After a quick try on IPython 6.5.0, I saw only the commands I had typed, not include the output of those commands:-( --Jach -- https://mail.python.org/mailman/listinfo/python-list
Re: How to record the console's content in the interpreter?
On Thu, 22 Aug 2019 21:48:33 -0700 (PDT) jf...@ms4.hinet.net wrote: > Cameron Simpson於 2019年8月23日星期五 UTC+8下午12時09分54秒寫道: > > On 22Aug2019 19:38, Jach Fong wrote: > > >Say I like to record everything showing in the console into a file > > >after I start a debug session, and stop it when finished. It's not > > >a console redirection. I still need to see what is going on during > > >the session. > > > > If you're in a terminal you can run the 'script" command. This > > starts a new shell inside a session which records itself to the > > file "typescript" (by default). See "man script" for further > > details. > > > > Cheers, > > Cameron Simpson > > Mine is Windows:-( No 'script' command? > > --Jach If I understand you correctly you want to save an interactive session!? Then you could use ipython. In ipython the lines get numbererd. If your last line is, for example: In [100] you could do this: save mysave 1-100 in the ipython shell. -- Manfred -- https://mail.python.org/mailman/listinfo/python-list
Re: How to record the console's content in the interpreter?
On 22Aug2019 21:48, Jach Fong wrote: Cameron Simpson於 2019年8月23日星期五 UTC+8下午12時09分54秒寫道: On 22Aug2019 19:38, Jach Fong wrote: >Say I like to record everything showing in the console into a file >after I start a debug session, and stop it when finished. It's not >a console redirection. I still need to see what is going on during >the session. If you're in a terminal you can run the 'script" command. This starts a new shell inside a session which records itself to the file "typescript" (by default). See "man script" for further details. Mine is Windows:-( No 'script' command? Maybe not. Cygwin (UNIX emulator) or the Window Linux facility might provide it. Otherwise a Windows person will need to advise you; I can't. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list
Re: How to record the console's content in the interpreter?
Cameron Simpson於 2019年8月23日星期五 UTC+8下午12時09分54秒寫道: > On 22Aug2019 19:38, Jach Fong wrote: > >Say I like to record everything showing in the console into a file > >after I start a debug session, and stop it when finished. It's not > >a console redirection. I still need to see what is going on during > >the session. > > If you're in a terminal you can run the 'script" command. This starts a > new shell inside a session which records itself to the file "typescript" > (by default). See "man script" for further details. > > Cheers, > Cameron Simpson Mine is Windows:-( No 'script' command? --Jach -- https://mail.python.org/mailman/listinfo/python-list
Re: How to record the console's content in the interpreter?
On 22Aug2019 19:38, Jach Fong wrote: Say I like to record everything showing in the console into a file after I start a debug session, and stop it when finished. It's not a console redirection. I still need to see what is going on during the session. If you're in a terminal you can run the 'script" command. This starts a new shell inside a session which records itself to the file "typescript" (by default). See "man script" for further details. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list
How to record the console's content in the interpreter?
Say I like to record everything showing in the console into a file after I start a debug session, and stop it when finished. It's not a console redirection. I still need to see what is going on during the session. --Jach -- https://mail.python.org/mailman/listinfo/python-list