Re: running "python -i" in subprocess shows no prompt

2019-03-18 Thread Terry Reedy
On 3/18/2019 9:10 AM, finnkochin...@keemail.me wrote: I try to start a separate python subprocess using the attached code. This example should catch all stdout and stderr output from the launched subprocess and send commands to its stdin. Subprocess is not intended for interaction. My attemp

Re: tkinter

2019-03-18 Thread Terry Reedy
On 3/18/2019 12:00 PM, Informatico de Neurodesarrollo wrote: Hello friends: I am a beginner on programming in python. I want make a simple program that test continuously (every 5 seg) the connection  to internet and change the background color when are not available. I try this , but not work

Re: error while importing a module

2019-03-18 Thread Cameron Simpson
On 18Mar2019 20:11, Sharan Basappa wrote: On Tuesday, 19 March 2019 08:34:25 UTC+5:30, Sharan Basappa wrote: I have a design file that I am importing in a test file to run some tests. [...] The design file compiles fine when I run it standalone but when I import it in the test file, I see e

Re: error while importing a module

2019-03-18 Thread Sharan Basappa
On Tuesday, 19 March 2019 08:34:25 UTC+5:30, Sharan Basappa wrote: > I have a design file that I am importing in a test file to run some tests. > The design file compiles fine when I run it standalone but when I import it > in the test file, I see error on the very first line where I am importing

error while importing a module

