"Jim Morcombe" <[EMAIL PROTECTED]> wrote
> In it, Dakota recomends placing the entire application within a
> class.
> Why is this so? Surely in many cases you end up with a constructor
> for the class that is cumbersome and complex?
This is a very common OOP technique, especially in languages w
Hi people,
I've a competent programmer friend who I'm trying to convert to the ways
of python and I was wondering if people could recommend a decent cheat
sheet for python 2.5.
He know how to program but just needs the syntax to become pythonic
Thanks
Andy
Jim Morcombe wrote:
> I have just read through "Creating a GUI in Python - by Dakota Lemaster"
>
> In it, Dakota recomends placing the entire application within a class.
>
> Why is this so? Surely in many cases you end up with a constructor for
> the class that is cumbersome and complex?
Man
Samm and Andy wrote:
> Hi people,
>
> I've a competent programmer friend who I'm trying to convert to the ways
> of python and I was wondering if people could recommend a decent cheat
> sheet for python 2.5.
> He know how to program but just needs the syntax to become pythonic
Maybe one of thes
There is an excellent book for programmers from other languages. Dive
Into Python. http://www.diveintopython.org/toc/index.html
Jeff
On Wed, 2007-12-19 at 10:08 +, Samm and Andy wrote:
> Hi people,
>
> I've a competent programmer friend who I'm trying to convert to the ways
> of python an
"Samm and Andy" <[EMAIL PROTECTED]> wrote
> of python and I was wondering if people could recommend a decent
> cheat
> sheet for python 2.5.
There is a quick reference linked on the Python web site:
Here is the URL:
http://rgruet.free.fr/PQR25/PQR2.5.html
However I'd still recommend an after
Hi there!
I'm writing a script that inserts data from a .csv file into a
MySQL-Database.
Actually, it works fine (the data make it into the database correctly),
however everytime it runs it raises an exception coming from the
MySQLdb-module.
Here's the code:
-
On Dec 19, 2007 10:14 AM, Paul Schewietzek <[EMAIL PROTECTED]> wrote:
>
> Is there any way to handle this exception? As you can see, I already
> tried it with _mysql_exceptions.OperationalError (the lines that are
> commented out), but _mysql_exceptions is not defined to Python
>
>
"Operationa
Paul Schewietzek wrote:
> Just so you don't need to wonder: The .csv-file I give to the script for
> testing is absolutely OK.
Except that it contains data that the insert statement doesn't
like...does it contain any blank lines? Printing 'line' in the exception
handler would be useful.
Also t
In a program, I want to set some kind of variable or object to indicate what
"mode" the program is currently in.
What is the most elegant way of doing this?
Jim
---
constant: moving = "m"
constant: inserting = "i"
constant:ju
This isn't elegant, but it is a start. My method is: get SOMETHING working,
then work from there. 8^D
"""
constant: moving = "m"
constant: inserting = "i"
constant: jumping = "j"
.
.
action = moving
.
.
.
if action == jumping:
jumpSomewhere()
elseif action == moving:
moveSomewhere()
elseif
Jim Morcombe wrote:
> In a program, I want to set some kind of variable or object to
> indicate what "mode" the program is currently in.
> What is the most elegant way of doing this?
>
> Jim
> ---
> constant: moving = "m"
>
On Wed, Dec 19, 2007 at 09:41:13PM -0500, bob gailer wrote:
> 1 - I see no value in introducing variables. I'd just use string constants:
>
> action = "moving"
> .
> .
> if action == "jumping":
>
> etc.
I agree. But, some people do prefer something that looks a bit
like an enum. If so, here i
Dave Kuhlman wrote:
> On Wed, Dec 19, 2007 at 09:41:13PM -0500, bob gailer wrote:
>
>> 1 - I see no value in introducing variables. I'd just use string constants:
>>
>> action = "moving"
>> .
>> .
>> if action == "jumping":
>>
>> etc.
>
> I agree. But, some people do prefer something that looks
14 matches
Mail list logo