Re: jupyter console vs. ipython in Emacs

2021-12-20 Thread Pieter van Oostrum
Pieter van Oostrum writes: > My Python development environment is Emacs. I used to use 'jupyter > console --simple-prompt' (driven by Emacs comint) to do interactive > work, but it has the disadvantage that it doesn't work properly with > multiline input, inclu

jupyter console vs. ipython in Emacs

2021-12-19 Thread Pieter van Oostrum
My Python development environment is Emacs. I used to use 'jupyter console --simple-prompt' (driven by Emacs comint) to do interactive work, but it has the disadvantage that it doesn't work properly with multiline input, including pastes. However, I discovered that 'ipython

Re: Why is "Subscribing to topic topic/test" printed in console log before connect message?

2019-09-10 Thread Chris Angelico
On Wed, Sep 11, 2019 at 3:01 AM Spencer Du wrote: > > Hi > > I have code for publish and subscribe over mqtt. In the console log I have > "Subscribing to topic topic/test" printed before connect message why is this? > I want to this to be printed after the connec

Re: Why is "Subscribing to topic topic/test" printed in console log before connect message?

2019-09-10 Thread MRAB
On 2019-09-10 17:59, Spencer Du wrote: Hi I have code for publish and subscribe over mqtt. In the console log I have "Subscribing to topic topic/test" printed before connect message why is this? I want to this to be printed after the connect message. How do I fix this problem. P

Why is "Subscribing to topic topic/test" printed in console log before connect message?

2019-09-10 Thread Spencer Du
Hi I have code for publish and subscribe over mqtt. In the console log I have "Subscribing to topic topic/test" printed before connect message why is this? I want to this to be printed after the connect message. How do I fix this problem. Please run gui.py to test. gui.

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-19 Thread Peter J. Holzer
On 2019-03-19 14:22:10 -, Grant Edwards wrote: > On 2019-03-18, Malcolm Greene wrote: > > Wondering if there's a way to have my Python scripts ignore these > > Ctrl+S signals or if this behavior is outside of my Python script's > > control. > > This has nothing to do with Python does it? > >

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-19 Thread eryk sun
via the edit menu or Ctrl+M. If it had been a Ctrl+S pause, the only way to programmatically disable it for the current console is to disable line-input mode, which is what msvcrt.getwch() does temporarily. However, disabling line-input mode in general would break the REPL and input(). [1]: https:

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-19 Thread Malcolm Greene
> This has nothing to do with Python does it? Isn't Python is just writing to > stdout and those write calls are blocking due because the terminal emulator > has stopped reading the other end of the > pipe/pty/queue/buffer/whatever-it's-called-in-windows? You're right. But I wasn't sure. I know

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-19 Thread Grant Edwards
On 2019-03-18, Malcolm Greene wrote: > Wondering if there's a way to have my Python scripts ignore these > Ctrl+S signals or if this behavior is outside of my Python script's > control. This has nothing to do with Python does it? Isn't Python is just writing to stdout and those write calls are

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-19 Thread eryk sun
n script's control. If >> there's a way to disable this behavior under Windows 10/Windows Server >> 2016, I'm open to that as well. >> > > / (XOFF/XON) are traditional terminal control codes to > stop/start transmission. The behavior is baked into the

Re: Block Ctrl+S while running Python script at Windows console? (solved)

2019-03-18 Thread Malcolm Greene
Eryk, > Another common culprit is quick-edit mode, in which case a stray mouse click > can select text, even just a single character. The console pauses while text > is selected. MYSTERY SOLVED !! THANK YOU !! Apparently, while mouse clicking between windows, I was inadvertently sel

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-18 Thread eryk sun
On 3/18/19, eryk sun wrote: > > Ctrl+S functions as pause in line-edit mode if extended text selection > is enabled in the console defaults or properties dialog Correction, it pauses if extended text selection is *disabled*. -- https://mail.python.org/mailman/listinfo/python-list

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-18 Thread eryk sun
On 3/18/19, Malcolm Greene wrote: > > I'm running some Python 3.6 scripts at the Windows 10/Windows Server 2016 > console. In my every day workflow, I seem to be accidentally sending Ctrl+S > keystrokes to some of console sessions, pausing my running scripts until I > send a

