On 02/11/2018 03:45, Avi Gross wrote:
> I am not totally up on the exact purposes of this group but have noted how
> many of the questions asked have been frustrating.
Unfortunately that goes with the territory.
We are a list catering to beginners to Python and, frequently,
to programming. As a re
environment needed when you submit a
paper so it can be replicated!
Avi
-Original Message-
From: Tutor On Behalf Of
Mats Wichmann
Sent: Thursday, November 1, 2018 1:54 PM
To: tutor@python.org
Subject: Re: [Tutor] TESTING
On 11/1/18 11:24 AM, Mario Radomirovic wrote:
> All good
>
>
On 11/1/18 11:24 AM, Mario Radomirovic wrote:
> All good
>
> On Thu, 1 Nov 2018 6:17 pm Alan Gauld via Tutor wrote:
>
>> On 01/11/2018 14:01, richard mwenya via Tutor wrote:
>>> Hello.
>>> Everyone is quiet or is it my email thats not working?
>>
>> Just quiet, I've seen nothing in the moderator
All good
On Thu, 1 Nov 2018 6:17 pm Alan Gauld via Tutor wrote:
> On 01/11/2018 14:01, richard mwenya via Tutor wrote:
> > Hello.
> > Everyone is quiet or is it my email thats not working?
>
> Just quiet, I've seen nothing in the moderators queue
> for 5 days. But that happens sometimes.
>
> I g
On 01/11/2018 14:01, richard mwenya via Tutor wrote:
> Hello.
> Everyone is quiet or is it my email thats not working?
Just quiet, I've seen nothing in the moderators queue
for 5 days. But that happens sometimes.
I guess it just means nobody is having any Python issues
right now.
--
Alan G
Lis
Hello,
i'm seeing your message
On Thu, Nov 1, 2018 at 7:03 AM richard mwenya via Tutor
wrote:
> Hello.
> Everyone is quiet or is it my email thats not working?
> ___
> Tutor maillist - Tutor@python.org
> To unsubscribe or change subscription options:
Hello.
Everyone is quiet or is it my email thats not working?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Mon, Jan 08, 2018 at 12:31:06AM +, Alan Gauld wrote:
> On 07/01/18 23:38, Steven D'Aprano wrote:
> > I've tried emailing in response to the os.path.realpath thread twice,
> > and neither email has made it through.
> >
> > Alan, am I stuck in the moderator queue for some reason?
>
> Nope, n
On Sun, Jan 7, 2018 at 5:38 PM, Steven D'Aprano wrote:
> I've tried emailing in response to the os.path.realpath thread twice,
> and neither email has made it through.
>
> Alan, am I stuck in the moderator queue for some reason?
This one made it through. My original answer to your post last nigh
I've tried emailing in response to the os.path.realpath thread twice,
and neither email has made it through.
Alan, am I stuck in the moderator queue for some reason?
--
Steve
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscript
On 05/12/17 16:02, Alan Gauld via Tutor wrote:
> address the issues raised and the latest incarnation
> should work (although not well with Opera for some reason!)
I think I've now got scrolling to work on iOS/Safari
and Opera almost works... (a slight glitch when the
width is within a particular
On 05/12/17 16:02, Alan Gauld via Tutor wrote:
> address the issues raised and the latest incarnation
> should work (although not well with Opera for some reason!)
Now better with Opera, although the contents panel is
still not quite right on small screens.
Still looking for feedback from iOS de
Folks,
A couple of weeks ago I asked for testers for my web tutor.
Many thanks to those who helped out. I've now tried to
address the issues raised and the latest incarnation
should work (although not well with Opera for some reason!)
As before I am particularly needful of feedback from
Apple use
On 02/10/16 02:46, boB Stepp wrote:
>> case. If I know that the result is always an int I can
>> use the first case if I know its always a tuple I can
>> use the second. But not knowing which is just plain
>> messy.
>
> So in which sorts of scenarios would you use argument unpacking?
Any time a
On Sat, Oct 1, 2016 at 7:19 PM, Alan Gauld via Tutor wrote:
> On 01/10/16 23:08, boB Stepp wrote:
>> On Sat, Oct 1, 2016 at 11:35 AM, Alan Gauld via Tutor
>> wrote:
>>
>>> ... Personally I don't like functions that
>>> sometimes return one and sometimes two results. I'd rather
>>> you returned a
On 01/10/16 23:08, boB Stepp wrote:
> On Sat, Oct 1, 2016 at 11:35 AM, Alan Gauld via Tutor
> wrote:
>
>> ... Personally I don't like functions that
>> sometimes return one and sometimes two results. I'd rather
>> you returned a None first argument in the first case
>> to make it consistent.
>
On Sat, Oct 1, 2016 at 11:35 AM, Alan Gauld via Tutor wrote:
> ... Personally I don't like functions that
> sometimes return one and sometimes two results. I'd rather
> you returned a None first argument in the first case
> to make it consistent.
Why don't you like doing this? What are the plus
On 01/10/16 16:12, boB Stepp wrote:
>>> This module will take a string and right justify it so that the last
>>> character
>>> of the line will fall in column 70 of the display. The results will be
>>> printed to stdout.'''
>>>
>> Do you need print_msgs()?
>> Won't it work the same with
>>
>>
On Sat, Oct 1, 2016 at 2:02 AM, Alan Gauld via Tutor wrote:
> Do you need print_msgs()?
> Won't it work the same with
>
>print(right_justify(input_string))
>
> You are only feeding one line at a time into the print msgs.
>
> You could do it all in a new print_msgs() like:
>
> def prin
On Sat, Oct 1, 2016 at 2:02 AM, Alan Gauld via Tutor wrote:
> On 01/10/16 05:24, boB Stepp wrote:
>
>> ===
>> '''Exerise 3.1 from "Think Python 2" by Allen Downey.
>>
>> This module will take a string and right justify it
On 01/10/16 05:24, boB Stepp wrote:
> ===
> '''Exerise 3.1 from "Think Python 2" by Allen Downey.
>
> This module will take a string and right justify it so that the last character
> of the line will fall in column 70 of
On Sat, Oct 1, 2016 at 12:12 AM, Richard Doksa wrote:
> unsubscibe please
If you wish to unsubscribe, go to the bottom of this page and follow
its instructions:
https://mail.python.org/mailman/listinfo/tutor
boB
___
Tutor maillist - Tutor@python.or
On Fri, Sep 30, 2016 at 5:07 AM, Steven D'Aprano wrote:
[snip]
> and preferably three:
>
> (1) function that does the calculation;
> (2) function that does the output;
> (3) function that calls (1) and then (2)
>
>
> If (1) and (2) are well-designed, then (3) is so trivial it needs no
> tests:
>
On Fri, Sep 30, 2016 at 5:07 AM, Steven D'Aprano wrote:
> On Thu, Sep 29, 2016 at 09:24:51PM -0500, boB Stepp wrote:
>> Second, it seems that prints are often intermingled with the main
>> logic of a function and only serve to pass on a message to the user.
>
> Yeah, you normally shouldn't do tha
On Thu, Sep 29, 2016 at 09:24:51PM -0500, boB Stepp wrote:
> Testing output of print functions (Py 3). First off, is it worth it to do so?
Unless you are writing tests for the Python language itself, you can
assume that print() itself is working.
You should test functions that call print: call
Testing output of print functions (Py 3). First off, is it worth it to do so?
Second, it seems that prints are often intermingled with the main
logic of a function and only serve to pass on a message to the user.
For example, in an earlier thread (
Questions as to how to run the same unit test m
Just checkin'
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
___
Tutor maillist - Tutor@python.org
To
I have had some problems with another python.org ML.
I am sending this to see if it is received.
Please disregard.
thanks
--
Tim
http://www.akwebsoft.com, http://www.tj49.com
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription
On 22/01/2015 15:40, dw wrote:
Thanks for your good comments.
I do think I found a work around
body = ""
for x in range(0,len(line_array)):
test_line = len(re.findall(r'[0-9]{2}/[0-9]{2}/[0-9]{4}',
line_array[x]))
if test_line > 0:
body = body + line_array[x]+"\n"
Using
On 22/01/2015 16:15, dw wrote:
Thanks so much Steve and Mark!
You've given me a lot to chew on. :-D
I'll pursue!
More Python FUN!!
Thanks for the thanks, but please don't change the subject as it breaks
threading, making it more
Thanks for your good comments.
I do think I found a work around
body = ""
for x in range(0,len(line_array)):
test_line = len(re.findall(r'[0-9]{2}/[0-9]{2}/[0-9]{4}',
line_array[x]))
if test_line > 0:
body = body + line_array[x]+"\n"
For each iteration re.findall returns a lis
Thanks so much Steve and Mark!
You've given me a lot to chew on. :-D
I'll pursue!
More Python FUN!!
Based on your description, I think the best way to do this is:
# remove blank lines
line_array = [line for line in line_array if l
On 21/01/2015 18:14, dw wrote:
Hello Python Friends.
I have a string array, called "line_array".
There may be up to 50 or more elements in the array.
So:
- line_array[1] may contain "01/04/2013 10:43 AM17,410,217
DEV-ALL-01-04-13.rlc\n"
- line_array[2] may contain "01/25/2013 03:21 PM
How large will your array be in production?
If it going to be very large, you may want to consider a database.
You're simulating a collection of records as an in-memory sequence of
flat strings. This design won't scale, so if you are working with a
lot of data, you may want to look into a dedicat
On Wed, Jan 21, 2015 at 10:14:42AM -0800, dw wrote:
> Hello Python Friends.
> I have a string array, called "line_array".
Do you mean a list of strings? "String array" is not a standard Python
term, it could mean something from the array module, from numpy, or
something completely different.
It
On 21/01/15 18:14, dw wrote:
- line_array[1] may contain "01/04/2013 10:43 AM17,410,217
DEV-ALL-01-04-13.rlc\n"
- line_array[2] may contain "01/25/2013 03:21 PM17,431,230
DEV-ALL-01-25-2013.rlc\n"
- line_array[3] may contain "\n"
I want to retain all elements which are valid (
Hello Python Friends.
I have a string array, called "line_array".
There may be up to 50 or more elements in the array.
So:
- line_array[1] may contain "01/04/2013 10:43 AM17,410,217
DEV-ALL-01-04-13.rlc\n"
- line_array[2] may contain "01/25/2013 03:21 PM17,431,230
DEV-ALL-01-25-2
On Sun, Apr 21, 2013 at 9:33 PM, Steven D'Aprano wrote:
>
> it's NOT because you failed to post plain text, since you actually did.
Actually it's a multipart message with both plain text and HTML, with
the digest quoted in each version. It helps that the HTML is using
" " and that map directly t
On 22/04/13 10:49, Alex Baker wrote:
Hello,
I've been lurking tutor for the last couple months and have quite enjoyed it!
Welcome, and congratulations on your first post! Unfortunately I have to start
with a complaint :-( but it's NOT because you failed to post plain text, since
you actually
u) Python modules in
a systematic way.
On the other hand, if you're looking for a syllabus of studying
languages (plural), consider
1) a dynamic language
2) a compile one
3) an assembler
4) other (lisp, Forth, ML, Prolog, ...)
Each category is enough different that you hav
Hello,
I've been lurking tutor for the last couple months and have quite enjoyed it!
I'm having a problem testing a method using nosetests. The assignment (Learn
Python the Hard Way) asks that I write tests for a package using assert_equal
and assert_raises. I've conquered the assert_equals but
On Tue, Jan 10, 2012 at 3:31 PM, Walter Prins wrote:
> Hi,
>
> On 10 January 2012 12:15, Thomas Maier wrote:
>> This code works without py.test or nosetests. For example if I use print
>> instead of 'assert'.
>> Both py.test and nosetests failed to execute this correctly.
>> Or maybe they do exec
Hi,
On 10 January 2012 12:15, Thomas Maier wrote:
> This code works without py.test or nosetests. For example if I use print
> instead of 'assert'.
> Both py.test and nosetests failed to execute this correctly.
> Or maybe they do execute it correctly, I just don't understand it..:)
> They both re
Hi all,
I would like to use some existing tool like py.test or nose to
run my tests, but I failed to do so.
The problem is as follow. I have tests:
### test_methods.py ###
def test_one():
assert 1 == 1
def test_two():
assert 1 == 1
#
I have abstraction layer that keeps info
Testing from new Ubuntu install... problems with Thunderbird settings...
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.pytho
"Katt" wrote
Just a newbie question, but when would you test for an empty list?
When you are processing a list such that you are deleting items as you go.
When the list is empty stop processing!
And Python helps you do that by treating an empty list as a False
boolean value so you can do
2009/10/19 Katt
>
> Hello all,
>
> Just a newbie question, but when would you test for an empty list? Is it
> part of a code error detection or an error check to make sure that there is
> user input?
>
> Couldn't you just use something like:
>
> while len(mylist) > 0:
> continue program
> els
Wayne wrote:
Hi, I think I recall seeing this here, but I wanted to make sure I'm
correct.
Is the best way to test for an empty list just test for the truth value?
I.e.
mylist = [1,2,3]
while mylist:
print mylist.pop()
Thanks,
Wayne
My take is simple: Use the above form if you *know* th
Hi,
please don't top-post.
Todd Matsumoto wrote:
> I don't understand how the while loop efficiently tests if the list is
> empty.
It doesn't. It only tests a condition. And the result of the condition is
determined by the list itself, which knows if it's empty or not.
Stefan
- Original-Nachricht
> Datum: Mon, 19 Oct 2009 04:52:40 -0400
> Von: Dave Angel
> An: Wayne
> CC: "tutor@python.org"
> Betreff: Re: [Tutor] Testing for empty list
>
>
> Wayne wrote:
> > Hi, I think I recall seeing this here, but I wanted to make sur
Wayne wrote:
Hi, I think I recall seeing this here, but I wanted to make sure I'm
correct.
Is the best way to test for an empty list just test for the truth value?
I.e.
mylist = [1,2,3]
while mylist:
print mylist.pop()
Thanks,
Wayne
My take is simple: Use the above form if you *know*
On Mon, Oct 19, 2009 at 2:26 AM, Todd Matsumoto wrote:
> The while loop will print each index of the list.
No it's printing each element of the list, not the index.
> In a way it checks that if the list is empty by printing the items. As far
> as I know there isn't any 'True' or 'False' output
"Todd Matsumoto" wrote
The while loop will print each index of the list.
No, the while does nothing with list indexes, that is entirely
down to the programmer. The while loop simply repeats for
as long as its test expression evaluates to True.
As far as I know there isn't any 'True' or 'Fal
On Mon, Oct 19, 2009 at 3:29 AM, Wayne wrote:
> Hi, I think I recall seeing this here, but I wanted to make sure I'm
> correct.
> Is the best way to test for an empty list just test for the truth value?
> I.e.
> mylist = [1,2,3]
> while mylist:
> print mylist.pop()
Whether it is the 'best' way
if not mylist:
... do something ...
T
Original-Nachricht
> Datum: Sun, 18 Oct 2009 20:29:53 -0500
> Von: Wayne
> An: "tutor@python.org"
> Betreff: [Tutor] Testing for empty list
> Hi, I think I recall seeing this here, but I wanted to make sure I'm
On 19-Oct-09, at 7:11 AM, vince spicer wrote:
On Sun, Oct 18, 2009 at 7:29 PM, Wayne wrote:
Hi, I think I recall seeing this here, but I wanted to make sure I'm
correct.
Is the best way to test for an empty list just test for the truth
value? I.e.
mylist = [1,2,3]
while mylist:
p
On Sun, Oct 18, 2009 at 7:29 PM, Wayne wrote:
> Hi, I think I recall seeing this here, but I wanted to make sure I'm
> correct.
> Is the best way to test for an empty list just test for the truth value?
> I.e.
>
> mylist = [1,2,3]
>
> while mylist:
>print mylist.pop()
>
> Thanks,
> Wayne
>
>
Hi, I think I recall seeing this here, but I wanted to make sure I'm
correct.
Is the best way to test for an empty list just test for the truth value?
I.e.
mylist = [1,2,3]
while mylist:
print mylist.pop()
Thanks,
Wayne
--
To be considered stupid and to be told so is more painful than being
Hello Spir!
On Thursday 23 April 2009, spir wrote:
> I would like to refactor tests of an application in a consistent
> form. I have a ton of tests for each module, but they are all ad
> hoc things. doctest looks great. The issue is it seems based on
> command line-like testing:
I have researched
Hello Spir; hello all!
I have a similar question:
For projects with multiple packages (directories) and modules (files);
where do you put your testcode, what framework do you use, and what
design patterns do you employ?
I currently work on a project with one package and several modules. I
us
"spir" wrote
My app is about parsing, which input and output usually both are big
and complicated *strings*. So that I find the command line model
really unappropriate for expressing test cases and their expected
results.
Any hint/pointer/comment welcome,
What about using command line red
On Thu, Apr 23, 2009 at 8:55 AM, spir wrote:
> Hello,
>
> I would like to refactor tests of an application in a consistent form. I have
> a ton of tests for each module, but they are all ad hoc things.
> My app is about parsing, which input and output usually both are big and
> complicated *str
Hello,
On Thu, Apr 23, 2009 at 10:55 PM, spir wrote:
>
> My app is about parsing, which input and output usually both are big and
> complicated *strings*. So that I find the command line model really
> unappropriate for expressing test cases and their expected results.
>
Interesting - haven't r
Hello,
I would like to refactor tests of an application in a consistent form. I have a
ton of tests for each module, but they are all ad hoc things.
doctest looks great. The issue is it seems based on command line-like testing:
"""
This is the "example" module.
The example module supplies one f
Please ignore, switching email address.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Andrew Robert wrote:
> Hi everyone,
>
> We have several NFS mounts that are in use.
>
> Occasionally, the NFS mounts seem to go out to lunch.
>
> The mounts appear active but are no longer functional.
>
> Is there a Python module specific to NFS that I might use to
> periodically check its sta
Hi everyone,
We have several NFS mounts that are in use.
Occasionally, the NFS mounts seem to go out to lunch.
The mounts appear active but are no longer functional.
Is there a Python module specific to NFS that I might use to periodically
check its status?
I imagine I could make a script to
Keo Sophon wrote:
> Hi,
>
> Today i tested u=unicode(str,'utf-8') and u=str.decode('utf-8'). Then in both
> case I used:
>
> if isinstance(u,str):
>print "just string"
> else:
> print "unicode"
>
> the result of both case are "unicode". So it seems u=unicode(str,'utf-8') and
> u=str.deco
Hi,
Today i tested u=unicode(str,'utf-8') and u=str.decode('utf-8'). Then in both
case I used:
if isinstance(u,str):
print "just string"
else:
print "unicode"
the result of both case are "unicode". So it seems u=unicode(str,'utf-8') and
u=str.decode('utf-8') are the same. How about the pr
Kent Johnson wrote:
> Alex Hunsley wrote:
>>Where do you seasoned pythonites see unittest and doctest in relation to
>>each other? Do you only use one or the other?
>
>
> I think it is mostly personal preference. Doctest is nice where you
> create examples for others, maybe not so nice where you
> I haven't written any code yet, but I was thinking I would like to test
> for either a windows environment (Is an X-Server running) or is this a
> strictly console (no X-server) environment and then do the appropriate
> thing for each environment. I am not sure that is any clearer, but I
> hope i
On Wed, Nov 09, 2005 at 10:00:49PM -, Alan Gauld wrote:
> >How does one test for a running gui in python?
> >
>
> Can you be more specific? A GUI is a feature of a program.
> The GUI is part of the program - although a few programs
> can run in either GUI or Text mode, but they are the except
From: Ken Stevens [mailto:[EMAIL PROTECTED]
> Yes. Under Linux no x-server running? I guess it really wouldn't be
> applicable under a windows enviroment,
OK, I see what you wanted now, ignore my previous message
.
Note that X windows is a protocol and not a GUI.
There are several GUI environme
> How does one test for a running gui in python?
>
Can you be more specific? A GUI is a feature of a program.
The GUI is part of the program - although a few programs
can run in either GUI or Text mode, but they are the exception.
Can you give an example of what you want to test for?
Alan G
__
Alex Hunsley wrote:
> Regards testing, I've been playing with both the unittest
> (http://pyunit.sourceforge.net/pyunit.html) and doctest
> (http://docs.python.org/lib/module-doctest.html). I was wondering what
> peoples thoughts were on the effectiveness and convenience of one versus
> the oth
From: Ken Stevens [mailto:[EMAIL PROTECTED]
> Yes. Under Linux no x-server running? I guess it really wouldn't be
> applicable under a windows enviroment, although I would like my code
> to be transportable. Just under a MS windows enviroment it would
> always be a "gui" environment.
What happens
chinson
Subject: Re: [Tutor] Testing for gui
On Wed, Nov 09, 2005 at 01:16:03PM +1300, Liam Clarke-Hutchinson wrote:
>
> Hi Ken,
>
> How do you mean? I assume you're referring to a non-Windows
> environment? In Linux, I'd imagine that using os.popen("ps") wou
day, 9 November 2005 1:12 p.m.
To: tutor@python.org
Subject: [Tutor] Testing for gui
How does one test for a running gui in python?
Thanks, Ken
--
A journey of a thousand miles starts under one's feet.
-- Lao Tsu
___
Tutor mail
How does one test for a running gui in python?
Thanks, Ken
--
A journey of a thousand miles starts under one's feet.
-- Lao Tsu
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Colin J. Williams wrote:
> Alex Hunsley wrote:
>
>> Regards testing, I've been playing with both the unittest
>> (http://pyunit.sourceforge.net/pyunit.html) and doctest
>> (http://docs.python.org/lib/module-doctest.html). I was wondering
>> what peoples thoughts were on the effectiveness and co
Alex Hunsley wrote:
>Regards testing, I've been playing with both the unittest
>(http://pyunit.sourceforge.net/pyunit.html) and doctest
>(http://docs.python.org/lib/module-doctest.html). I was wondering what
>peoples thoughts were on the effectiveness and convenience of one versus
>the other.
Regards testing, I've been playing with both the unittest
(http://pyunit.sourceforge.net/pyunit.html) and doctest
(http://docs.python.org/lib/module-doctest.html). I was wondering what
peoples thoughts were on the effectiveness and convenience of one versus
the other. It seems to me that doctes
Shitiz Bansal wrote:
>try:
> import
>except:
>
> import
>
>
>--- Ed Hotchkiss <[EMAIL PROTECTED]> wrote:
>
>
>
Explicit is always better than implicit...
try:
import
except ImportError:# Only catch import errors
import
Cheers,
F.
_
try:
import
except:
import
--- Ed Hotchkiss <[EMAIL PROTECTED]> wrote:
> i have a generic script that is using several
> modules on windows and linux
> boxes. i need to have the scripts test if a module
> is installed, and then if
> not - then to install the module. can anyone give m
Ed Hotchkiss wrote:
> i have a generic script that is using several modules on windows and
> linux boxes. i need to have the scripts test if a module is installed,
> and then if not - then to install the module. can anyone give me a
> headsup on how to test for a module, returning something to i
Ed Hotchkiss wrote:
> i have a generic script that is using several modules on windows and
> linux boxes. i need to have the scripts test if a module is installed,
> and then if not - then to install the module. can anyone give me a
> headsup on how to test for a module, returning something to i
i have a generic script that is using several modules on windows and linux boxes. i need to have the scripts test if a module is installed, and then if not - then to install the module. can anyone give me a headsup on how to test for a module, returning something to indicate whether or not it is in
> Also, I hear that optparse is much better than getopt.
this is a true pleasure to work with optparse. It was included in python2.3 and
was primarly called python-optik
Ced.
--
Cedric BRINER
___
Tutor maillist - Tutor@python.org
http://mail.py
>
> If I have arguments, the "different stuff" happens beautifully, thank
> you very much. If I don't have arguments I get this:
>
> if sys.argv[1]:
> IndexError: list index out of range]
>
> So I'm doing something wrong. I looked at getopt, but that seemed to be
> doing what I was already doing,
On May 14, 2005, at 01:30, William O'Higgins wrote:
> if sys.argv[1]:
> do stuff
> else:
> do different stuff
>
> If I have arguments, the "different stuff" happens beautifully, thank
> you very much. If I don't have arguments I get this:
>
> if sys.argv[1]:
> IndexError: list index out
I am writing a tiny commandline utility (re-writing it from Perl) and I
want the behaviour to change based on the presence of arguments. The
conditional in Perl looks like this:
if (defined $ARGV[0]) {
do stuff
} else {
do different stuff
In Python I've nearly been successful, but someth
Hi,
I have not been getting mail, so I thought I'd see what's up.
Thanks.
Jim
James D Homme,
Information Design + Development
Highmark Inc.
[EMAIL PROTECTED]
412-544-0527
"A gentle answer turns away wrath, but a harsh word stirs up anger."
___
Tu
92 matches
Mail list logo