On Sat, Jan 3, 2009 at 9:43 PM, Benjamin Serrato
wrote:
> I changed it to this:
>
> #!/usr/local/bin/python3.0
> #problem1.py
>
> """Lists the sum of all multiples of 3 and 5 less than 1000."""
>
> def sumTotal(multipleInitial, multiple):# This awkward solution because
>total = 0
I changed it to this:
#!/usr/local/bin/python3.0
#problem1.py
"""Lists the sum of all multiples of 3 and 5 less than 1000."""
def sumTotal(multipleInitial, multiple):# This awkward solution because
total = 0 #
mulitipleInitial = multiple just poin
Benjamin Serrato wrote:
Hello,
I'm trying to correctly solve the first projecteuler.net problem. The
question is as so: Find the sum of all the multiples of 3 or 5 below
1000.
Also consider that the sum of consecutive integers between 1 and n is
n*(n+1)/2.
Calculate that for 1..333 then mu
On Sat, Jan 3, 2009 at 7:43 PM, Andre Engels wrote:
> On Sun, Jan 4, 2009 at 1:06 AM, Benjamin Serrato
> wrote:
>> Hello,
>>
>> I'm trying to correctly solve the first projecteuler.net problem. The
>> question is as so: Find the sum of all the multiples of 3 or 5 below 1000.
> Then the main body
On Sun, Jan 4, 2009 at 1:06 AM, Benjamin Serrato
wrote:
> Hello,
>
> I'm trying to correctly solve the first projecteuler.net problem. The
> question is as so: Find the sum of all the multiples of 3 or 5 below 1000.
>
> I wrote the following program, but the number found is incorrect. I created
>
Hello,
I'm trying to correctly solve the first projecteuler.net problem. The
question is as so: Find the sum of all the multiples of 3 or 5 below 1000.
I wrote the following program, but the number found is incorrect. I created
a function that adds multiples of a given number to a global variable
On Sat, Jan 3, 2009 at 4:35 PM, Mark Tolonen wrote:
> fnmatch already takes into account systems with case-sensitive filenames:
>
help(fnmatch.fnmatch)
>
> Help on function fnmatch in module fnmatch:
>
> fnmatch(name, pat)
> Test whether FILENAME matches PATTERN.
>
> Patterns are Unix she
"Damon Timm" wrote in message
news:262679b50901031327n23b2f754l62fe0cf98751c...@mail.gmail.com...
On Fri, Jan 2, 2009 at 7:16 PM, Jervis Whitley wrote:
for fn in files:
base, ext = os.path.splitext(fn)
if ext.lower() in ['.flac', '.mp3', '.mp4']:
takes into account systems with case sen
On Fri, Jan 2, 2009 at 7:16 PM, Jervis Whitley wrote:
> for fn in files:
> base, ext = os.path.splitext(fn)
> if ext.lower() in ['.flac', '.mp3', '.mp4']:
>
> takes into account systems with case sensitive filenames.
Thanks! Will throw that in there. I'm getting it ... bit by little bit.
>
i i wrote:
Hi tutor,
thanks for the help ,u dont understand cause i have given
the psudo code,i have not given the full code only apart of it. I
only want an emptty array and put the value [i] in it. This [i] value
is the one that i want to show.Im making this activity in glade ,
Saad Javed wrote:
The bold was intentional. I was trying to get a shell command (wvdial)
to run when a button is pressed. The error I get is:
Traceback (most recent call last):
File "testgui.py", line 26, in
testgui = TestGui()
File "testgui.py", line 19, in __init__
self.connect(d
Hi tutor,
thanks for the help ,u dont understand cause i have given the
psudo code,i have not given the full code only apart of it. I only want an
emptty array and put the value [i] in it. This [i] value is the one that i
want to show.Im making this activity in glade ,the set function
I implemented a dial function and passed it to the QtCore.SLOT(), which
worked fine. Thanks everyone!
On Sat, Jan 3, 2009 at 10:33 PM, Kent Johnson wrote:
> On Sat, Jan 3, 2009 at 11:39 AM, Saad Javed wrote:
> > The bold was intentional. I was trying to get a shell command (wvdial) to
> > run w
On Sat, Jan 3, 2009 at 12:28 PM, Alan Gauld wrote:
> I think the SIGNAL('clicked()') bit is probably supposed to be:
>
> SIGNAL('clicked')
I think the parens are correct, see
http://docs.huihoo.com/pyqt/pyqt4.html#id10
Kent
___
Tutor maillist - Tuto
On Sat, Jan 3, 2009 at 11:39 AM, Saad Javed wrote:
> The bold was intentional. I was trying to get a shell command (wvdial) to
> run when a button is pressed. The error I get is:
>
> Traceback (most recent call last):
> File "testgui.py", line 26, in
> testgui = TestGui()
> File "testgui.
"Saad Javed" wrote
self.connect(dial, QtCore.SIGNAL('clicked()'), QtGui.qApp,
QtCore.SLOT(os.system('wvdial')))
TypeError: argument 1 of SLOT() has an invalid type
Was that helpful?
Yes, it confirms my earlier email that you should probably quote
the argument to SLOT()
Alan G.
__
"Saad Javed" wrote
I'm trying to create a simple GUI using pyqt4 in which pressing a
button
causes execution of a system command. Here's the code, please help
me out. I
can't figure out whats wrong. Thanks
Caveat: I have never used Qt in my life so this is based on guesswork
and experience
On Sat, Jan 3, 2009 at 9:34 AM, Sander Sweers wrote:
> On Sat, Jan 3, 2009 at 05:15, Kent Johnson wrote:
>> On Fri, Jan 2, 2009 at 6:12 PM, Sander Sweers
>> wrote:
>>> not understand how operator.itemgetter(1) works.
>>
>> See
>> http://personalpages.tds.net/~kent37/kk/7.html#e7the-operato
The bold was intentional. I was trying to get a shell command (wvdial) to
run when a button is pressed. The error I get is:
Traceback (most recent call last):
File "testgui.py", line 26, in
testgui = TestGui()
File "testgui.py", line 19, in __init__
self.connect(dial, QtCore.SIGNAL('c
Saad Javed wrote:
Hi Tutors,
Hi and welcome to the tutor list. We can help you better if you tell us
what the problem is. What did you expect? What did you get?
Most of us don't have the time or energy to read code when we don't
know what we are looking for.
Some of your code is bold. Why?
Hi Tutors,
I'm trying to create a simple GUI using pyqt4 in which pressing a button
causes execution of a system command. Here's the code, please help me out. I
can't figure out whats wrong. Thanks
import sys
import os
from PyQt4 import QtGui, QtCore
class TestGui(QtGui.QWidget):
def __init_
i i wrote:
yes i want to clear the images before the next iteration,here is the
pseudo code what i want to do
a = [ ]
for i in range(self.numOne)
a.append([i])
to create an empty array, and append the index i to the array and
pass this index to gtk image,how i can do this in *for-in* stateme
On Sat, Jan 3, 2009 at 05:15, Kent Johnson wrote:
> On Fri, Jan 2, 2009 at 6:12 PM, Sander Sweers wrote:
>> not understand how operator.itemgetter(1) works.
>
> See
> http://personalpages.tds.net/~kent37/kk/7.html#e7the-operator-module
Ok, if I understand this correctly counts.iteritems() c
On Sat, Jan 3, 2009 at 3:16 AM, i i wrote:
> yes i want to clear the images before the next iteration,here is the pseudo
> code what i want to do
>
> a = [ ]
> for i in range(self.numOne)
> a.append([i])
> to create an empty array, and append the index i to the array and pass this
> index to gtk
yes i want to clear the images before the next iteration,here is the pseudo
code what i want to do
a = [ ]
for i in range(self.numOne)
a.append([i])
to create an empty array, and append the index i to the array and pass this
index to gtk image,how i can do this in *for-in* statement
0 for i in
25 matches
Mail list logo