Dick Moores wrote:
At 08:58 PM 8/13/2008, bob gailer wrote:
One thing I really like about Python Win is the integrated debugger,
which takes no time to start up. SPE OTOH uses WinPDB which runs as a
separate process that takes (in the demo video) 15 seconds to start
(each time it is requested
would find your questions and comments easier to read if you
divided sentences with capitalization and punctuation.
Be sure to reply-all.
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Word
line = infile.readline().split()
# rest of your code follows starting with
# chi2 = ...
# If you want to get even "sexier" you could create an array of counters
# counters = [[0,0],[0,0]]
# where the elements left to right represent o22, o12, o21 and o11
# taking advantage of the fac
PLEASE REPLY TO THE GROUP NOT JUST ME. Did you miss my request for that
(reply-all)?
Umesh Singhal wrote:
Hi Bob,
unfortunately when i pasted in the code it seems to have gone wrong
this is how it is at the moment with the correct indentation for the
nested loop:
code:
a=raw_input
ot;
in the example shown the number of asterisks
is 50 * gauss(x).
Should I start with a program like this?
s=''
for n in range (0,100):
s=s+ '*'
print s
Thanks for any help received. :confused:
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take
Forwarding to the list. Please always reply to the list.
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication provides tools for this awareness.
As a coach and
come from?
If you assume xmin = -2.5 then it will work.
How in Python can you express this series (for loop?)
What class is this question from? Have you met the prerequisites for the
class? If so why is the instructor expecting you to do something he has
not prepared you for?
--
Bob Gailer
t is too complex for
your current understanding of Python!
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication provides tools for this awareness.
As a coach and trai
inner():
print "winner"
break
else:
print "no winner"
# Mark row 1 all X
for cell in rows[1].cells:
cell.player = 'X'
for line in lines:
if line.winner():
print "winner"
bresk
else:
print "no winner"
--
Bob Gailer
Chapel Hill NC
919
duce(lambda x, y: x+y, [1, 2, 3, 4, 5])
calculates 1+2)+3)+4)+5) (the sum)
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication provides tools for this aware
"]
> > arg2 = [1,2,3,4]
> > arg3 = dict(zip(arg1,arg2))
> > myfunc(arg3)
>
myfunc(**arg3)
Let's back up to arg_str = "a=1, b=2, c=3, d=4"
To create a dictionary from that:
argDict = dict(pair.split('=') fo
eShopping wrote:
Bob, Kent
thanks for the suggestions. Bob made the comment "If there is no
compelling requirement that myfunc's argument be in the form **kwargs
...", but I'm afraid I don't understand the difference between
myfunc (**kwargs)
and
myfunc (kw
ng without replacement.
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication provides tools for this awareness.
As a coach and trainer I can assist you in learning this proc
her. I almost always favor formatting as
it is so much easier to read, maintain and extend.
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication provides tools for this a
) #
copy rest of file - assuming file is not BIG
output_file.close()
input_file.close()
print "modified txt file with event info"
# now copy tmp back to ...
return
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have
On Fri, Sep 12, 2008 at 1:51 PM, Jeremiah Stack <[EMAIL PROTECTED]> wrote:
> I was wondering If you could help me out.
>
> I am trying to set a variable for the number of variables. ?
>
> Any help would be awesome
>
More details would be wonderful. I have no idea of w
ython.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication provides tools for this awareness.
As a coach and t
gt;> print a/b
Traceback (most recent call last):
File "", line 1, in
TypeError: unsupported operand type(s) for /: 'str' and 'int'
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying i
tr__(self):
... return "%s-%sj" % (self.real, self.imag)
... def __init__(self, r, i):
... complex.__init__(self, r, i)
...
>>> c=C(1,2)
>>> c
(1+2j)
>>> print c
'1.0-2.0j';
This might seem clunky but this is the way to alter behavior of
b
ould simply take the list comprehension
[real(lx) for lx in ll]
Is this worthy of a PEP?
FWIW I'd like to see all numbers have real and imag attributes.
Regarding "worthiness" - the language grows as suggestions are offered.
I'd say write and submit one.
It seems simpl
e are many ways to get and filter directory contents.
I guess you would benefit from the glob module.
import glob
fileList = glob.glob('*.txt')
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatcti
jeremiah wrote:
Just wondering if anyone here would be interested in sharing a python
twill script? I'd just like to take a gander at how others are
engineering their scripts.
twill?
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feeling
Lots of good responses. And now for something completely different:
import string
x = string.maketrans('567891', 'FDCBAA')
score = raw_input('score>')
print "Your grade is:", score[0].translate(x)
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we ta
Jaggo wrote:
So, am I to understand from this lack of response there be *no
particular reason* to use Temp file?
AFAIC there is no particular reason to use Temp file. It is a
convenience for those of us who need temp files and don't want to bother
creating unique names.
--
Bob G
sted code.
doc = word.Documents.open("c:\\test.doc") # provide path to your
document instead,
range = doc.Content()
range.Find.Text = "text to replace"
range.Find.Replacement.Text = "replacement text"
range.Find.Execute()
doc.Save()
Give that a try. Let me know what happens.
bob gailer wrote:
Brian C. Lane wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
URBAN LANDREMAN wrote:
Good morning,
I'm trying to write some Python code to programmatically do a Find and
Replace of a string within a Microsoft Word document.
Any suggestio
______
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviol
Alan Gauld wrote:
"bob gailer" <[EMAIL PROTECTED]> wrote
docOrig =
app.Documents.Open('n:\\MetroPlanners\\2006\\MCHResearchProject.doc')
range = docOrig.Content()
Try range = docOrig.Range()
But don't use range as a variable name or you will hide th
anguage to first get the
students comfortable with the language before attempting to learn a web
framework or database processing or accounting or anything else than the
basic lanaguage.
What do you think?
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our fe
ecessors = predecessors[1:] + letter
successors = successors[1:] + ("_" if len(successors) <= 5 else "")
Simple - procedural - no functions. 16 lines of code. Easy to read and
maintain.
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of
w:position+window+1] + letter
elif letter == "~":
print rest[position-window:position+window+1] + "~" + word.next()
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interactions with others.
Nonviole
word = iter(word)
for letter in word:
if letter not in shortAndOmit:
position += 1
print rest[position-window:position+window+1] + "_"
elif letter in shortAndOmit[:4]:
print rest[position-window:position+window+1] + letter
elif letter == "~":
print rest[
6 15.
* if the number of dimensions is 0 (a "scalar" value) the result is the
scalar value unchanged.
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communicatio
;No clear command available'
I'd prefer, for compactness and readability:
if not os.system('cls'):
if not os.system('clear'):
print 'No clear command available'
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feeling
3 raw_input will be renamed input and the old input will go away.
Thanks!
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Ch
se are the skills you need for this problem.
Give it a stab and report back and let's see what happens.
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication pro
print True
What happens? Why? Then try
if 1:
print True
You are trying to compare date to numbers yet date does not appear in
the if statement!
I have mentioned lists twice yet you have not said anything about them.
Do you know what a list is and how it can be used?
--
Bob Gailer
Chapel H
rt
the strings to integers and reverse the descending pairs.
a1 = [['xa', 1511255, 1511279],['xb', 7516599, 7516623],['xc', 98356266, 98356290]]
b1 = [['G1', 1511200, 1511325],['G2', 7516500, 7516625],['G3', 98356126, 98356335]]
Then compare
r 8 or 10 or 12:
return 31
elif 4 or 6 or 9 or 11:
return 30
elif 2:
return leap
def main():
currentdate= input ("What is the date (mm/dd/)?:")
month, date, year= string.split(currentdate)
print month/date/year
main()
___
I hope we did not scare you away. Do you still want help?
If you get a solution elsewhere would you share it with us so we can see
and celebrate your progress?
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying
nction and generator expressions:
pi = sum(4.0/i for i in range(1, n*2, 4)) - sum(4.0/i for i in range(3,
n*2, 4))
Applying sum and generator expressions to my original solution you get:
pi = sum(4.0/i - 4.0/(i + 2) for i in range(1, 4*n, 4))
Ah I can go on can't I? A lot more than you asked fo
t;,"Tirana"
"Vlorë","Delvinë","Sarandë","Vlorë"
where thee first column contains the regions and the subsequent the
districts.
what is the best way to return a file like:
"Berat","Kuçovë"
"Berat","Skrapar"
quot;, "Skrapar"]
region = line [0]
for district in line[1:]:
outputFile .write(region + "," + district + "\n")
inputFile .close()
outputFile .close()
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have mor
Format.names = config.formats.names
[...more pseudo type-specific config functions...]
def config()
config.build_config(config_file_name)
format_config()
[...more calls to type config functions...]
But I'm not happy with that at all... Type specific features should
definitely lie insi
s?
I don't know of any. Of course it could depend on what you are doing
with each element. Say more!
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication pro
?
In the def convert_string... function why do you include the "except
ValueError: / return 0" clause?
try: must be followed by except or finally.
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatcti
n Beginner
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication provides tool
ython http://numpy.scipy.org/, which works
much like APL:
>>> /print a/
[1 2 3]
>>> /print a + 3/
[4 5 6]
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communica
ring.
so, what am i supposed to be doing to get real values out of this
stream of bytes?
Depends again on what you are expecting. What do you mean by "real"?
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more sat
ng with r.
"C:Users\\Chris\\ etc.
OR r"C:Users\Chris\
That *might* solve your problem. it is unfortunate that the error
messages say can't open rather than file not found.
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
nee
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication provides tools for this awareness.
As a coach and trainer I can assist you in learning this process.
What is YOUR
File "", line 1, in
File "H:\Python25\lib\_strptime.py", line 313, in strptime
data_string[found.end():])
ValueError: unconverted data remains: 5
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying in
bob gailer wrote:
Eric Dorsey wrote:
Greetings,
I have a program where I ask a user to enter a date in format
-MM-DD, and get a string like: '2008-10-25'
Can anyone tell me how I would verify this is a real date before
allowing it to be passed on to the next part of the progr
] = (v, 1)
for l in range(10):
for r in (11, 13):
k = l*16+r
v = l*10
d[chr(k)] = (v, -1)
m = 10
value, sign = d[bcdstring[-1]]
for byte in bcdstring[-2::-1]:
value += m*d[byte]
m *= 100
value = value * sign
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take th
e best
approach, or is there a better way?
Steve Bricker
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill N
ngful name as Word attempts to?
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication provides tools for this awareness.
As a coach and trainer I can assist you in lea
essed
in a finite # of digits.
You can say that math.pi is within 1/18014398509481984 of the value of pi.
I don't think it matters where the decimal point lies.
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satis
way to view that attachment. Please just send us a plain text
file or put the code in the body of the email.
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we become aware of our feelings and needs,
and express them with care,
we can more satisfying interactions with others.
Nonviolent Com
Dinesh B Vadhia wrote:
I'm trying to get my head around the Decimal module to understand how
to represent a decimal floating point number as an integer (or integers).
Huh? That makes no sense to me!
Examples please.
--
Bob Gailer
Chapel Hill NC
919-636
x27; ', 't', 'e', 'x', 't', '']
Where does the last string, the empty one, come from?
I find this behaviour rather annoying: I'm getting one group too many.
The ? means 0 or 1 occurrence. I think re is matching the null string at
the en
K
Frankly, I don't understand what is going on in the above.
Exactly what don't you understand. Or ... what DO you understand. There
is a lot to explain here. Narrowing it down will make it easier.
--
Bob Gailer
Chapel Hill NC
919-636-4239
_
Please always reply all so a copy goes to the tutor list. We all
participate and learn.
Jason DeBord wrote:
Bob,
Thanks for the reply.
When I said I don't understand the above, that was just to give you
guys a reference for where I am at.
At my current job I rarely touch the web serv
script, etc.? I'm a little bit lost, not knowing what's
available out there.
See http://code.google.com/p/pythoninthebrowser/.
I'm looking for simplicity and ease of use for a python programmer.
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
ouch of genius - and a lot of courage - to move
in the opposite direction. " -Albert Einstein
_______
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill NC
919-636-4239
__
: Baseboard instance has no attribute '__setitem__'
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Python.
You could "roll your own" encoding" but I think json would be easier.
Remember to reply-all so a copy goes to the list.
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/m
together (C extension, SWIG,
...???) then you could write the Python object directly from the C program.
What will the Python program do with the lists? And what does huge mean.
Does it have to be a list? Is performance an issue or storage space or what?
--
Bob Gailer
Chapel Hill NC
919-636
the
log file).
As you might guess I was typing my response before reading the above. So
you answered my question.
NOW: why not read and parse the log file in Python?
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
, each request to refresh the graph
(changing time duration for display) will have to re-parse the file
all over again. And hence speed in parsing the log is important.
There should never be a need to reparse the same file. Please present
the case more specifically.
--
Bob Gailer
Chapel Hill NC
Ravi Kondamuru wrote:
Denis, These are 32bit, 64bit counters (essentially numbers).
Bob, There are well over 10K counters in the log file that are updated
every 5 secs. If a counter1's graph was requested, log will have to be
parsed once to get the data points. If a user asked for a cou
Ravi Kondamuru wrote:
Denis, These are 32bit, 64bit counters (essentially numbers).
Bob, There are well over 10K counters in the log file that are updated
every 5 secs. If a counter1's graph was requested, log will have to be
parsed once to get the data points. If a user asked for a cou
thon 3
Example program:
name = input("Enter your name:")
print ("Hello", name)
input("Press any key to exit.")
The purpose of the last line - when you run the program by
double-clicking or equivalent this keeps the window open so you can se
in Python 3:
v = [1,2,3,4]
m = []
reduce(lambda x,y,m=m: (m.append(x+y), y)[1], v)
print m # [3, 5, 7]
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ight PATH under System Variables & Click Edit.
Add ;C:\python26
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Please always reply-all so a copy goes to the list.
Mr Gerard Kelly wrote:
is there a quick way to convert a one element array into a scalar value
so that I can use x[0] for all operations?
x = x[0]
- Original Message -
From: bob gailer
Date: Tuesday, December 16, 2008
ber()
def sayit():
print "Your total correct answers is", counter()
again()
def again():
onemore = raw_input("Again? y/n >> " )
if onemore.lower() == "y":
getnumber()
elif onemore.lower() == "n":
getinfo()
e
he truth"
Emad Soliman Nawfal
Indiana University, Bloomington
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ogram from that.
The Pipelines language is very simple, so I am not dealing with control
structures, just sequences of words and symbols.
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
johnf wrote:
On Monday 22 December 2008 09:15:13 am bob gailer wrote:
johnf wrote:
I've been in the programming business for over 20 years and I have never
had a need for a parser. But recently I have need to convert code from
one language to a my new language python.
temporarily by commands like text
; is a special final character
assignment statement?
initial word a keyword or function?
if none of the above error?
and on and on.
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@pyt
ndent when encountering the start or end of
a structure.
a bigger challenge is handling the work-area related commands such as
Scan, Replace, Skip, Set Relation,
Actually Bob I'm using Dabo which has the above covered. You should take a
close look at Dabo. I am able to do most
how long the cycle is.
Kent
Check out http://en.wikipedia.org/wiki/Repeating_decimal.
Section 5 How a repeating or terminating decimal expansion is found
illustrates the above.
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist -
place('/companies', '')
or item_path[len('/companies'):]
or item_path.split('/')[2:]
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
"
Emad Soliman Nawfal
Indiana University, Bloomington
http://emnawfal.googlepages.com
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill NC
919-636-4239
AIM - samushack | Gtalk - samushack | Skype - shuckins
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor mailli
; dnum:
print "You are %i" % ynum, "years old."
break
else:
ret = int(ynum) - 1
print "You are %i" % ret, "years old."
break
except ValueError:
print "Oops, You mus
Dj Gilcrease wrote:
def myfiles(directory,extension=None):
for x in [os.path.join(x,i) for x,y,z in os.walk(directory)\
if extension: << SYNTAX ERROR!
for i in z if i.endswith(extension)]:print x
--
Bob Gailer
Chapel Hill NC
919-63
n26','doc')
C:\python26\Doc\examples.doc
How can I rectify this?
Thanks
Prasad
_______
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chape
the relevant data is in one
place. Then you need no if statement.
I also assume that only one dictionary will be selected. Then you don't
need the for loop.
x = [d for d in currencies if d['is_selected'] == True][0]
This could be a great application for the recently discussed
na
only an homogeneous (numeric only, all
elements the same type) collection.
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
he conversations on this list is a little like
taking a python class (only the classes don't progress in any
particular order!).
_______
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
bob gailer wrote:
Damon Timm wrote:
Hi - am learning Pythong and loving it! Anyhow, what I have works,
but I wondered if there was a "better" (more python-y) way.
Here is what I am doing with fnmatch ... am thinking there has to be a
one-line way to do this with a lamb
understand your question. In addition to pseudocode would
you give a description of what the user sees and does and how the end
result looks to the user.
From your code I think I would see a pink flower flashed numOne times.
Also please clean up the code. The indentations are messy.
--
Bob Gailer
27;))
app = QtGui.QApplication(sys.argv)
testgui = TestGui()
testgui.show()
sys.exit(app.exec_())
_______
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
--
Bob Gailer
Chapel Hill NC
919-636-4239
ot;os.system('wvdial')" (character string).
So try self.connect(dial, QtCore.SIGNAL('clicked()'), QtGui.qApp,
QtCore.SLOT("os.system('wvdial')")).
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
ariable for the inner for. Pick some other name.
a = [i]
self.image = gtk.Image()
self.image.set_from_file("./Pink-Flower-32x32.png")
self.fixed.put(self.image, i*25, 0)
self.image.show()
--
Bob Gailer
Cha
then multiply by 3
Calculate that for 1..199 then multiply by 5
add those
Calculate that for 1..66 then multiply by 15
subtract that from the total
I think that will give you the answer with minimal computation time.
--
Bob Gailer
Chapel Hill NC
919-636
Alan Gauld wrote:
"bob gailer" wrote
Also consider that the sum of consecutive integers between 1 and n is
n*(n+1)/2.
Calculate that for 1..333 then multiply by 3
Calculate that for 1..199 then multiply by 5
add those
Calculate that for 1..66 then multiply by 15
subtract that from
receding RE. ab? will match either 'a' or 'ab'.
--
Bob Gailer
Chapel Hill NC
919-636-4239
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
901 - 1000 of 2074 matches
Mail list logo