Sorry for the unnecessary post with no response -- inadvertent click
on "Send" button which was too near Gmail's "..." button to expand
content.
On Mon, Apr 17, 2017 at 6:13 PM, Phil wrote:
> Thank you for reading this.
>
> How do I reference the_canvas from my solve() method? Despite hours of
>
On Mon, Apr 17, 2017 at 6:13 PM, Phil wrote:
> Thank you for reading this.
>
> How do I reference the_canvas from my solve() method? Despite hours of
> searching I haven't been able to solve this or find a similar example. All
> that I've gained is a headache.
>
> Exception in Tkinter callback
>
I made one more diagnostic change to your script, changing the
FillWithStars function to this:
def FillWithStars():
with sqlite3.connect("stars.db") as connection:
connection.executescript("""
CREATE TABLE brightest(
name,
constellation,
On Mon, Apr 17, 2017 at 04:36:50PM -0700, Marilyn Davis wrote:
> #!/usr/bin/env python3
> """
> Hello Tutors,
>
> I can't figure out why the FillWithStars() function puts Canopus in the db
> twice.
Good question. And thank you for providing a really well-written,
simple, clear script that we ca
Ah, Peter, if only I could achieve your understanding and mastery!
On Mon, Apr 17, 2017 at 3:37 AM, Peter Otten <__pete...@web.de> wrote:
> Perhaps it becomes clearer if we build our own class discovery / method
> runner system. Given T as the baseclass for classes that provide foo_...()
> method
On Sun, Apr 16, 2017 at 11:50 PM, Mats Wichmann wrote:
>
> You got me thinking as well, as I don't much care for unittest, at least
> partly because it forces you to use classes even when it doesn't feel
> all that natural.
I have looked into pytest multiple times, but have decided to stick
with
Thank you for reading this.
How do I reference the_canvas from my solve() method? Despite hours of
searching I haven't been able to solve this or find a similar example. All that
I've gained is a headache.
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3
This is an aliasing problem. Change the code to
super = []
sub = [""]*3
other = ["a","b","c","d"]
sub[0] = "hi"
sub[1] = "hello"
for item in other:
l = sub[:]
l[2] = item
super.append(l)
for item in super:
print item
regards,
Sarma.
On Tue, Apr 18, 2017 at 2:16 AM, Mats Wichmann
On 18/04/17 00:36, Marilyn Davis wrote:
> #!/usr/bin/env python3
> """
> Hello Tutors,
>
> I can't figure out why the FillWithStars() function puts Canopus in the db
> twice.
>
> What am I missing?
I don;t know but I converted your script into the more
conventional form and it worked. it was the
>>
>> Is there anything wrong in this code or any feature of python?
>
> yeah, feature of Python. you could google for "deep copy".
>
the reference issue is involved here, but my explanation was off, I
confused myself, listen to Peter instead :) It's just the same list
four times.
_
#!/usr/bin/env python3
"""
Hello Tutors,
I can't figure out why the FillWithStars() function puts Canopus in the db
twice.
What am I missing?
Thank you for any help.
Marilyn Davis
p.s. That Reset(db_name) is in there so that you can run it over and over
if you want.
---
"""
import os, sqlite3
On 04/17/2017 12:41 PM, Rasika Sapate via Tutor wrote:
> Dear Python group,
> I had written following code.
>
> super = []
> sub = [""]*3
> other = ["a","b","c","d"]
> sub[0] = "hi"
> sub[1] = "hello"
> for item in other:
> sub[2] = item
> super.append(sub)
> for item in super:
> print
On 04/16/2017 11:24 AM, Chris Warrick wrote:
On 16 April 2017 at 18:16, Jim wrote:
On 04/16/2017 10:10 AM, Chris Warrick wrote:
On 16 April 2017 at 16:45, Jim wrote:
My system python is 2.7.12 so I created a virtual environment using venu
to
run 3.5.2. I put it in /home/jfb/EVs/env. Now I
On 04/16/2017 02:18 PM, Mats Wichmann wrote:
On 04/16/2017 10:16 AM, Jim wrote:
On 04/16/2017 10:10 AM, Chris Warrick wrote:
On 16 April 2017 at 16:45, Jim wrote:
My system python is 2.7.12 so I created a virtual environment using
venu to
run 3.5.2. I put it in /home/jfb/EVs/env. Now I would
Rasika Sapate via Tutor wrote:
> Dear Python group,
> I had written following code.
>
> super = []
> sub = [""]*3
> other = ["a","b","c","d"]
> sub[0] = "hi"
> sub[1] = "hello"
> for item in other:
> sub[2] = item
> super.append(sub)
> for item in super:
> print item
>
>
> Output :
Dear Python group,
I had written following code.
super = []
sub = [""]*3
other = ["a","b","c","d"]
sub[0] = "hi"
sub[1] = "hello"
for item in other:
sub[2] = item
super.append(sub)
for item in super:
print item
Output :
['hi', 'hello', 'd']
['hi', 'hello', 'd']
['hi', 'hello', 'd']
[
> coming to recursion well i currently use eval() so everything ok i don't
> have to worry about brackets but i want to write my own parser. a top down
> parser for expressions.
Do *not* use eval to parse expressions. It is an extremely bad idea to do this.
Instead, you can use ast.parse, whic
On Mon, Apr 17, 2017 at 12:00 AM, Alan Gauld via Tutor wrote:
> On 16/04/17 18:26, Tyler Seacrist wrote:
>
>> I need to draw a stack diagram for print_n
>> called with s = 'Hello' and n=2 and am unsure of how to do so.
Are you referring to this?
http://www.greenteapress.com/thinkpython/html/thi
On 04/16/2017 04:57 PM, Sergio Rojas wrote:
On 04/14/2017 04:21 AM, Peter Otten wrote:
Stephen P. Molnar wrote:
However, what I want to do is multiply each element ob D by each element
of s and sum all of the products.
If you *really* want this:
sum_of_all_products = s.sum() * D.sum()
exa
Peter Otten wrote:
> class M:
> def foo_one(self):
> print(self.__class__.__name__, "one")
> def foo_two(self):
> print(self.__class__.__name__, "one")
Oops, foo_two() should of course print "two", not "one".
___
Tutor maillist
boB Stepp wrote:
> It is here that I am struggling. If the mixin class does not inherit
> from unittest.TestCase, then how is test_func ever seen?
Perhaps it becomes clearer if we build our own class discovery / method
runner system. Given T as the baseclass for classes that provide foo_...()
On 16/04/17 18:26, Tyler Seacrist wrote:
> I need to draw a stack diagram for print_n
> called with s = 'Hello' and n=2 and am unsure of how to do so.
Me too.
What is print_n?
Which stack?
One in your program or the interpreters internal stack?
We need a lot more detail.
--
Alan G
Author of
22 matches
Mail list logo