Hi,
Re: coding style, I can *really* recommend the book 'Code Complete'
(http://cc2e.com/). It doesn't focus on Python specifically, but it's a
wonderful book. You can find a pdf checklist of the book if you Google a bit.
Cheers!!
Albert-Jan
~~
Can you explain this in a little more detail?
>
>
sure.
>
>for name in attributes.keys():
> attributes[name] = int( input("How many points do you want to assign to %s "
> %
>name) )
>
>Where did you get 'name' from?
>
I made it up. The for loop takes the form
for in :
where the
"Albert-Jan Roskam" wrote
Re: coding style, I can *really* recommend the book 'Code Complete'
(http://cc2e.com/). It doesn't focus on Python specifically, but
it's a
wonderful book.
I'll second that. I haven't read the 2nd Ed but the first edition was
one
of the few (5 or 6?) books I've re
Thanks a lot for the very friendly and constructive comments.
I can't wait to start overhauling the script with the
comments received here.
If I could repay the friendliness to anyone, let me know.
Adrian
___
Tutor maillist - Tutor@python.org
To unsub
Thank you Jerry! The suggestion you told me make my code worked!
>
>
>
> dbf = Dbf(d,new=False, readOnly=True)
>
>
>
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
I have a set of questions that ask about a customers name, address, email, etc.
some of these values are allowed to be null, and others aren't. Some
are required to have specific formats when they aren't null.
I'm happy with the code Ive written and its question asking routine,
but I need help u
On 12/9/2010 11:46 AM, Rance Hall wrote:
I have a set of questions that ask about a customers name, address, email, etc.
some of these values are allowed to be null, and others aren't. Some
are required to have specific formats when they aren't null.
I'm happy with the code Ive written and its
Hello:
I would like to know how to call a program from within a program and what
directory I should place one small program file in. I am running Python
2.6.6 and Windows 7.
I have a directory called C:\Users\StarShip\PyProgs and it has the files
BreakersCafe.txt and BreakersCafe.py. This is
Hello,
I have a large code that I am using for ARC GIS I know could be much smaller
but it works like it is. I have programmed in C++ but am just beginning with
python I believe the answer would be to do a parallel array however I am having
trouble keeping the SQL statment in the string format
Can you use something like this:
for i in range(1,201):
s = str(i)
Then Path = '1' can become Path = s
On Thu, Dec 9, 2010 at 2:39 PM, wrote:
> Hello,
> I have a large code that I am using for ARC GIS I know could be much
> smaller but it works like it is. I have programmed in C++ but am
Hi all,
I am reading the source of a project I hope to help with
(http://www.qwitter-client.net). I sometimes see something like:
val=val or 1
I am guessing that val is an int. If val==0, the 'or' kicks in and
val=1, else the or is not needed and val=val. Am I close? Can other
words or symbols be u
On 10/12/10 00:51, Alex Hall wrote:
Hi all,
I am reading the source of a project I hope to help with
(http://www.qwitter-client.net). I sometimes see something like:
val=val or 1
I am guessing that val is an int. If val==0, the 'or' kicks in and
val=1, else the or is not needed and val=val. Am I
"Alex Hall" wrote
val=val or 1
I am guessing that val is an int. If val==0, the 'or' kicks in and
val=1, else the or is not needed and val=val. Am I close?
Yes this is a combination of what is known as short circuit
evaluation of boolean expressions and a quirk of Python that
returns
Thanks to all for the quick responses. Python always surprises me with
its shortcuts...
On 12/9/10, Alan Gauld wrote:
>
> "Alex Hall" wrote
>
>> val=val or 1
>
>> I am guessing that val is an int. If val==0, the 'or' kicks in and
>> val=1, else the or is not needed and val=val. Am I close?
>
> Y
On Fri, Dec 10, 2010 at 2:07 AM, Alan Gauld wrote:
>
> "Alex Hall" wrote
>>
>> val=val or 1
>
>> I am guessing that val is an int. If val==0, the 'or' kicks in and
>> val=1, else the or is not needed and val=val. Am I close?
>
> Yes this is a combination of what is known as short circuit evaluati
Hugo Arts wrote:
Doesn't short-circuit evaluation refer specifically to the behavior
where arguments are only evaluated if they need to be? It's a very
useful feature, but not technically required for the "val = val or 1"
behavior to work.
Yes, exactly.
Some languages (Pascal comes to mind) d
Patty,
I didn't read through your code, but to call an external program see
the 'subprocess' module in the standard library:
http://docs.python.org/library/subprocess.html
-Modulok-
On 12/9/10, pa...@cruzio.com wrote:
>
> Hello:
>
> I would like to know how to call a program from within a prog
17 matches
Mail list logo