Gah!
Seems I sent that reply before stepping through my code a bit...
The last section of that code should be:
else:# kl and ll contain the same number here
both.append(kl[indexK])
if indexK < indexL: # this block is needed so we
indexL = indexL + 1 # don't enter an endles
Hi Mike,
I'm not sure I'm understanding exactly what it is you're looking for
here, but from what I can tell you're looking for something such as:
num(220, 330) #for example
input a range of 10 # again, for example
which would result in an output of 0, 660, 1320 and 1980 (because
these four numb
wesley chun wrote:
> On 8/24/06, mike viceano <[EMAIL PROTECTED]> wrote:
>
>> hello i need a little help with a common multiple module i am haveing
>> problems with the best i can get it is to show the least common multiple i
>> think the problem is eather the and command ot the if command
>>
> On 8/24/06, John Fouhy <[EMAIL PROTECTED]> wrote:
>> On 25/08/06, Joe Gamman <[EMAIL PROTECTED]> wrote:
>> > Anyway, would appreciate any comments on the idea.
>>
>> It seems like the sort of thing you find in textbooks or "learn to
>> program" books -- most books of this nature have suitable exe
On 8/18/06, anil maran <[EMAIL PROTECTED]> wrote:
> what editors do you guys use?
your question crosses boundaries between text editors and IDEs. you
list editors specifically. i believe that *emacs and *vim can do what
you ask, but IDEs can do even more.
popular IDEs include: IDLE, PythonWin, K
I sure did. It was choking because it was the wrong format.
- Original Message -
From: "Bob Gailer" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>
Cc: "Tutor mailing list"
Sent: Thursday, August 24, 2006 12:56 PM
Subject: Re: [Tutor] What's the invalid syntax?
> My apology t
On 8/24/06, mike viceano <[EMAIL PROTECTED]> wrote:
> hello i need a little help with a common multiple module i am haveing
> problems with the best i can get it is to show the least common multiple i
> think the problem is eather the and command ot the if command
some suggestions and reading:
1.
hello i need a little help with a common multiple module i am haveing
problems with the best i can get it is to show the least common multiple i
think the problem is eather the and command ot the if command
# finds common multiples
def nums(a,b): # assigns numbers to a and b
print "enter
On 8/24/06, John Fouhy <[EMAIL PROTECTED]> wrote:
> On 25/08/06, Joe Gamman <[EMAIL PROTECTED]> wrote:
> > Anyway, would appreciate any comments on the idea.
>
> It seems like the sort of thing you find in textbooks or "learn to
> program" books -- most books of this nature have suitable exercises
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Zsiros Levente
> Sent: Thursday, August 24, 2006 2:21 PM
> To: Danny Yoo
> Cc: python tutor
> Subject: Re: [Tutor] tkinter events:
>
> If we're talking about data hiding, let me ask: why Python doe
Alan Gauld wrote:
>
>> Why does the python shell says this:
>>
> print exec.__doc__
>> File "", line 1
>>print exec.__doc__
>> ^
>> SyntaxError: invalid syntax
>
>
> exec, like print, is a statement, or command, not a function.
>
> You get the same response if you try
>
>
On 25/08/06, Vincent Gulinao <[EMAIL PROTECTED]> wrote:
> Anyone knows a neat way of displaying output in columnar/tabular form?
>
> Say you have a list with both dictionary and string members; you want to
> print the data, dictionary being one element per line, and the string on the
> next "column
If we're talking about data hiding, let me ask: why Python doesn't
implement data hiding (I mean 'private' and 'protected')? I consider it
a very important OOP feature, because that makes OOP different from
structural programming.
Danny Yoo wrote:
>> def handler(event):
>> if buttonpressed
On 25/08/06, Joe Gamman <[EMAIL PROTECTED]> wrote:
> Anyway, would appreciate any comments on the idea.
It seems like the sort of thing you find in textbooks or "learn to
program" books -- most books of this nature have suitable exercises at
the end of each chapter, or spread throughout each chapt
My apology to you, Nathan. When I requested a traceback I did not
realize you were using an IDE.
But do realize that an IDE reporting a syntax error should point to (in
some way) to the offending line of code. It's always a good idea to
examine (as already suggested) that line to attempt to spo
> > I had to download some files.
> >
> > Using the code below I could download almost all I had to download, but I
> > have a problem
> >:
> > r = urllib.urlopen(url)
> >:
> > And the problem is that the script sleeps for some hours. And thats
> > all - no data is read.
>
>
> is there a
On Wed, 23 Aug 2006, Terry Carroll wrote:
> I believe that the path for a new process is taken from the registry, in
> particular from
> HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
> Manager\Environment\Path
More at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/416087
On 8/24/06, kulibin da-da! <[EMAIL PROTECTED]> wrote:
> I had to download some files.
>
> Using the code below I could download almost all I had to download, but I
> have a problem
>:
> r = urllib.urlopen(url)
>:
> And the problem is that the script sleeps for some hours. And thats
> all
On 8/24/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Vincent Gulinao wrote:
> >
> > Anyone knows a neat way of displaying output in columnar/tabular form?
>
> You might like this recipe:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/267662
>
> Another option is to write an HTML file co
hello there,
i am having a bit o trouble being able to read a base64 encoded email attachement.
here is the script.
import email
import poplib
import base64
import os
email_folder = 'emails/'
mime = "application/octet-stream"
def WriteAttachment(msg):
for part in msg.walk():
print p
hi,long time lurker, first time poster. i apologise in advance if this has come up before and i haven't seen it.i'm interested in learning python purely as an intellectual excercise - writing small scripts in a 'crossword puzzle per day' kind of thing (i have a long train commute ;-).
if i get to
Thanks for your help, Kent - everything is working now :)
> > I had to download some files.
> >
> > Using the code below I could download almost all I had to download, but I
> > have a problem with 'http://18wheels.wz.cz/csszengarden/back-con.jpg'
> >
> > And the problem is that the script sleep
Vincent Gulinao wrote:
>
> Anyone knows a neat way of displaying output in columnar/tabular form?
>
> Say you have a list with both dictionary and string members; you want
> to print the data, dictionary being one element per line, and the
> string on the next "column" aligned on the first elemen
kulibin da-da! wrote:
> I had to download some files.
>
> Using the code below I could download almost all I had to download, but I
> have a problem with 'http://18wheels.wz.cz/csszengarden/back-con.jpg'
>
> And the problem is that the script sleeps for some hours. And thats
> all - no data is re
Anyone knows a neat way of displaying
output in columnar/tabular form?
Say you have a list with both
dictionary and string members; you want to print the data, dictionary
being one element per line, and the string on the next "column"
aligned on the first element of the dictionary
I had to download some files.
Using the code below I could download almost all I had to download, but I
have a problem with 'http://18wheels.wz.cz/csszengarden/back-con.jpg'
This is my code for downloading
'http://18wheels.wz.cz/csszengarden/back-con.jpg'
# -*- coding: windows-1251 -*-
import
Hi John,The OP wants to do it from a Python program.Thats why I suggested using the registry.Alan GJohn Fouhy <[EMAIL PROTECTED]> wrote: On 24/08/06, Alan Gauld <[EMAIL PROTECTED]> wrote:> PATH is an environment variable and therefore changing it only> affects the current process environment. You n
27 matches
Mail list logo