Block Ctrl+S while running Python script at Windows console?

2019-03-18 Thread Malcolm Greene
I'm running some Python 3.6 scripts at the Windows 10/Windows Server 2016 console. In my every day workflow, I seem to be accidentally sending Ctrl+S keystrokes to some of console sessions, pausing my running scripts until I send another corresponding Ctrl+S to un-pause the affected script

Re: print console out to a txt or csv file

2019-02-10 Thread Peter Otten
GISDude wrote: > Hi all, > I have been working on some code to list the files of a folder that has > .pdf extension. I have the basic code to create a list, but it prints that > list to the console. I'd like my code to write a txt file that contains > that list (to lat

print console out to a txt or csv file

2019-02-10 Thread GISDude
Hi all, I have been working on some code to list the files of a folder that has .pdf extension. I have the basic code to create a list, but it prints that list to the console. I'd like my code to write a txt file that contains that list (to later import into excel). ###A script to lis

Re: Python Console Menu

2018-07-31 Thread Juraj Papic via Python-list
Thanks for the links [image: cid:D5DA6341-AA78-4808-9639-F19B8AB3CBE8] *Juraj A. Papic* Arquitecto de Soluciones juraj.pa...@bghtechpartner.com Arias 1639/41. C1429DWA. Bs. As., Argentina. T. +54 11 5080-7400 M. +54 911 3445-6944 Skype juraj.papic www.bghtechpartner.com 2018-07-31 1

Re: Python Console Menu

2018-07-31 Thread Jerry Hill
On Tue, Jul 31, 2018 at 12:31 PM juraj.papic--- via Python-list wrote: > I will check the links thanks for that tips, is there any page where I can > see more examples? I like Doug Hellmann's Python Module of the Week site for in-depth looks at particular modules (including subprocess). If you'

Re: Python Console Menu

2018-07-31 Thread juraj.papic--- via Python-list
El martes, 31 de julio de 2018, 11:56:47 (UTC-3), Tcpip escribió: > Hi all, > > Im new with python, im working on a Python console Menu, I found some > examples on Git, but what I need to understand is how I can call a > subprocess. > > Here is an Example , > > if

RE: Python Console Menu

2018-07-31 Thread David Raymond
ond=tomtom@python.org] On Behalf Of Tcpip via Python-list Sent: Tuesday, July 31, 2018 10:56 AM To: python-list@python.org Subject: Python Console Menu Hi all, Im new with python, im working on a Python console Menu, I found some examples on Git, but what I need to understand is how I

Python Console Menu

2018-07-31 Thread Tcpip via Python-list
Hi all, Im new with python, im working on a Python console Menu, I found some examples on Git, but what I need to understand is how I can call a subprocess. Here is an Example , if choice==1: print "Test SSH Connection (check ssh to all hosts)" ## You can add yo

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-12 Thread jkn
Hi All thanks for the comments and confirmation that this is not really possible in a Tkinter environment. I had thought of using ncurses but was shying clear of learning about another set of widgets etc. just now. The output of the simulator is simple enough that it could just accept simple

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Terry Reedy
. However I also want to be able to offer an alternative of a console-only operation. So I have a variant View with the beginnings of this. Naturally I want to keep this as similar as possible to my Tkinter-based view. I had thought that I had seen a guide somewhere to using Tk/Tkinter in a non

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Rodrigo Bistolfi
lator program with a Model-View_Controller >> architecture. I >> have written the View part using Tkinter in the first instance; later I >> plan >> to use Qt. >> >> However I also want to be able to offer an alternative of a console-only >> operation. So I have a vari

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Jim Lee
. However I also want to be able to offer an alternative of a console-only operation. So I have a variant View with the beginnings of this. Naturally I want to keep this as similar as possible to my Tkinter-based view. I had thought that I had seen a guide somewhere to using Tk/Tkinter in a non-GUI

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Chris Angelico
the first instance; later I plan > to use Qt. > > However I also want to be able to offer an alternative of a console-only > operation. So I have a variant View with the beginnings of this. > > Naturally I want to keep this as similar as possible to my Tkinter-based > view.

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Michael Torrie
On 07/11/2018 08:09 AM, jkn wrote: > So I am looking for confirmation of this, and/or whether there is any way of > running a Tkinter application in 'console' mode, running a main loop and> > both outputting data and accepting, and acting on, key presses. So far as I know,

Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread jkn
offer an alternative of a console-only operation. So I have a variant View with the beginnings of this. Naturally I want to keep this as similar as possible to my Tkinter-based view. I had thought that I had seen a guide somewhere to using Tk/Tkinter in a non-GUI form. I don't seem to be ab

