> -Original Message-
> Date: Thu, 18 Oct 2007 10:53:22 +0100
> From: "Alan Gauld" <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] aBSOLUTE BEGINNER
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=origina
> -Original Message-
> Date: Wed, 22 Aug 2007 02:23:25 -0700
> From: chinni <[EMAIL PROTECTED]>
> Subject: [Tutor] Need Some Help
> To: tutor@python.org
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi All,
>
> I am new to python.i need so
> Date: Tue, 14 Aug 2007 12:33:16 -0700
> From: Dick Moores <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Question re Tutor List Etiquette
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="us-ascii"; format=flowed
>
> At 11:56 AM 8/14/2007, Kent Johnson wro
> -Original Message-
> Message: 4
> Date: Wed, 1 Aug 2007 19:01:36 +0400
> From: "Pradeep Kumar" <[EMAIL PROTECTED]>
> Subject: [Tutor] Design Pattern + Wxpython
> To: tutor@python.org
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I am new t
> -Original Message-
> Message: 7
> Date: Tue, 3 Jul 2007 19:46:42 +1200
> From: Ben Walden <[EMAIL PROTECTED]>
> Subject: [Tutor] how long?
> To:
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> How long will it take until I successfully create my ow
> -Original Message-
> Date: Fri, 8 Jun 2007 00:19:39 +0100
> From: "Alan Gauld" <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Invoking Python from Vim
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=
> -Original Message-
> Date: Wed, 30 May 2007 14:50:25 -0500
> From: "Grant Hagstrom" <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] leave tutorial
> To: "Kriti Satija" <[EMAIL PROTECTED]>
> Cc: Tutor@python.org
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso
> -Original Message-
> Date: Fri, 30 Mar 2007 19:28:51 +0200
> From: Andreas Kostyrka <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] range()-like function for dealing with floats...?
> To: "Carroll, Barry" <[EMAIL PROTECTED]>
> Cc: tutor@python.org
>
> -Original Message-
> Date: Fri, 30 Mar 2007 14:47:26 +0530
> From: "Joydeep Mitra" <[EMAIL PROTECTED]>
> Subject: [Tutor] range()-like function for dealing with floats...?
> To: tutor@python.org
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> -Original Message-
> Date: Tue, 20 Mar 2007 22:53:15 +0100
> From: J?nos Juh?sz <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Making table
> To: tutor@python.org
> Message-ID:
>[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-2"
>
> Dear Barry,
>
> >>Using a formatt
> -Original Message-
> From: Kent Johnson [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 19, 2007 12:59 PM
> To: Carroll, Barry
> Cc: tutor@python.org
> Subject: Re: [Tutor] Making table
>
> Carroll, Barry wrote:
> >> -Original Message-
> >
> -Original Message-
> Date: Mon, 19 Mar 2007 11:53:06 -0400
> From: Kent Johnson <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Making table
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Dave Kuhlman wrote:
> > Try l
> -Original Message-
> Date: Fri, 02 Mar 2007 14:54:04 -0800
> From: Bob Gailer <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] forth
> To: Hilton Garcia Fernandes <[EMAIL PROTECTED]>
> Cc: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1; format=
> -Original Message-
> Date: Thu, 1 Mar 2007 10:54:36 -0500
> From: Kent Johnson <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] python problem
> To: "Purcell, Brittany Nicole" <[EMAIL PROTECTED]>,
>
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1
Alan:
This is arguably a minor detail, and not directly related to Python but, hey,
I'm a programmer. Minor details are my stock in trade. So here goes.
In "Learning to Program", look at "The Raw Materials", "Real Numbers". The
first sentence, "These are fractions" is technically incorrect
Greetings:
I just thought I'd throw my own hat into the ring. I'm trying out my
new, asbestos-free, flame-retardant underwear. ;^)
> -Original Message-
> Date: Fri, 16 Feb 2007 08:14:29 -0500
> From: "Michael P. Reilly" <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Replying to the tutor-li
> -Original Message-
> From: Tony Cappellini [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 08, 2007 5:41 PM
> To: Carroll, Barry
> Subject: re:Overloading assignment operator
>
> Hello Barry
>
> I'm trying to understand you post
>
> my que
> -Original Message-
> Date: Fri, 26 Jan 2007 22:40:24 -0500
> From: Kent Johnson <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] converting tab-delimited text files to csv
> To: Luke Paireepinart <[EMAIL PROTECTED]>
> Cc: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/p
> -Original Message-
> Date: Thu, 18 Jan 2007 14:16:07 +0100
> From: Zara <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Division doesn't work
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=us-ascii
>
> On Thu, 18 Jan 2007 13:09:48 +0100, Geoframer
> -Original Message-
> Message: 7
> Date: Fri, 05 Jan 2007 15:43:56 -0800
> From: "Raven Of Night Raven Of Night" <[EMAIL PROTECTED]>
> Subject: [Tutor] python dictionaries
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; format=flowed
>
> Hi, there was
Joe:
See below:
> -Original Message-
> Date: Tue, 2 Jan 2007 19:16:33 + (UTC)
> From: Joe M <[EMAIL PROTECTED]>
> Subject: [Tutor] basic python question/getting values
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
> -Original Message-
> From: Kent Johnson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 13, 2006 3:42 PM
> To: Carroll, Barry
> Cc: tutor@python.org
> Subject: Re: [Tutor] Accessing the name of a Function
>
<>
>
> You could also do this very si
and Kent for their help
Regards,
Barry
[EMAIL PROTECTED]
541-302-1107
We who cut mere stones must always be envisioning cathedrals.
-Quarry worker's creed
> -Original Message-
> From: Kent Johnson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December
MAIL PROTECTED]
> Sent: Tuesday, December 12, 2006 4:05 PM
> To: Carroll, Barry
> Cc: tutor@python.org
> Subject: Re: [Tutor] Accessing the name of a Function
>
> * Carroll, Barry <[EMAIL PROTECTED]> [061212 23:54]:
> >Greetings:
> >
> >
> &g
Greetings:
Is it possible, from inside a stand-alone function (not a member of a
class), to access the string representation of the function's name? If
so, how?
Regards,
Barry
[EMAIL PROTECTED]
541-302-1107
We who cut mere stones must always be envisioning
pe: text/plain; charset="us-ascii"; format=flowed
>
> At 02:49 PM 11/27/2006, John Fouhy wrote:
> >On 28/11/06, Carroll, Barry <[EMAIL PROTECTED]> wrote:
> > > I'm not sure these qualify as "simple", but they work. This was
one
> of
&g
Hello, Asrarahmed
> -Original Message-
> Date: Mon, 27 Nov 2006 12:06:54 +
> From: "Asrarahmed Kadri" <[EMAIL PROTECTED]>
> Subject: [Tutor] How to generate permutations of a given string
> To: tutor-python
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=
Hello, John
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John
Fouhy
> Sent: Tuesday, November 07, 2006 6:56 PM
> To: Carroll, Barry
> Cc: tutor@python.org
> Subject: Re: [Tutor] Ruby Code Blocks vs. Python Lambdas
>
> On
pe: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> "Carroll, Barry" <[EMAIL PROTECTED]> wrote
>
<>
>
> > The consensus was that Python was much better than Ruby in
> > all ways.
>
> That
OTECTED]>
> Content-Type: text/plain; charset="us-ascii"
>
> Am Dienstag, den 07.11.2006, 09:56 + schrieb Alan Gauld:
> > "Carroll, Barry" <[EMAIL PROTECTED]> wrote
> >
> > > Thank you for this post. I was in a discussion of Ruby vs. Pytho
Danny:
> -Original Message-
> Date: Mon, 6 Nov 2006 14:28:30 -0800 (PST)
> From: Danny Yoo <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] (OT) Flame wars
> To: Chris Hengge <[EMAIL PROTECTED]>
> Cc: Tutor
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=f
Greetings, all:
> -Original Message-
> Date: Mon, 6 Nov 2006 10:32:32 +
> From: Michael Sparks <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Amazing power of Regular Expressions...
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
>
Greetings:
I agree completely with David. There are plenty of places to discuss
controvercial topics. Let's not do it here, where it will only disrupt,
and possibly ruin, an exceptionally useful teaching and learning
channel.
Regards,
Barry
[EMAIL PROTECTED]
541-302-1107
___
Chris:
See below.
> -Original Message-
> Message: 7
> Date: Fri, 27 Oct 2006 12:20:51 -0700
> From: "Chris Hengge" <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Why is this only catching one occurance?
> To: "Bob Gailer" <[EMAIL PROTECTED]>
> Cc: Tutor
> Message-ID:
> <[EMAIL PROTE
I'm a Vim user, too. I usually have three windows open: IPython to try
out snippets of code, ViM to edit the target program, and a command
shell to execute the module/run the self tests. A while back I asked
the ViM mailing list (vim@vim.org) if there was a way to open a shell
window from within
> -Original Message-
> Date: Mon, 25 Sep 2006 02:59:45 -0700
> From: Dick Moores <[EMAIL PROTECTED]>
> Subject: [Tutor] Question about startswith() and endswith() in 2.5
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="us-ascii"; format=flowed
>
Greetings:
I have a class that implements a die (singular or dice). Here is the class
definition:
>>>
class Die(object):
"""Implements a gaming die.
Attributes:
n: the number of sides
Must correspond to the number of sides on a physical die.
val
Greetings:
I have written a console version of the dice game Yahtzee).
I would like to post it for comment. It is too long to post here and I don’t
have a web site. Is there some place where I can post my code and get
feedback about it?
Regards,
Barry
[EMAIL PROTECTED]
541-3
Hello, Marcus
> Date: Mon, 21 Aug 2006 16:50:37 -0400
> From: "Marcus Goldfish" <[EMAIL PROTECTED]>
> Subject: [Tutor] custom container subclassing list-- slices are
> lists!?
> To: Tutor
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> -Original Message-
> Date: Mon, 21 Aug 2006 13:52:45 -0700 (PDT)
> From: Terry Carroll <[EMAIL PROTECTED]>
> Subject: [Tutor] Big wad of Python tutorials
> To: tutor@python.org
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
>
> This page, consis
Hello, Diana,
I have had a little experience with networking problems. Here's my take
on your situation.
Regards,
> Date: Tue, 15 Aug 2006 11:19:35 +1000
> From: Diana Hawksworth <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Python on network problems
> To: Alan Gauld <[EMAIL PROTECTED]>
> Cc:
Hello Chris,
> -Original Message-
> Date: Mon, 31 Jul 2006 15:29:13 -0700 (PDT)
> From: Christopher Spears <[EMAIL PROTECTED]>
> Subject: [Tutor] syntax error
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=iso-8859-1
>
> My brain has gone squi
Danny, et al:
> -Original Message-
> Date: Tue, 25 Jul 2006 15:43:34 -0700 (PDT)
> From: Danny Yoo <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] confused by linked queue
> To: Christopher Spears <[EMAIL PROTECTED]>
> Cc: Tutor
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: TEXT/PLAIN; ch
Greetings:
> -Original Message-
> Date: Wed, 26 Jul 2006 10:11:28 +0100
> From: "Alan Gauld" <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] loops to assign variables
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
>
<>
>
> "John CORRY" <[EMAIL PROTECTED]> wrote
>
> > For example, I
Raj:
I prefer ViM as well. I have tried several IDEs: Idle, SlickEdit,
Eclipse/PyDev, Stani's Python Editor (SPE). None of them manages
multiple editing windows as well as ViM, and that is the feature I use
most.
In a typical editing session I will have six or more editing windows
open, acces
Tracy:
> Date: Sat, 15 Jul 2006 22:44:43 -0700 (PDT)
> From: Danny Yoo <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] How do you implement a config file?
> To: Tracy R Reed <[EMAIL PROTECTED]>
> Cc: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format
Greetings:
Like Matthew, I have a been programming for several years, mostly in
C-like languages and various assembly languages. I started using Python
about two years ago. "Learning Python" is my text book; "Python in a
Nutshell" is my language reference. Both are excellent. I use one or
both
Regards,
Tino:
I agree with Kent on this. As much as possible, a unit test should test
what it is supposed to do.
> Date: Mon, 26 Jun 2006 15:50:36 -0400
> From: "Tino Dai" <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Unit testing
> To: "Kent Johnson" <[EMAIL PROTECTED]>, tutor@python.org
>
Gregor:
Doesn't this really belong on Python-announce-list instead of here? You
aren't asking any questions and you are announcing a new python-based
application. That's what Python-announce-list is for. Post your
announcement there and you will get plenty of feedback for your next
release.
d this up after being out for most of the week...
>
> "Carroll, Barry" <[EMAIL PROTECTED]> wrote in message
>
> > One reason to for choosing a human-readable format is the desire to
> > visually confirm the correctness of the stored data and format.
>
> That
Hello, Andrew:
> -Original Message-
> Date: Mon, 12 Jun 2006 07:53:05 -0400
> From: Andrew Robert <[EMAIL PROTECTED]>
> Subject: [Tutor] Python related mags
> To: Python Tutor
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> -BEGIN PGP SIGNED MES
Alan, Ralph, et al:
This is a little off-topic, I guess, being not directly related to
Python. Oh, well. Here are a couple of personal opinions and a
question about XML.
> -Original Message-
> Date: Sun, 11 Jun 2006 08:55:17 +0100
> From: "Alan Gauld" <[EMAIL PROTECTED]>
> Subject: Re:
Kermit:
> --
>
> Message: 7
> Date: Fri, 09 Jun 2006 11:02:44 -0400
> From: Kent Johnson <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] file attribute of module
> Cc: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1; format=
Greetings:
> -Original Message-
> Date: Sun, 04 Jun 2006 18:43:25 -0700
> From: Yi Qiang <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Not Really Questions
> To: tutor@python.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> -BEGIN PGP SIGNED MESSAG
Jun 2, 2006 11:10 PM
> Subject: Re: [Tutor] Trouble with os.path.isfile
> To: "Carroll, Barry" <[EMAIL PROTECTED]>
>
>
> Here is the problem IMO:
>
> I did some modifications to your code (very minimal on ifs) and it
worked:
>
> im
Greetings:
One of the functions of my test system web server program is
to allow the user to view the contents of the image file directories and select
files to load onto the hardware. Obviously, a central part of this
function is to identify and display the names of directories and fi
Carlos:
Where does one find the objxml module? I have looked on python.org and
Google and can't find it.
Thanks in advance,
Barry
[EMAIL PROTECTED]
541-302-1107
We who cut mere stones must always be envisioning cathedrals.
-Quarry worker's creed
> -Original Mes
Kent:
<>
> >
> > Essentially, page must do the following:
> >
> >1. present the files in the directory to the user as some sort
> > of list from which multiple names can be selected,
> >2. present the selected file names in the order in which they
> > were selected,
> >3. a
Greetings:
I'm adding a new page to our test system's browser based UI. This page
implements the process of sending one more barcode 'images' to the system for
decoding by the unit under test. Each 'image' is in a file in a known
directory on the test system. The file(s) to be presented, and
Greetings, John,
For my money, that book is:
Learning Python, 2nd Edition
By David Ascher, Mark Lutz
Publisher: O'Reilly
Pub Date: December 2003
ISBN: 0-596-00281-5
Pages: 620
$25.19 new, 18.47 used (+ shipping)
From amazon.com
I taught myself Python wit
Hello, Meenakshi,
> -Original Message-
> Date: Fri, 21 Apr 2006 19:44:57 -0700 (PDT)
> From: [EMAIL PROTECTED]
> Subject: [Tutor] looking to hire a tutor
> To: tutor@python.org
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain;charset=iso-8859-1
>
>
> Hi,
> I apo
Hi, Linda,
> -Original Message-
> I have a question. in the LIST M=
> [[1,1,1,1],
> [0,1,1,1],
> [1,1,0,1],
> [1,1,1,1]]
> If treat them as the locations of 16 points, I want to generate
another
> list
> N to hold the corresponding value for each point to its nearest 0.
> For example:
> th
Terry:
> -Original Message-
> Date: Thu, 20 Apr 2006 10:14:23 -0700 (PDT)
> From: Terry Carroll <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] FW: Splitting a number into even- and odd-
> numbered digits
> To: tutor@python.org
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: TEX
cs:
>
>1. Re: Config file parsing (Kent Johnson)
>2. FW: Splitting a number into even- and odd- numbered digits
> (Carroll, Barry)
>3. Re: Tutor FAQ? (Eric Walker)
>4. Re: Splitting a number into even- and odd- numbered digits
> (Carroll, Barry)
>
Greetings:
Unfortunately, my problem description was incomplete. I forgot to
include two important requirements:
1. the length of the input string is arbitrary,
2. the order of the digits must be maintained.
I could not find a way to include these requirements in a single, simple
expres
Greetings:
First of all, thanks to those who contributed suggestions.
Unfortunately, my description was incomplete.
> I am writing a function that accepts a string of decimal digits,
> calculates a checksum and returns it as a single character string.
> The first step in the calculation is to
Greetings:
First of all, thanks to those who contributed suggestions.
Unfortunately, my description was incomplete.
> I am writing a function that accepts a string of decimal digits,
> calculates a checksum and returns it as a single character string.
> The first step in the calculation is to
Greetings:
I am writing a function that accepts a string of decimal digits, calculates a
checksum and returns it as a single character string.
The first step in the calculation is to split the input into two strings: the
even- and odd- numbered digits, respectively. The least significant digi
Payal:
> -Original Message-
> Date: Mon, 17 Apr 2006 13:24:31 -0400
> From: Payal Rathod <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] functions in Python
> To: Steve Nelson <[EMAIL PROTECTED]>
> Cc: "Python\[Tutor\]"
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=us-a
_
We who cut mere stones must always be envisioning cathedrals.
-Quarry worker's creed
> -Original Message-
> From: Alan Gauld [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 13, 2006 2:46 PM
> To: Carroll, Barry; tutor@python.org
> Subject: Re: [Tutor] fail
Greetings:
The discussion surrounding this topic (by Payal, Kent, Alan and others)
has been very interesting. It illustrates the fact that software
engineering remains very much a craft. As with all crafts, is heavily
influenced by the preferences (style if you will) of the individual
artisan. T
Payal:
I agree with Kent: the Python Cookbook is an excellent resource. And,
it has a whole section on System Administration. try this URL:
http://aspn.activestate.com/ASPN/Cookbook/Python?kwd=System
You can also try Google. I entered 'Python sysadmin'. Here are just a
few potentially in
Kent:
> -Original Message-
> From: Kent Johnson [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 07, 2006 3:59 PM
> To: Carroll, Barry
> Subject: Re: [Tutor] Unittest not running all test cases
>
> Carroll, Barry wrote:
> > Kent:
> >
> > I just rec
Kent:
I just rechecked my class names, and there are no duplicates. I was
careful to preface all of the classes in testsymc39 with 'C39...', and
used 'S25...' in testsym25. Likewise, the classes in each module have
names that describe the type of data being tested, so names are unique
within eac
Greetings:
I'm not certain this is the right forum for this question. If not, please
point me to the correct one.
I am using the unittest module to test a package our team is writing. I
presently have three modules of test cases and a top level module to run the
entire suite. The hierarch
Greetings, Kaushal:
There are two topics to understand here:
1. what "TRUE" and "FALSE" mean in Python, and
2. how Python evaluates "X and Y".
The tutorial "Instant Python" by Magnus Lie Hetland has good, short
descriptions of these two topics, so I'll borrow from it. You can find
the doc
John:
Well, I haven't made a custom container class before. This looks like a
good time to start. And the sample code you provided looks like a good
starting place. Thanks for your help.
Regards,
Barry
[EMAIL PROTECTED]
541-302-1107
We who cut mere stones must alwa
Terry and Kent:
Thanks for your timely replies. I agree: its creator could have chosen a
more intuitive name for setdefault.
Regards,
Barry
[EMAIL PROTECTED]
541-302-1107
We who cut mere stones must always be envisioning cathedrals.
-Quarry worker's creed
_
Greetings:
I have a function that computes the checksum of an integer, including or
excluding digits in the computation based on the content of a mask string. For
example,
cksum(123456789, '***...***')
will do its computation on 123789, masking out the three non-significant
digits.
M
Greetings:
What is the purpose of the dictionary method setdefault(k[, x])?
For example assume the following dictionary:
>>> colors = {'green':(0,255,0), 'red':(255,0,0), 'blue':(0,0,255),
>>> 'white':(255,255,255), 'black':(0,0,0)}
>>>
Now, execute the statement:
>>> colors.setdefault('black
Jacob,
What, exactly, do you mean by 'hack'? The free dictionary wiktionary
http://en.wiktionary.org/wiki
gives the following definitions
hack
Verb
to hack (third-person singular simple present hacks, present participle
hacking, simple past hacked, past participle hacked)
1. To coug
TED]
> Sent: Tuesday, February 28, 2006 2:57 PM
> To: Carroll, Barry
> Cc: tutor@python.org
> Subject: RE: [Tutor] Unexpected Behavior in unittest
>
>
>
> > I wish it were that simple. 'test3.py' is the name of the file
> > containing the test case clas
AIL PROTECTED]
541-302-1107
We who cut mere stones must always be envisioning cathedrals.
-Quarry worker's creed
> -Original Message-
> From: Danny Yoo [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 28,
Greetings:
This is a fairly long-winded question. I beg your indulgence.
I am writing unit tests for our bar code scanner test software, and I have
encountered some results that I cannot explain nor get around. Here is the
scenario.
Our program implements a generator class for creating 'la
e it keeps its brain"
JK Rowling
>
>From: Adam [mailto:[EMAIL PROTECTED]
>Sent: Friday, February 10, 2006 1:42 PM
>To: Carroll, Barry
>Cc: tutor@python.org
>Subject: Re: [Tutor] Iterating over a string: index and value
>
>He
I seem to recall reading somewhere that it is possible to concurrently
generate the index and value of a string’s characters in a single for
statement. Is this true or did imagine it?
Here is the scenario:
Given an ASCII string of arbitrary length and content, generate
a sequence o
Greetings:
I have been programming in Python for about a year. We use Python 2.3;
we haven't migrated to 2.4 because the Real-time OS we use in our test
systems doesn't yet support it. I have the four O'Reilly 'standards' as
well ("Nutshell", "Learning", "Cookbook", and "Programming"). I use
"N
Greetings:
I took Edgar's script and added some more people. Here is the script as
I ran it.
class Person:
'''Represents a person.'''
population = 0
def __init__(self, name):
'''Initializes the person's data.'''
self.name =
Thanks, Bob. I figured it was something simple.
BGC
"Never trust anything that can think for itself
if you can't see where it keeps its brain"
JK Rowling
<>
> >
> > sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
> > sock.settimeout(timetowait)
> >
Greetings:
I am implementing a (crude but useful) debug facility in my test system client
software. Basically, I test the value of a global Boolean. It True, I write
pertinent data to a text file. I want to do this in multiple functions in a
module. Rather than open and close the file each t
Hello, Erik,
Welcome to the maillist.
>From your description, is sounds like you are attempting to run the
scripts by double clicking on them from Windows Explorer, or from the
Run dialog on the Start menu. Both these methods open a command window
in a new process, run the script, then termina
Greetings:
I am writing the first of the handler routines for my test system web
interface. They will be Common Gateway Interface (CGI) scripts written in
Python. In the literature I have studied, I have seen the extensions .cgi
and .py applied to such files. Is one preferred over the other, or
Kent:
Thank you for the explanation. This is a subtlety of Python that has
tripped me up before.
Barry
> Date: Mon, 07 Nov 2005 16:26:39 -0500
> From: Kent Johnson <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] Namespace Problem
> Cc: "'tutor@python.org'"
> Message-ID: <[EMAIL PROTECTED]>
> Cont
e 15, in do_stuff
hdr = struct.pack('@2BH',ABC|DEF,seq,len(in_str))
UnboundLocalError: local variable 'seq' referenced before
assignment>>>>>>>>>>>>>>>>>>>>>>>>
I can't figure it out.
Barry
>
I have a function that makes use of several global variables:
##
Include struct
ABC = 1
DEF = 2
xyz = 0
# Other variables
def do_stuff(in_str):
hdr = struct.pack('@2BH',ABC|DEF,xyz,len(in_str))
newstr = hdr+in_str
# rest of code snipped
##
When I run the program c
Greetings:
My UDP client is receiving responses from the server, and now I need to
process them. A typical response string looks like this:
"(0, ''),some data from the test system"
The tuple represents the error code and message. If the command had failed,
the response would look like this
Mike:
I see two issues here:
First, do you really want to apply your field selection logic to ALL the
lines in each file? It seems to me that the first five lines of the file
are header information that you want to ignore. If so, and if all the files
have the same format, you can use a loop to
Greetings:
After studying the socket examples and tutorials y'all pointed me to, I
settled on Examples 19.3 and 19.4 in Alex Martelli's " Python in a Nutshell"
as my starting point. They worked fine, of course, right out of the box.
My task now is to extend the client script to handle the command
Johan:
The link is helpful indeed. In five minutes I found six tutorials I want to
check out for my current project. Thank you.
Barry
> Message: 5
> Date: Wed, 02 Nov 2005 11:02:45 +0200
> From: Johan Geldenhuys <[EMAIL PROTECTED]>
> Subject: [Tutor] Tutorials on the web
> To: Tutor
> Messa
: Tuesday, November 01, 2005 11:39 AM
> To: Kent Johnson
> Cc: Carroll, Barry; 'tutor@python.org'
> Subject: Re: [Tutor] Talking to UDPServer
>
> I've done some network programming mostly with TCP and I don't think
> that the way the client connects to the server is a l
1 - 100 of 110 matches
Mail list logo