2019-03-18 Thread Sharan Basappa
I have a design file that I am importing in a test file to run some tests. The design file compiles fine when I run it standalone but when I import it in the test file, I see error on the very first line where I am importing the design file. This is the line from test file: """ test my design "

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 selecting a c

Re: Reasoning of calling a method on class object instead of class instance object

2019-03-18 Thread Michael Torrie
On 03/18/2019 07:09 PM, Ben Finney wrote: > Arup Rakshit writes: > > Michael Torrie writes: > >> On 03/18/2019 05:55 PM, Ben Finney wrote: If I call `_c_to_f`, `_f_to_c` methods on `self` instead of `RefrigeratedShippingContainer` class object, still it works. >>> >>> That's right, an

Re: Reasoning of calling a method on class object instead of class instance object

2019-03-18 Thread Ben Finney
Arup Rakshit writes: Michael Torrie writes: > On 03/18/2019 05:55 PM, Ben Finney wrote: > >> If I call `_c_to_f`, `_f_to_c` methods on `self` instead of > >> `RefrigeratedShippingContainer` class object, still it works. > > > > That's right, and is indeed the point of making a static method on

Re: Reasoning of calling a method on class object instead of class instance object

2019-03-18 Thread Michael Torrie
On 03/18/2019 05:55 PM, Ben Finney wrote: >> If I call `_c_to_f`, `_f_to_c` methods on `self` instead of >> `RefrigeratedShippingContainer` class object, still it works. > > That's right, and is indeed the point of making a static method on a > class. I'm confused. The methods that refer to Refi

Re: Reasoning of calling a method on class object instead of class instance object

2019-03-18 Thread Ben Finney
Arup Rakshit writes: > class RefrigeratedShippingContainer(ShippingContainer): > # ... > > @staticmethod > def _c_to_f(celsius): > return celsius * 9/5 + 32 > > @staticmethod > def _f_to_c(fahrenheit): > return (fahrenheit - 32) * 5/9 Both those functions are

Re: subprocess svn checkout password issue

2019-03-18 Thread Barry
> On 15 Mar 2019, at 22:17, Martin De Kauwe wrote: > > Hi, > > I'm trying to write a script that will make a checkout from a svn repo and > build the result for the user. However, when I attempt to interface with the > shell it asks the user for their filename and I don't know how to captur

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 another corresponding Ct

Python 3.4.10 is now available

2019-03-18 Thread Larry Hastings
On behalf of the Python development community, I'm proud--if slightly sad--to announce the availability of Python 3.4.10. Python 3.4.10 was released in "security fixes only" mode.  It only contains security fixes, not conventional bug fixes, and it is a source-only release. Python 3.4.10 i

Python 3.5.7 is now available

2019-03-18 Thread Larry Hastings
On behalf of the Python development community, I'm chuffed to announce the availability of Python 3.5.7. Python 3.5 is in "security fixes only" mode.  It only accepts security fixes, not conventional bug fixes, and the release is source-only. And you can find Python 3.5.7rc1 here: https

Re: tkinter

2019-03-18 Thread Informatico de Neurodesarrollo
Thanks, I was noted it. I have figure out, how can I do that. I keep in touch El 18/03/19 a las 14:09, MRAB escribió: On 2019-03-18 16:00, Informatico de Neurodesarrollo wrote: Hello friends: I am a beginner on programming in python. I want make a simple program that test continuously (ever

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 scripts. My

Re: tkinter

2019-03-18 Thread MRAB
On 2019-03-18 16:00, Informatico de Neurodesarrollo wrote: Hello friends: I am a beginner on programming in python. I want make a simple program that test continuously (every 5 seg) the connection  to internet and change the background color when are not available. I try this , but not work pro

Re: tkinter

2019-03-18 Thread Chris Angelico
On Tue, Mar 19, 2019 at 4:55 AM Informatico de Neurodesarrollo wrote: > > This code work fine, every 5 second test the connection to this machine > (10.44.0.15) on my network. > > def isInternet(): > testConn = socket.socket(socket.AF_INET,socket.SOCK_STREAM) > output = testConn.connect_

Reasoning of calling a method on class object instead of class instance object

2019-03-18 Thread Arup Rakshit
Hi, In this piece of code: class RefrigeratedShippingContainer(ShippingContainer): MAX_CELSIUS = 4.0 def __init__(self, owner_code, contents, celsius): super().__init__(owner_code, contents) if celsius > RefrigeratedShippingContainer.MAX_CELSIUS: raise ValueE

Re: tkinter

2019-03-18 Thread Informatico de Neurodesarrollo
This code work fine, every 5 second test the connection to this machine (10.44.0.15) on my network. #!/usr/bin/env python # -*- coding: utf-8 -*- # #  DetectConn_1_0.py # #First: Testing connection # import socket, time def isInternet():     testConn = socket.socket(socket.AF_INET,socket.SOCK_

Re: running "python -i" in subprocess shows no prompt

2019-03-18 Thread Grant Edwards
On 2019-03-18, wrote: > I try to start a separate python subprocess using the attached > code. This example should catch all stdout and stderr output from > the launched subprocess and send commands to its stdin. The problem > is that the prompt ">>>" asking for then next input is neither sent

Re: tkinter

2019-03-18 Thread Paul Sutton
On 18/03/2019 16:00, Informatico de Neurodesarrollo wrote: > Hello friends: > > I am a beginner on programming in python. > > I want make a simple program that test continuously (every 5 seg) the > connection  to internet and change the background color when are not > available. I try this , but

Re: tkinter

2019-03-18 Thread Chris Angelico
On Tue, Mar 19, 2019 at 3:33 AM Informatico de Neurodesarrollo wrote: > > Hello friends: > > I am a beginner on programming in python. Cool! Then I would recommend making your program as simple as you possibly can. > I want make a simple program that test continuously (every 5 seg) the > connect

tkinter

2019-03-18 Thread Informatico de Neurodesarrollo
Hello friends: I am a beginner on programming in python. I want make a simple program that test continuously (every 5 seg) the connection  to internet and change the background color when are not available. I try this , but not work properly:  #!/usr/bin/env python3 # -*- coding: utf-8 -*- #

Re: I wrote a free book about TDD and clean architecture in Python

2019-03-18 Thread Arup Rakshit
Hello, Thanks for writing this great book. I joined python community just couple of weeks. Thanks, Arup Rakshit a...@zeit.io > On 16-Mar-2019, at 4:59 PM, giordani.leona...@gmail.com wrote: > > Hi all, > > I published on Leanpub a free book, "Clean Architectures in Python". It's a > hum

Re: running "python -i" in subprocess shows no prompt

2019-03-18 Thread Chris Angelico
On Tue, Mar 19, 2019 at 2:50 AM wrote: > > Hello, > I try to start a separate python subprocess using the attached code. This > example should catch all stdout and stderr output from the launched > subprocess and send commands to its stdin. > The problem is that the prompt ">>>" asking for then

I wrote a free book about TDD and clean architecture in Python

2019-03-18 Thread giordani . leonardo
Hi all, I published on Leanpub a free book, "Clean Architectures in Python". It's a humble attempt to organise and expand some posts I published on my blog in the last years. You can find it here: https://leanpub.com/clean-architectures-in-python The main content is divided in two parts, this

running "python -i" in subprocess shows no prompt

2019-03-18 Thread finnkochinski
Hello, I try to start a separate python subprocess using the attached code. This example should catch all stdout and stderr output from the launched subprocess and send commands to its stdin. The problem is that the prompt ">>>" asking for then next input is neither sent to stdout nor to stderr.

Re: Question about the @staticmethod decorator

2019-03-18 Thread Terry Reedy
On 3/17/2019 2:15 PM, Arup Rakshit wrote: I am reading a book where the author says that: In principle, it would also be possible to implement any @staticmethod completely outside of the class at module scope without any loss of functionality — so you may want to consider carefully whether a p