Re: Console

2018-03-07 Thread eryk sun
artup error. I was told to start IDLE in a console with idlelib >>> and see what python binary i was runnning IDLE with. Im using windows 10 and >>> i guess console refers to the terminal window and i have no idea what they >>> meant by "the binary its running with" &

Re: Console

2018-03-07 Thread bartc
On 07/03/2018 15:34, Wolfgang Maier wrote: On 03/07/2018 03:41 PM, Jeremy Jamar St. Julien wrote: I had an problem when trying to start the python GUI. It said there was a subprocess startup error. I was told to start IDLE in a console with idlelib and see what python binary i was runnning

Re: Console

2018-03-07 Thread Jeremy Jamar St. Julien
7, 2018 8:55:30 AM Subject: Re: Console On 07/03/18 14:41, Jeremy Jamar St. Julien wrote: > I had an problem when trying to start the python GUI. It said there was a > subprocess startup error. I was told to start IDLE in a console with idlelib > and see what python binary i was run

Re: Console

2018-03-07 Thread eryk sun
On Wed, Mar 7, 2018 at 2:41 PM, Jeremy Jamar St. Julien wrote: > I had an problem when trying to start the python GUI. It said there was a > subprocess startup > error. I was told to start IDLE in a console with idlelib and see what python > binary i was > runnning IDLE with. I

Re: Console

2018-03-07 Thread Wolfgang Maier
On 03/07/2018 03:41 PM, Jeremy Jamar St. Julien wrote: I had an problem when trying to start the python GUI. It said there was a subprocess startup error. I was told to start IDLE in a console with idlelib and see what python binary i was runnning IDLE with. Im using windows 10 and i guess

Re: Console

2018-03-07 Thread Rhodri James
On 07/03/18 14:41, Jeremy Jamar St. Julien wrote: I had an problem when trying to start the python GUI. It said there was a subprocess startup error. I was told to start IDLE in a console with idlelib and see what python binary i was runnning IDLE with. Im using windows 10 and i guess console

Console

2018-03-07 Thread Jeremy Jamar St. Julien
I had an problem when trying to start the python GUI. It said there was a subprocess startup error. I was told to start IDLE in a console with idlelib and see what python binary i was runnning IDLE with. Im using windows 10 and i guess console refers to the terminal window and i have no idea

Re: How do I send keystrokes to a console window in Windows XP?

