On 2017-03-30, Elo Okonkwo wrote:
> Thanks so much everyone.
>
> I've figured it out. It was the recursive bit that got me
> confused, its a bit difficult debugging recursive functions.
It doesn't have to be!
I recommend debugging recursive functions with small,
Trying to understand the "correct" way to run a sys command ("curl")
and to get the potential stderr. Checking Stackoverflow (SO), implies
that I should be able to use a raw/text cmd, with "shell=true".
If I leave the stderr out, and just use
s=proc.communicate()
the test works...
Any
I can read files like this (relative path):
with open("Testfile_B.txt") as file_object:
contents = file_object.read()
print(contents)
But how do I read files if I want to specify the location (absolute path):
file_path = "C:\Users\Rafael\Testfile.txt"
with open(file_path) as
>> > I am trying to wrap my head around the super constructor.
Is it possible to embed a super constructor into an if / elif
statement within the child class?
if message == "string A": return X
elif: return Y
How should I modify my code below?
(I couldn't solve that by myself)
class A:
def
On Mar 30, 2017 15:07, "Rafael Knuth" wrote:
I can read files like this (relative path):
with open("Testfile_B.txt") as file_object:
contents = file_object.read()
print(contents)
But how do I read files if I want to specify the location (absolute path):
Dear users,
I had a problem regarding Threads in python and Gtk3. I want to stop a while
loop in Gtk , a loop starded with a thread.
I want to control a delay timer laser board with give me ,when I send a command
by serial connection, give back continuous status values ; but I want to stop
this
On 30/03/17 12:39, Rafael Knuth wrote:
I am trying to wrap my head around the super constructor.
>
> Is it possible to embed a super constructor into an if / elif
> statement within the child class?
Of course, the __init__ methods are special in any way
the normal coding mechanisms all
Thanks so much everyone.
I've figured it out. It was the recursive bit that got me confused, its a
bit difficult debugging recursive functions.
On Wed, Mar 29, 2017 at 1:36 AM, Steven D'Aprano
wrote:
> On Tue, Mar 28, 2017 at 03:56:16PM +0100, Elo Okonkwo wrote:
> > Can
On 03/29/2017 08:33 AM, Rafael Knuth wrote:
> class A:
> def __init__(self, message):
> self.message = message
> print(message)
>
> I then modified the child class B like this:
>
> class B(A):
> def __init__(self, message):
> print("This is the message from your
On 03/29/2017 04:02 PM, Mats Wichmann wrote:
> On 03/29/2017 08:33 AM, Rafael Knuth wrote:
>
>> class A:
>> def __init__(self, message):
>> self.message = message
>> print(message)
>>
>> I then modified the child class B like this:
>>
>> class B(A):
>> def __init__(self,
Thank you, it was very helpful.
בתאריך 23 במרץ 2017 02:39, "Peter Otten" <__pete...@web.de> כתב:
> Yosef Levy wrote:
>
> > Hello All,
> >
> > I am running with Python 2.7
> > I have to run script that could have get arguments in two ways:
> > 1. argument + file name.
> > 2. argument + input
Greetings all,
I would like to use a list of functions for an automation project, and this
is the prototype I came up with
###
def func1():
print('func1')
def func2():
print('func2')
def func3():
print('func3')
func_list = ('func1', 'func2', 'func3')
for f in
I wrote a long description of how .communicate can deadlock.
Then I read the doco more carefully and saw this:
Warning: Use communicate() rather than .stdin.write, .stdout.read
or .stderr.read to avoid deadlocks due to any of the other OS
pipe buffers filling up and blocking the child
sent a question earlier.. and got a reply saying it was in the
moderation process???
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On 30Mar2017 13:51, bruce wrote:
Trying to understand the "correct" way to run a sys command ("curl")
and to get the potential stderr. Checking Stackoverflow (SO), implies
that I should be able to use a raw/text cmd, with "shell=true".
I strongly recommend avoiding
On Thu, Mar 30, 2017 at 4:11 PM, bruce wrote:
> sent a question earlier.. and got a reply saying it was in the
> moderation process???
You've made it through the process. See the bottom of
https://mail.python.org/pipermail/tutor/2017-March/thread.html
to see your original
16 matches
Mail list logo