On Sun, Sep 26, 2010 at 5:12 PM, Steven D'Aprano wrote:
> On Mon, 27 Sep 2010 06:01:35 am Bill Allen wrote:
>
> Now your decision logic becomes simple, and obvious. It documents
> itself:
>
> if click_in_bottom_half1 and click_in_bottom_half2:
>print "Both clicks in bottom half of screen"
> el
On Mon, Sep 27, 2010 at 1:45 AM, Jojo Mwebaze wrote:
> Hey Tutor,
> Seems a small issue but this has been playing for a while now, what am i
> doing wrong here?
> Take an Example
> Class Point:
> def __init__(self, x=0, y=0):
> self.x = x
> self.y = y
> Class Circle(Point):
> def
Hey Tutor,
Seems a small issue but this has been playing for a while now, what am i
doing wrong here?
Take an Example
Class Point:
def __init__(self, x=0, y=0):
self.x = x
self.y = y
Class Circle(Point):
def __init__(self, radius=0, x=0, y=0):
super().__init__(x, y)
On 2:59 PM, Bill DeBroglie wrote:
No, I meant that you should edit your .py file and add
#!/usr/bin/env python
as the first line, THEN try to run it.
BINGO!
Right now what's happening is that you're handing a line of Python
script to the shell and asking it to run it; the shell is tellin
On Mon, 27 Sep 2010 08:37:08 am Bill DeBroglie wrote:
> > No, I meant that you should edit your .py file and add
> > #!/usr/bin/env python
> > as the first line, THEN try to run it.
>
> BINGO!
>
> > Right now what's happening is that you're handing a line of Python
> > script to the shell and ask
On Sep 26, 2010, at 6:29 PM, Marc Tompkins wrote:
On Sun, Sep 26, 2010 at 3:24 PM, Bill DeBroglie > wrote:
Is this what you mean?
matthew-parrillas-macbook:Dawson_Book matthewparrilla$ #!/usr/bin/
env python
matthew-parrillas-macbook:Dawson_Book matthewparrilla$ ./chapter_2.py
./c
On Sun, Sep 26, 2010 at 4:21 PM, Hugo Arts wrote:
> On Sun, Sep 26, 2010 at 10:16 PM, Rance Hall wrote:
> > My app will be printing a series of documents that are the same each
> > time the doc is printed with the exception of the variables. Sort of
> > a MailMerge if you will.
> >
> >
>
> I wo
On Sun, Sep 26, 2010 at 3:24 PM, Bill DeBroglie wrote:
>
> Is this what you mean?
>
> matthew-parrillas-macbook:Dawson_Book matthewparrilla$ #!/usr/bin/env
> python
> matthew-parrillas-macbook:Dawson_Book matthewparrilla$ ./chapter_2.py
> ./chapter_2.py: line 1: syntax error near unexpected token
On Sep 26, 2010, at 6:18 PM, Marc Tompkins wrote:
On Sun, Sep 26, 2010 at 3:04 PM, David Hutto
wrote:
> Pretty sure it's the parentheses, but I'm not an expert. In python
3 you use
> print(), in 2.6 you either use import from __futur__ or print
"string here".
I mean __future__ .
The pa
On Sep 26, 2010, at 6:06 PM, Marc Tompkins wrote:
On Sun, Sep 26, 2010 at 2:55 PM, Bill DeBroglie > wrote:
Which is great, but when I try and run the same code in the Terminal
by calling a program I've written (print("hello world") again) I get
the following:
matthews-macbook:Dawson
On Mon, 27 Sep 2010 07:55:40 am Bill DeBroglie wrote:
[...]
> Which is great, but when I try and run the same code in the Terminal
> by calling a program I've written (print("hello world") again) I get
> the following:
How do you call the program?
At the shell prompt, if you call:
python name_of
On Sun, Sep 26, 2010 at 3:04 PM, David Hutto wrote:
> > Pretty sure it's the parentheses, but I'm not an expert. In python 3 you
> use
> > print(), in 2.6 you either use import from __futur__ or print "string
> here".
>
> I mean __future__ .
>
The parentheses are optional in 2.6, mandatory in 3.
On Mon, 27 Sep 2010 06:01:35 am Bill Allen wrote:
> #This captures the coordinates the two mouse clicks, successfully.
> mouse_pos is in the form (x,y), such as (204,102).
> if mouse_pressed == (1,0,0) and first_click == False:
> first_click = True
> mouse_pos1 = mouse_pos
> elif m
On Sun, Sep 26, 2010 at 2:55 PM, Bill DeBroglie wrote:
> Which is great, but when I try and run the same code in the Terminal by
> calling a program I've written (print("hello world") again) I get the
> following:
>
>matthews-macbook:Dawson_Book matthewparrilla$ ./chapter_2.py
>./c
On Sun, Sep 26, 2010 at 6:03 PM, David Hutto wrote:
> On Sun, Sep 26, 2010 at 5:55 PM, Bill DeBroglie
> wrote:
>> Hello all,
>>
>> Totally new to this stuff and community so I very much appreciate the help
>> and apologize in advance for asking what might be a stupid question... Oh,
>> and I'm ne
On Sun, Sep 26, 2010 at 5:55 PM, Bill DeBroglie
wrote:
> Hello all,
>
> Totally new to this stuff and community so I very much appreciate the help
> and apologize in advance for asking what might be a stupid question... Oh,
> and I'm new to the lingo too!!
>
> I'm having issues running Python in T
Hello all,
Totally new to this stuff and community so I very much appreciate the
help and apologize in advance for asking what might be a stupid
question... Oh, and I'm new to the lingo too!!
I'm having issues running Python in Terminal. When I run code through
the interpreter I get:
On Sun, Sep 26, 2010 at 10:16 PM, Rance Hall wrote:
> My app will be printing a series of documents that are the same each
> time the doc is printed with the exception of the variables. Sort of
> a MailMerge if you will.
>
> It seems to me that the easiest approach is to create a series of text
>
On Sat, Sep 25, 2010 at 4:29 AM, Sayth Renshaw wrote:
> I want to read some data from the web it will be text and numeric i
> was planning to export it to a database. I was thinking while I am
> learning maybe something simple like Sqlite or MySQL.
>
> I then want to read back data to perform sort
On Sun, Sep 26, 2010 at 1:36 PM, Bill Allen wrote:
> I hate it when I do something like that!A combination of poor choice of
> names for the variables and programming tunnel vision
>
Been there, done that!
--
www.fsrtechnologies.com
___
Tutor
On Sun, Sep 26, 2010 at 3:12 PM, Marc Tompkins wrote:
> On Sun, Sep 26, 2010 at 1:01 PM, Bill Allen wrote:
>
>>
>> Any thoughts how I am going wrong here?
>>
>> Looks like you've got two different names for the first mouse click...
>
> mouse_pos1 = mouse_pos
>>
>
> but
>
> if mouse_pos[1]
My app will be printing a series of documents that are the same each
time the doc is printed with the exception of the variables. Sort of
a MailMerge if you will.
It seems to me that the easiest approach is to create a series of text
files with the layout and placeholders I need (again much like
On Sun, Sep 26, 2010 at 1:01 PM, Bill Allen wrote:
>
> Any thoughts how I am going wrong here?
>
> Looks like you've got two different names for the first mouse click...
mouse_pos1 = mouse_pos
>
but
> if mouse_pos[1] < height/2 and mouse_pos2[1] > height/2:
>
--
www.fsrtechnologies.
Ok, I am have a problem with some logic in a piece of code I am working
on. I have tinkered with it for hours and am stumped. Pretty sure I have
lost sight of the forest for the trees...
The purpose of this code is to take the coordinates on screen of the mouse
at the time of two mouse clicks,
On Sun, Sep 26, 2010 at 3:14 AM, Steven D'Aprano wrote:
> On Sun, 26 Sep 2010 02:26:25 pm David Hutto wrote:
>> On Sat, Sep 25, 2010 at 9:16 PM, Steven D'Aprano
> wrote:
>> > On Sun, 26 Sep 2010 08:13:23 am David Hutto wrote:
>> >> Since I had nothing else to do, but practice, this looks much
>>
On Sun, 26 Sep 2010 02:26:25 pm David Hutto wrote:
> On Sat, Sep 25, 2010 at 9:16 PM, Steven D'Aprano
wrote:
> > On Sun, 26 Sep 2010 08:13:23 am David Hutto wrote:
> >> Since I had nothing else to do, but practice, this looks much
> >> better:
> >>
> >> def find(word, search):
> >> if searc
26 matches
Mail list logo