2018-01-08 Thread zxymike93
在 2005年7月16日星期六 UTC+8下午8:46:34,Benji York写道: > googlegro...@garringer.net wrote: > > How do I use Python to send keystrokes to a console window in Windows > > XP? > > import win32com.client > > shell = win32com.client.Dispatch("WScript.Shell"

Re: How do I send keystrokes to a console window in Windows XP?

2017-11-28 Thread jglobocnik37
On Saturday, July 16, 2005 at 2:46:34 PM UTC+2, Benji York wrote: > googlegro...@garringer.net wrote: > > How do I use Python to send keystrokes to a console window in Windows > > XP? > > import win32com.client > > shell = win32com.client.Dispatch("WScript.Shel

Re: python console menu level looping

2017-09-25 Thread ROGER GRAYDON CHRISTMAN
On Mon, Sep 24, 2017 09:41 PM, Daiyue Weng wrote: > Hi, I tried to make a menu using print statements in Python 3. The code is >as follows, > >print('insert data into: ') >data_insert_method = ['new collection', 'existing collection'] >for index, elem in enumerate(data_insert_method): >print(ind

Re: python console menu level looping

2017-09-24 Thread Cameron Simpson
On 24Sep2017 21:41, Daiyue Weng wrote: Hi, I tried to make a menu using print statements in Python 3. The code is as follows, One thing, please try to preserve the code indenting in messages. What you pasted is all hard against the left side of the screen. I've tried to repair it. print('

Re: python console menu level looping

2017-09-24 Thread Daiyue Weng
Sry for the unclear formatting, this is the original code with correct format (copy from pycharm), print('insert data into: ') data_insert_method = ['new collection', 'existing collection'] for index, elem in enumerate(data_insert_method): print(index, '-', elem) while 1: how_to_insert =

Re: python console menu level looping

2017-09-24 Thread Daiyue Weng
well, in my case, there is no GUI, and we do not intend to use it since this script is only for internal testing purposes. So I am just wondering how to loop menu in this context. On 24 September 2017 at 22:03, Stefan Ram wrote: > Daiyue Weng writes: > >I am wondering how to loop back to the 1s

python console menu level looping

2017-09-24 Thread Daiyue Weng
Hi, I tried to make a menu using print statements in Python 3. The code is as follows, print('insert data into: ') data_insert_method = ['new collection', 'existing collection'] for index, elem in enumerate(data_insert_method): print(index, '-', elem) while 1: how_to_insert = input('Choose a meth

Re: Run Windows commands from Python console

2017-09-12 Thread Rick Johnson
Stephan Houben wrote: > Rick Johnson schreef: > > It seems to me the best solution is for the TCL/Tk folks > > to provide a configuration utility that stores user > > preferences in the registry, or some other OS provided > > mechanism, as to have these settings reset on every > > invocation of the

Re: Run Windows commands from Python console

2017-09-11 Thread Stephan Houben
Op 2017-09-10, Rick Johnson schreef : > It seems to me the best solution is for the TCL/Tk folks to > provide a configuration utility that stores user preferences > in the registry, or some other OS provided mechanism, as to > have these settings reset on every invocation of the > application would

Re: Run Windows commands from Python console

2017-09-10 Thread Rick Johnson
Stephan Houben wrote: > Rick Johnson schreef: > > > One of the nice (current) features of Tkinter menus (that > > i sometimes miss on my windows box!) is the ability to > > "tear- off" a menu cascade and use it as a sort of "pseudo > > tool bar". > > I was under the impression that Tk also supporte

Re: Run Windows commands from Python console

2017-09-08 Thread Stephan Houben
Op 2017-09-06, Rick Johnson schreef : > One of the nice (current) features of Tkinter menus (that i > sometimes miss on my windows box!) is the ability to "tear- > off" a menu cascade and use it as a sort of "pseudo tool > bar". I was under the impression that Tk also supported tear-off menus un

Re: Run python module from console

2017-09-06 Thread Thomas Jollans
On 05/09/17 17:14, Andrej Viktorovich wrote: > Hello, > > I suppose I can run python module by passing module as param for executable: > > python.exe myscr.py > > But how to run script when I'm inside of console and have python prompt: > The runpy modul

Re: Run Windows commands from Python console

2017-09-05 Thread Rick Johnson
Terry Reedy wrote: > Rick Johnson wrote: [...] > > When i'm away from an editor (like IDLE, for instance), > > one of the features i miss most is the ability to right > > click the line of the exception message (you know, the one > > that includes the offending line number and offending > > scri

Re: Run python module from console

2017-09-05 Thread Grant Edwards
On 2017-09-05, Andrej Viktorovich wrote: > Hello, > > I suppose I can run python module by passing module as param for executable: > > python.exe myscr.py > > But how to run script when I'm inside of console and have python prompt: > >>>> os.system(

Re: Run python module from console

2017-09-05 Thread Rhodri James
On 05/09/17 17:11, Stefan Ram wrote: Ned Batchelder writes: exec( compile( open( 'myscr.py', 'rb' ).read(), 'myscr.py', 'exec' )) . This looks quite complicated, but there are rumors that Python 4 might have a »execfile« function, and one then will be able to write: execfile( 'myscr.py' ) It'

Re: Run python module from console

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 8:45:00 PM UTC+5:30, Andrej Viktorovich wrote: > Hello, > > I suppose I can run python module by passing module as param for executable: > > python.exe myscr.py > > But how to run script when I'm inside of console and have python prom

Re: Run python module from console

2017-09-05 Thread Ned Batchelder
On 9/5/17 11:16 AM, Stefan Ram wrote: > Andrej Viktorovich writes: >> I suppose I can run python module by passing module as param for executable: >> python.exe myscr.py >> But how to run script when I'm inside of console and have python prompt: The Python cons

Re: Run python module from console

2017-09-05 Thread Rustom Mody
On Tuesday, September 5, 2017 at 8:45:00 PM UTC+5:30, Andrej Viktorovich wrote: > Hello, > > I suppose I can run python module by passing module as param for executable: > > python.exe myscr.py > > But how to run script when I'm inside of console and have python p

Run python module from console

2017-09-05 Thread Andrej Viktorovich
Hello, I suppose I can run python module by passing module as param for executable: python.exe myscr.py But how to run script when I'm inside of console and have python prompt: >>> -- https://mail.python.org/mailman/listinfo/python-list

Re: Run Windows commands from Python console

2017-09-04 Thread Terry Reedy
On 9/4/2017 5:50 PM, Rick Johnson wrote: Terry Reedy wrote: [...] In IDLE, trackbacks *do* include source lines. >>> def f(): return 1/0 >>> f() Traceback (most recent call last): File "", line 1, in f() File "", line 2, in f return 1/0 ZeroDivisionError: div

Re: Run Windows commands from Python console

2017-09-04 Thread Rick Johnson
ly realize that -- RATS! -- in the process of locating the offending _script_ you've forgotten the number of the offending _line_. So alas, you go back to the console window and eyeball parse the exception dump (again!) until you find the offending line number... (a few seconds passes whilst rick

Re: Run Windows commands from Python console

2017-09-03 Thread Terry Reedy
ding from stdin (i.e. the file stream opened for console input). It's not exactly smart about this, either, since whenever an exception is raised in the REPL it will try to open this fake file multiple times, including trying every entry in sys.path. For example, in a typical Python 3.6 all-u

Re: Run Windows commands from Python console

2017-09-03 Thread eryk sun
On Sun, Sep 3, 2017 at 7:56 AM, wrote: > > I run Python console in Windows. Can I run cmd prompt commands > there? Python doesn't know the first thing about CMD's "batch" language. Also, Python's shell (i.e. REPL) is not a system administration shell that impl

Re: Run Windows commands from Python console

2017-09-03 Thread Rick Johnson
On Sunday, September 3, 2017 at 7:57:14 AM UTC-5, g.mor...@gmail.com wrote: > Hello, > > I run Python console in Windows. Can I run cmd prompt commands there? > > If I run command dir I have: > > >>> dir > > > What does it means? It means that the exp

Run Windows commands from Python console

2017-09-03 Thread g . morkvenas
Hello, I run Python console in Windows. Can I run cmd prompt commands there? If I run command dir I have: >>> dir What does it means? If i trying to create file I have error: >>> type NUL > hh.txt File "", line 1 type NUL > hh.txt ^ Syntax

Re: Turtle graphics under the console under Windows

2017-08-25 Thread Michael Torrie
On 08/25/2017 06:10 AM, Stefan Ram wrote: > Do I miss any means to make the turtle graphics window > behave more normally and at the same time be able to draw > graphics interactivley from the console, watching the result > of one move command and then interacticely typing in m

pythonpath in ipython console

2017-07-12 Thread christoph
hello, I am a bit confused, i use spyder, when i execute in ipython console program start fails with message 'Attribute error' when I start same program via python console everything works fine, even start from terminal workes fine. It seems that i python does not load Pythonpath

Re: Python 3.5+ Arrow keys and others in the console

2017-04-16 Thread Vincent Vande Vyvre
Le 16/04/17 à 15:19, Wolfgang Maier a écrit : On 16.04.2017 10:56, Vincent Vande Vyvre wrote: Hi, I'm using Python 3.5 and 3.6 in venv and I see a strange behaviour in the interactive interpreter. The arrow keys can't be used to move the cursor into the current line of code or to rewrite the l

Re: Python 3.5+ Arrow keys and others in the console

2017-04-16 Thread Wolfgang Maier
On 16.04.2017 10:56, Vincent Vande Vyvre wrote: Hi, I'm using Python 3.5 and 3.6 in venv and I see a strange behaviour in the interactive interpreter. The arrow keys can't be used to move the cursor into the current line of code or to rewrite the last lines. With the 3.5 I can use the backspac

Python 3.5+ Arrow keys and others in the console

2017-04-16 Thread Vincent Vande Vyvre
Hi, I'm using Python 3.5 and 3.6 in venv and I see a strange behaviour in the interactive interpreter. The arrow keys can't be used to move the cursor into the current line of code or to rewrite the last lines. With the 3.5 I can use the backspace and erase the code but not in 3.6 Python 3

Re: print to previous line in console

2016-10-03 Thread Adam M
On Monday, October 3, 2016 at 12:46:41 PM UTC-4, Skip Montanaro wrote: > On Mon, Oct 3, 2016 at 10:23 AM, udhay prakash pethakamsetty > > Hi skip, > > > > I am unable to even install that curses package > > > > > > C:\>pip install curses > > Collecting curses > > Could not find a version that sat

Re: print to previous line in console

2016-10-03 Thread Skip Montanaro
On Mon, Oct 3, 2016 at 10:23 AM, udhay prakash pethakamsetty wrote: > Hi skip, > > I am unable to even install that curses package > > > C:\>pip install curses > Collecting curses > Could not find a version that satisfies the requirement curses (from > versions: ) > No matching distribution foun

Re: print to previous line in console

2016-10-03 Thread Skip Montanaro
> When we are printing to the console, is there a way to display to the > previous line in the console. Check out the curses module: https://docs.python.org/3.6/library/curses.html Skip -- https://mail.python.org/mailman/listinfo/python-list

print to previous line in console

2016-10-03 Thread udhay prakash pethakamsetty
Hi, \t is for tab(forward) space; and \r is for carriage return (back space) When we are printing to the console, is there a way to display to the previous line in the console. We can achive that easily in file operations, But I want a solution in displaying on Console. regards Udhay

Re: OT: Anyone here use the ConEmu console app?

2016-04-12 Thread Sayth Renshaw
Win 10 will have full bash provided by project between Ubuntu and MS so that's pretty cool Sayth -- https://mail.python.org/mailman/listinfo/python-list

Re: OT: Anyone here use the ConEmu console app?

2016-04-11 Thread DFS
On 4/11/2016 6:04 PM, 20/20 Lab wrote: win+alt+space does not work? ctrl+alt+win+space? http://conemu.github.io/en/KeyboardShortcuts.html Says those are not configurable, so they should work. Neither of those worked, but Ctrl+~ did. Thankyouthankyouthankyou On 04/11/2016 02:49 PM, DFS

Re: OT: Anyone here use the ConEmu console app?

2016-04-11 Thread 20/20 Lab
win+alt+space does not work? ctrl+alt+win+space? http://conemu.github.io/en/KeyboardShortcuts.html Says those are not configurable, so they should work. On 04/11/2016 02:49 PM, DFS wrote: I turned on the Quake-style option (and auto-hide when it loses focus) and it disappeared and I can't fig

OT: Anyone here use the ConEmu console app?

2016-04-11 Thread DFS
I turned on the Quake-style option (and auto-hide when it loses focus) and it disappeared and I can't figure out how to get it back onscreen. I think there's a keystroke combo (like Win+key) but I don't know what it is. It shows in the Task Manager Processses, but not in the Alt+Tab list. Unin

Re: Application console for Tkinter program?

2016-03-06 Thread Terry Reedy
On 3/6/2016 4:23 AM, Christian Gollwitzer wrote: Am 05.03.16 um 22:16 schrieb Terry Reedy: Not now. A console is a REPL + text display to read from and print to. The actual IDLE REPL is PyShell.ModifiedInterpreter, which subclasses stdlib code.InteractiveInterpreter. Most of the additions are

Re: Application console for Tkinter program?

2016-03-06 Thread Christian Gollwitzer
Am 05.03.16 um 22:16 schrieb Terry Reedy: Not now. A console is a REPL + text display to read from and print to. The actual IDLE REPL is PyShell.ModifiedInterpreter, which subclasses stdlib code.InteractiveInterpreter. Most of the additions are for interacting with the subprocess that runs user

Re: Application console for Tkinter program?

2016-03-05 Thread Terry Reedy
On 3/5/2016 6:45 AM, Christian Gollwitzer wrote: Am 05.03.16 um 11:15 schrieb Terry Reedy: On 3/5/2016 2:52 AM, Christian Gollwitzer wrote: is there an easy way to add an application console to a Tkinter program? Right now, you should turn the question around. so this means no, right

Re: Application console for Tkinter program?

2016-03-05 Thread Christian Gollwitzer
Am 05.03.16 um 11:15 schrieb Terry Reedy: On 3/5/2016 2:52 AM, Christian Gollwitzer wrote: is there an easy way to add an application console to a Tkinter program? Right now, you should turn the question around. so this means no, right? Is there an easy way to run a tkinter program within

Re: Application console for Tkinter program?

2016-03-05 Thread Terry Reedy
On 3/5/2016 2:52 AM, Christian Gollwitzer wrote: is there an easy way to add an application console to a Tkinter program? Right now, you should turn the question around. Is there an easy way to run a tkinter program within an interactive console? Answer: yes, two ways, after removing the

Application console for Tkinter program?

2016-03-05 Thread Christian Gollwitzer
Hi all, is there an easy way to add an application console to a Tkinter program? For instance, can you embed IDLE into a program such that when a button is pressed, it pops up a REPL window where the running program can be examined? Say, there is a simple program like

Re: Python IO Redirection to Console

2015-12-13 Thread Terry Reedy
On 12/13/2015 9:14 AM, austin aigbe wrote: I am trying to redirect the IO (stdout, stdin and stderr) to the console. For a program run from the console, console IO is the default. One must explicitly redirect to a file stream or pipe. At least on Windows, console IO is also the default

Python IO Redirection to Console

2015-12-13 Thread austin aigbe
Hello, I am trying to redirect the IO (stdout, stdin and stderr) to the console. Is there a Python module for this? Thanks. Regards -- https://mail.python.org/mailman/listinfo/python-list

IO Redirection to Console

2015-12-10 Thread austin aigbe
Hello, I am trying to port the following C++ code for IO redirection to console. // C++ (from Synfig) void redirectIOToConsole() { int hConHandle; HANDLE lStdHandle; CONSOLE_SCREEN_BUFFER_INFO coninfo; FILE *fp; // allocate console if

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
Am 03.12.2015 um 18:23 schrieb Terry Reedy: On 12/3/2015 11:00 AM, Robin Koch wrote: Am 03.12.2015 um 10:02 schrieb Gary Herron: On 12/02/2015 10:55 PM, Robert wrote: Hi, I read the tutorial on "Why is join() a string method instead of a list or tuple method?" at link: https://docs.python.o

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
Am 03.12.2015 um 18:42 schrieb Mark Lawrence: On 03/12/2015 17:01, Robin Koch wrote: Am 03.12.2015 um 17:25 schrieb Ian Kelly: On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch wrote: Now *I* am confused. Shouldn't it be ", ".join(['1', '2', '4', '8', '16']) instead? Without any importing? That

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Mark Lawrence
On 03/12/2015 17:01, Robin Koch wrote: Am 03.12.2015 um 17:25 schrieb Ian Kelly: On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch wrote: Now *I* am confused. Shouldn't it be ", ".join(['1', '2', '4', '8', '16']) instead? Without any importing? That would be the normal way to write it. The FAQ e

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Terry Reedy
On 12/3/2015 11:00 AM, Robin Koch wrote: Am 03.12.2015 um 10:02 schrieb Gary Herron: On 12/02/2015 10:55 PM, Robert wrote: Hi, I read the tutorial on "Why is join() a string method instead of a list or tuple method?" at link: https://docs.python.org/2/faq/design.html#why-must-self-be-used-ex

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
Am 03.12.2015 um 17:25 schrieb Ian Kelly: On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch wrote: Now *I* am confused. Shouldn't it be ", ".join(['1', '2', '4', '8', '16']) instead? Without any importing? That would be the normal way to write it. The FAQ entry is suggesting the string module fun

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Ian Kelly
On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch wrote: > Now *I* am confused. > > Shouldn't it be > > ", ".join(['1', '2', '4', '8', '16']) > > instead? Without any importing? That would be the normal way to write it. The FAQ entry is suggesting the string module function as an alternative for those w

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread MRAB
, '2', '4', '8', '16'], ", ") --- My Python console is 2.7. It should be no problem because I see the tutorial is 2.7 too. The console has these display: string.join(['1', '2', '4', 

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Robin Koch
;8', '16'], ", ") --- My Python console is 2.7. It should be no problem because I see the tutorial is 2.7 too. The console has these display: string.join(['1', '2', '4', '8', '16'], ", ")

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Gary Herron
last line: --- If none of these arguments persuade you, then for the moment you can continue to use the join() function from the string module, which allows you to write string.join(['1', '2', '4', '8', '16'], ", ")

Re: 'string.join' is wrong in my Python console

2015-12-03 Thread Sijan Bhandari
rite > > string.join(['1', '2', '4', '8', '16'], ", ") > ------- > > My Python console is 2.7. It should be no problem because I see the tutorial > is 2.7 too. > > The console has these display: > >

Re: 'string.join' is wrong in my Python console

2015-12-02 Thread dieter
lem on running the last line: > --- > If none of these arguments persuade you, then for the moment you can > continue to use the join() function from the string module, which allows > you to write > > string.join(['1', '2', '4', '8', '16'

'string.join' is wrong in my Python console

2015-12-02 Thread Robert
arguments persuade you, then for the moment you can continue to use the join() function from the string module, which allows you to write string.join(['1', '2', '4', '8', '16'], ", ") --- My Python console is 2.

Re: A high-level cross-platform API for terminal/console access

2015-10-22 Thread Gisle Vanem
"Chris Angelico" wrote: Ah, that might well be it. Does it work if you run: python -S -m pip install --upgrade win32api Hm. c:\>python2 -S -m pip install --upgrade win32api Collecting win32api Could not find any downloads that satisfy the requirement win32api No distributions at al

Re: A high-level cross-platform API for terminal/console access

2015-10-22 Thread Oscar Benjamin
On 22 October 2015 at 13:42, Gisle Vanem wrote: > "Chris Angelico" wrote: > >> On Thu, Oct 22, 2015 at 10:22 PM, Gisle Vanem wrote: >>> >>> IOError: [Errno 13] Permission denied: >>> 'g:\\Programfiler\\Python27\\Lib\\site-packages\\win32\\win32api.pyd' >>> >>> - >>> >>> BTW, this is on Pyth

Re: A high-level cross-platform API for terminal/console access

2015-10-22 Thread Chris Angelico
On Thu, Oct 22, 2015 at 11:42 PM, Gisle Vanem wrote: > I think the Errno 13 (=EACCESS) is due to another module (WConio.pyd) that > seems gets loaded via my site-customize.py is using this > win32api.pyd. Hence it's is in use and shutil fails in updating it. Ah, that might well be it. Does it wor

Re: A high-level cross-platform API for terminal/console access

2015-10-22 Thread Gisle Vanem
"Chris Angelico" wrote: On Thu, Oct 22, 2015 at 10:22 PM, Gisle Vanem wrote: IOError: [Errno 13] Permission denied: 'g:\\Programfiler\\Python27\\Lib\\site-packages\\win32\\win32api.pyd' - BTW, this is on Python 2.7.9 on Win-XP SP3. Does that file exist? A .pyd file is a DLL, so if it

Re: A high-level cross-platform API for terminal/console access

2015-10-22 Thread Chris Angelico
On Thu, Oct 22, 2015 at 10:22 PM, Gisle Vanem wrote: > IOError: [Errno 13] Permission denied: > 'g:\\Programfiler\\Python27\\Lib\\site-packages\\win32\\win32api.pyd' > > - > > BTW, this is on Python 2.7.9 on Win-XP SP3. Does that file exist? A .pyd file is a DLL, so if it already exists and

Re: A high-level cross-platform API for terminal/console access

2015-10-22 Thread Peter Brittain
On Thursday, October 22, 2015 at 12:25:09 PM UTC+1, Gisle Vanem wrote: > I tried installing your package with "pip.exe -v install asciimatics". > Some problem with pypiwin32 it seems: > > Installing collected packages: pypiwin32, future, Pillow, pyfiglet, > asciimatics > > Cleaning up... > E

  1   2   3   4   5   6   7   8   >