Fast help with Python program

2021-07-29 Thread Arak Rachael
Hi guys, I need fast help with this, can you please look at it? I don't get how to visualize on the 3 axis in the for cycle with the list of colors and count of colors that I get from my array. And I also don't get how to cluster the colors based on how many colors there are in the second

Re: HELP Please, Python Program Help

2021-04-10 Thread dn via Python-list
On 10/04/2021 22.57, Joseph Roffey wrote: > Hi, Im looking for some help with my program, I have been set a task to make > a Strain Calculator. I need it to input two numbers, choosing either Metres > or Inches for the 'Change in Length' divided by the 'Original Length' which &

HELP Please, Python Program Help

2021-04-10 Thread Joseph Roffey
Hi, Im looking for some help with my program, I have been set a task to make a Strain Calculator. I need it to input two numbers, choosing either Metres or Inches for the 'Change in Length' divided by the 'Original Length' which can also be in Metres or Inches, the out put number also needs

Re: Hi! i need some help with a program in python on Raspberry pi3.

2017-04-17 Thread breamoreboy
On Friday, April 14, 2017 at 3:27:29 PM UTC+1, Kasper wrote: > every time i run the program i get this messeage: > > Traceback (most recent call last): > File "smartmirror.py", line 159, in get_weather > temprature2 = "%S%S" % (str(int(weather_obj['currently']['temperature'])), >

Re: Hi! i need some help with a program in python on Raspberry pi3.

2017-04-14 Thread Terry Reedy
On 4/14/2017 10:27 AM, Kasper wrote: every time i run the program i get this messeage: Traceback (most recent call last): File "smartmirror.py", line 159, in get_weather temprature2 = "%S%S" % (str(int(weather_obj['currently']['temperature'])), degree_sign) KeyError: 'currently' Error:

Re: Hi! i need some help with a program in python on Raspberry pi3.

2017-04-14 Thread Peter Otten
Kasper wrote: > every time i run the program i get this messeage: > > Traceback (most recent call last): > File "smartmirror.py", line 159, in get_weather > temprature2 = "%S%S" % (str(int(weather_obj['currently'] ['temperature'])), > degree_sign) > KeyError: 'currently' > Error:

Re: Hi! i need some help with a program in python on Raspberry pi3.

2017-04-14 Thread Steve D'Aprano
On Sat, 15 Apr 2017 12:27 am, Kasper wrote: > every time i run the program i get this messeage: > > Traceback (most recent call last): > File "smartmirror.py", line 159, in get_weather > temprature2 = "%S%S" % > (str(int(weather_obj['currently']['temperature'])), > degree_sign) >

Hi! i need some help with a program in python on Raspberry pi3.

2017-04-14 Thread Kasper
every time i run the program i get this messeage: Traceback (most recent call last): File "smartmirror.py", line 159, in get_weather temprature2 = "%S%S" % (str(int(weather_obj['currently']['temperature'])), degree_sign) KeyError: 'currently' Error: 'currently'. Cannot get weather. How do

Re: Need help in python program

2016-10-29 Thread Veek M
id_1, clk, val = foo_function() id_2, key, units, delay = bar_function() if id_1 == id_2: print id_1, clk, val, key, units, delay -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help in python program

2016-07-01 Thread Christian Gollwitzer
Am 01.07.16 um 12:26 schrieb Archana Sonavane: Hello Everyone, I am doing python code by using API. My first API giving fields - Itemid, clock and value second API giving fields - Itemid, key, units and delay using for loops for both API. Could you please tell me how to compare both id by

Re: Need help in python program

2016-07-01 Thread Bob Gailer
On Jul 1, 2016 6:30 AM, "Archana Sonavane" wrote: > > Hello Everyone, > > I am doing python code by using API. > > My first API giving fields - Itemid, clock and value > second API giving fields - Itemid, key, units and delay > > using for loops for both API. > > Could

Need help in python program

2016-07-01 Thread Archana Sonavane
Hello Everyone, I am doing python code by using API. My first API giving fields - Itemid, clock and value second API giving fields - Itemid, key, units and delay using for loops for both API. Could you please tell me how to compare both id by using equal operator. My output should be :

Re: Help with this program???

2015-11-27 Thread Denis McMahon
On Fri, 27 Nov 2015 01:43:53 -0800, justin bloomer wrote: > Your program should contain a function that: > 1. Seeks input from the user (via the keyboard); > 2. To build a list of student exam results; > 3. For each student their name (first and last), student number, and > mark out of 100 should

Help with this program???

2015-11-27 Thread justin bloomer via Python-list
Your program should contain a function that: 1. Seeks input from the user (via the keyboard); 2. To build a list of student exam results; 3. For each student their name (first and last), student number, and mark out of 100 should be captured; 4. For full marks regular expressions or similar

Re: Help with this program???

2015-11-27 Thread Chris Angelico
On Fri, Nov 27, 2015 at 8:43 PM, justin bloomer via Python-list wrote: > Your program should contain a function that: > 1. Seeks input from the user (via the keyboard); > 2. To build a list of student exam results; > 3. For each student their name (first and last), student

Re: Help with this program???

2015-11-27 Thread Ben Finney
justin bloomer via Python-list writes: > Your program should contain a function that: This is a homework assignment, yes? We're not going to write the code for you. If you have a program you already wrote, we can offer feedback on *your* code. You should also

Re: Help with this program???

2015-11-27 Thread Laura Creighton
In a message of Fri, 27 Nov 2015 01:43:53 -0800, justin bloomer via Python-list writes: >Your program should contain a function that: >1. Seeks input from the user (via the keyboard); >2. To build a list of student exam results; >3. For each student their name (first and last), student number,

Re: Need help with a program

2010-02-03 Thread Nobody
On Tue, 02 Feb 2010 15:07:05 -0800, Aahz wrote: If you have a problem and you think that regular expressions are the solution then now you have two problems. Regex is really overkill for the OP's problem and it certainly doesn't improve readability. If you're going to use a quote, it works

Re: Need help with a program

2010-02-02 Thread Aahz
In article mailman.1551.1264701475.28905.python-l...@python.org, D'Arcy J.M. Cain da...@druid.net wrote: If you have a problem and you think that regular expressions are the solution then now you have two problems. Regex is really overkill for the OP's problem and it certainly doesn't improve

Re: Need help with a program

2010-01-29 Thread Johann Spies
On Thu, Jan 28, 2010 at 07:07:04AM -0800, evilweasel wrote: Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I have a huge text file similar to the format below: AGACTCGAGTGCGCGGA 0 AGATAAGCTAATTAAGCTACTGG

Re: Need help with a program

2010-01-29 Thread Steven D'Aprano
On Fri, 29 Jan 2010 11:23:54 +0200, Johann Spies wrote: On Thu, Jan 28, 2010 at 07:07:04AM -0800, evilweasel wrote: Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I have a huge text file similar to the format

Re: Need help with a program

2010-01-29 Thread Johann Spies
On Fri, Jan 29, 2010 at 10:04:33AM +, Steven D'Aprano wrote: I know this is a python list but if you really want to get the job done quickly this is one method without writing python code: $ cat /tmp/y AGACTCGAGTGCGCGGA 0 AGATAAGCTAATTAAGCTACTGG 0

Re: Need help with a program

2010-01-29 Thread D'Arcy J.M. Cain
On Fri, 29 Jan 2010 11:23:54 +0200 Johann Spies jsp...@sun.ac.za wrote: I know this is a python list but if you really want to get the job done quickly this is one method without writing python code: [...] $ grep -v 0 /tmp/y tmp/z There's plenty of ways to do it without writing Python. C,

Re: Need help with a program

2010-01-29 Thread nn
Johann Spies wrote: On Thu, Jan 28, 2010 at 07:07:04AM -0800, evilweasel wrote: Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I have a huge text file similar to the format below: AGACTCGAGTGCGCGGA

Need help with a program

2010-01-28 Thread evilweasel
Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I have a huge text file similar to the format below: AGACTCGAGTGCGCGGA 0 AGATAAGCTAATTAAGCTACTGG 0 AGATAAGCTAATTAAGCTACTGGGTT 1

Re: Need help with a program

2010-01-28 Thread Alf P. Steinbach
* evilweasel: Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I have a huge text file similar to the format below: AGACTCGAGTGCGCGGA 0 AGATAAGCTAATTAAGCTACTGG 0 AGATAAGCTAATTAAGCTACTGGGTT 1

Re: Need help with a program

2010-01-28 Thread Mark Dickinson
On Jan 28, 3:07 pm, evilweasel karthikramaswam...@gmail.com wrote: Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. snip for j in range(0, b):     if lister[j] == 0: At a guess, this line should be: if lister[j] == '0':

Re: Need help with a program

2010-01-28 Thread Krister Svanlund
On Thu, Jan 28, 2010 at 4:07 PM, evilweasel karthikramaswam...@gmail.com wrote: Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I have a huge text file similar to the format below: AGACTCGAGTGCGCGGA   0

Re: Need help with a program

2010-01-28 Thread Krister Svanlund
On Thu, Jan 28, 2010 at 4:28 PM, Krister Svanlund krister.svanl...@gmail.com wrote: On Thu, Jan 28, 2010 at 4:07 PM, evilweasel karthikramaswam...@gmail.com wrote: Hi folks, I am a newbie to python, and I would be grateful if someone could point out the mistake in my program. Basically, I

Re: Need help with a program

2010-01-28 Thread D'Arcy J.M. Cain
On Thu, 28 Jan 2010 07:07:04 -0800 (PST) evilweasel karthikramaswam...@gmail.com wrote: I am a newbie to python, and I would be grateful if someone could Welcome. point out the mistake in my program. Basically, I have a huge text file similar to the format below: You don't say how it isn't

Re: Need help with a program

2010-01-28 Thread Krister Svanlund
On Thu, Jan 28, 2010 at 4:31 PM, Krister Svanlund krister.svanl...@gmail.com wrote: On Thu, Jan 28, 2010 at 4:28 PM, Krister Svanlund krister.svanl...@gmail.com wrote: On Thu, Jan 28, 2010 at 4:07 PM, evilweasel karthikramaswam...@gmail.com wrote: Hi folks, I am a newbie to python, and I

Re: Need help with a program

2010-01-28 Thread evilweasel
I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times the sequence has been found in a particular sample). So, I would need to ignore the ones

Re: Need help with a program

2010-01-28 Thread nn
On Jan 28, 10:50 am, evilweasel karthikramaswam...@gmail.com wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times the sequence has been

Re: Need help with a program

2010-01-28 Thread Arnaud Delobelle
nn prueba...@latinmail.com writes: On Jan 28, 10:50 am, evilweasel karthikramaswam...@gmail.com wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the

Re: Need help with a program

2010-01-28 Thread John Posner
On 1/28/2010 10:50 AM, evilweasel wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times the sequence has been found in a particular sample).

Re: Need help with a program

2010-01-28 Thread D'Arcy J.M. Cain
On Thu, 28 Jan 2010 18:49:02 +0100 Jean-Michel Pichavant jeanmic...@sequans.com wrote: Using regexp may increase readability (if you are familiar with it). If you have a problem and you think that regular expressions are the solution then now you have two problems. Regex is really overkill for

Re: Need help with a program

2010-01-28 Thread Jean-Michel Pichavant
evilweasel wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times the sequence has been found in a particular sample). So, I would need to

Re: Need help with a program

2010-01-28 Thread Jean-Michel Pichavant
D'Arcy J.M. Cain wrote: On Thu, 28 Jan 2010 18:49:02 +0100 Jean-Michel Pichavant jeanmic...@sequans.com wrote: Using regexp may increase readability (if you are familiar with it). If you have a problem and you think that regular expressions are the solution then now you have two

Re: Need help with a program

2010-01-28 Thread Steven Howe
On 01/28/2010 09:49 AM, Jean-Michel Pichavant wrote: evilweasel wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times the sequence has been

Re: Need help with a program

2010-01-28 Thread Mensanator
On Jan 28, 12:28 pm, Steven Howe howe.ste...@gmail.com wrote: On 01/28/2010 09:49 AM, Jean-Michel Pichavant wrote: evilweasel wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to

Re: Need help with a program

2010-01-28 Thread MRAB
Steven Howe wrote: On 01/28/2010 09:49 AM, Jean-Michel Pichavant wrote: evilweasel wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the sequence (this is basically the number of times

Re: Need help with a program

2010-01-28 Thread nn
Arnaud Delobelle wrote: nn prueba...@latinmail.com writes: On Jan 28, 10:50 am, evilweasel karthikramaswam...@gmail.com wrote: I will make my question a little more clearer. I have close to 60,000 lines of the data similar to the one I posted. There are various numbers next to the

Re: Need help with a program

2010-01-28 Thread Arnaud Delobelle
nn prueba...@latinmail.com writes: After posting I was thinking I should have posted a more straightforward version like the one you wrote. Now there is! It probably is more efficient too. I just have a tendency to think in terms of pipes: pipe this junk in here, then in here, get output.

Re: Immediate Help with python program!

2009-12-10 Thread Grant Edwards
On 2009-12-10, Rhodri James rho...@wildebst.demon.co.uk wrote: Ahem. This is a newsgroup/mailing list, not IM. I happen to have seen this within half an hour of you posting it, but that's just luck. Expecting an immediate response is unrealistic. Furthermore, this is comp.lang.python,

Re: Immediate Help with python program!

2009-12-09 Thread Daniel
On Dec 9, 6:18 pm, Jon Clements jon...@googlemail.com wrote: On Dec 9, 11:55 pm, Daniel dkeepe...@yahoo.com wrote: i am making a tic-tac-toe game using python. i am pretty new to it, but cant seem to figure this one out. Here is my code: X = X O = O empty = tie = Tie squares

Re: Immediate Help with python program!

2009-12-09 Thread Intchanter / Daniel Fackrell
On Dec 9, 5:18 pm, Jon Clements jon...@googlemail.com wrote: snip original post Someone's homework assignment is overdue/due very soon? And, I don't believe for a second this is your code. In fact, just searching for (the obvious Java based) function names leads me to believe you've

Re: Immediate Help with python program!

2009-12-09 Thread Rhodri James
Ahem. This is a newsgroup/mailing list, not IM. I happen to have seen this within half an hour of you posting it, but that's just luck. Expecting an immediate response is unrealistic. Furthermore, this is comp.lang.python, a group right up there in pedantry terms with cam.misc.

Re: Immediate Help with python program!

2009-12-09 Thread MRAB
Daniel wrote: i am making a tic-tac-toe game using python. i am pretty new to it, but cant seem to figure this one out. Here is my code: [snip] You problem is due to your choice of variable names, because '0' looks too much like 'O'. You also don't define 'ask'. --

Re: Immediate Help with python program!

2009-12-09 Thread Daniel
On Dec 9, 6:50 pm, MRAB pyt...@mrabarnett.plus.com wrote: Daniel wrote: i am making a tic-tac-toe game using python. i am pretty new to it, but cant seem to figure this one out. Here is my code: [snip] You problem is due to your choice of variable names, because '0' looks too much like

Re: Help with my program

2009-10-23 Thread Lie Ryan
tanner barnes wrote: Ok so im in need of some help! I have a program with 2 classes and in one 4 variables are created (their name, height, weight, and grade). What im trying to make happen is to get the variables from the first class and use them in the second class

Re: Help with my program

2009-10-23 Thread Alan Gauld
tanner barnes tanner...@hotmail.com wrote I have a program with 2 classes and in one 4 variables are created (their name, height, weight, and grade). What im trying to make happen is to get the variables from the first class and use them in the second class. In general thats not a good

Help with my program

2009-10-22 Thread tanner barnes
Ok so im in need of some help! I have a program with 2 classes and in one 4 variables are created (their name, height, weight, and grade). What im trying to make happen is to get the variables from the first class and use them in the second class

Re: Help with my program

2009-10-22 Thread Kenny Shen
) info.append(self.grade) return info class B: def __init__(self, a): self.info = a.getinfo() print self.info a = A() b = B(a) Thanks, Kenny On Fri, Oct 23, 2009 at 9:59 AM, tanner barnes tanner...@hotmail.comwrote: Ok so im in need of some help! I have a program

RE: Help with my program

2009-10-22 Thread VYAS ASHISH M-NTB837
] On Behalf Of tanner barnes Sent: Friday, October 23, 2009 7:30 AM To: python-h...@python.org; python-list@python.org; tu...@python.org Subject: Help with my program Ok so im in need of some help! I have a program with 2 classes and in one 4 variables are created (their name, height, weight, and grade

Re: Help with my program

2009-10-22 Thread Chris Rebert
=motorola@python.org] On Behalf Of tanner barnes Sent: Friday, October 23, 2009 7:30 AM To: python-h...@python.org; python-list@python.org; tu...@python.org Subject: Help with my program Ok so im in need of some help! I have a program with 2 classes and in one 4 variables are created

Re: Help with my program

2009-10-22 Thread Kenny Shen
...@python.org Subject: Help with my program Ok so im in need of some help! I have a program with 2 classes and in one 4 variables are created (their name, height, weight, and grade). What im trying to make happen is to get the variables from the first class and use them in the second

Re: please help with python program

2009-05-14 Thread Tim Golden
chedderslam wrote: IOError: [Errno 13] Permission denied: u'D:/My Music/Ani DiFranco/ Canon/Disc 1\\folder.jpg' I have removed the read-only attribute on the folder, and added Everyone with full control for security. Not sure what else to do. I would really like to get this working so any help

please help with python program

2009-05-13 Thread chedderslam
I am trying to use Album Cover Art Downloader, software someone recommended to me. It works fine on my work computer, but not at home. When I try to save the cover art, I get this error: Traceback (most recent call last): File lib/albumart\albumart_dialog.py, line 623, in setCoverForItems

Re: please help with python program

2009-05-13 Thread Steven D'Aprano
On Wed, 13 May 2009 20:39:04 -0700, chedderslam wrote: IOError: [Errno 13] Permission denied: u'D:/My Music/Ani DiFranco/ Canon/Disc 1\\folder.jpg' I have removed the read-only attribute on the folder, and added Everyone with full control for security. Not sure what else to do. I would

Re: Help! Can't get program to run.

2009-05-02 Thread seanm . py
On May 1, 6:10 pm, Ned Deily n...@acm.org wrote: In article 7618rjf1a3t8...@mid.uni-berlin.de,  Diez B. Roggisch de...@nospam.web.de wrote: seanm...@gmail.com schrieb: I think this is maybe the most basic problem possible, but I can't get even the most basic Python to run on OS X

Re: Help! Can't get program to run.

2009-05-02 Thread Arnaud Delobelle
seanm...@gmail.com writes: sean-marimpietris-computer:~ seanmarimpietri$ python Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type help, copyright, credits or license for more information. python module1.py File stdin, line 1

Re: Help! Can't get program to run.

2009-05-02 Thread seanm . py
On May 2, 4:30 pm, Arnaud Delobelle arno...@googlemail.com wrote: seanm...@gmail.com writes: sean-marimpietris-computer:~ seanmarimpietri$ python Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin Type help, copyright, credits or

Re: Help! Can't get program to run.

2009-05-02 Thread Rhodri James
On Sat, 02 May 2009 21:42:03 +0100, seanm...@gmail.com wrote: Awesome. Thank you, Arnaud. I moved the file to that folder, and I got it to work in Terminal. However, I still can't get it to run using IDLE. Any idea why that might be? Thanks again. -Sean To repeat what you were told earlier,

Re: Help! Can't get program to run.

2009-05-02 Thread Ned Deily
In article 8f6634a2-c977-430a-b9f2-90ef9356d...@x6g2000vbg.googlegroups.com, seanm...@gmail.com wrote: Thank you for both for the help. I still cannot get the program to run though. Below I've copied my commands and the error messages for you (in IDLE then Terminal): IDLE 2.6.2 python

Re: Help! Can't get program to run.

2009-05-02 Thread seanm . py
On May 2, 5:30 pm, Ned Deily n...@acm.org wrote: In article 8f6634a2-c977-430a-b9f2-90ef9356d...@x6g2000vbg.googlegroups.com,  seanm...@gmail.com wrote: Thank you for both for the help. I still cannot get the program to run though. Below I've copied my commands and the error messages for

Re: Help! Can't get program to run.

2009-05-01 Thread Ned Deily
In article 7618rjf1a3t8...@mid.uni-berlin.de, Diez B. Roggisch de...@nospam.web.de wrote: seanm...@gmail.com schrieb: I think this is maybe the most basic problem possible, but I can't get even the most basic Python to run on OS X using Terminal or IDLE. I used the IDLE editor to create a

Re: Help! Can't get program to run.

2009-05-01 Thread Diez B. Roggisch
seanm...@gmail.com schrieb: I think this is maybe the most basic problem possible, but I can't get even the most basic Python to run on OS X using Terminal or IDLE. I used the IDLE editor to create a file with one line of code print 'text string' and I saved the file as module1.py. When using

Help! Can't get program to run.

2009-05-01 Thread seanm . py
I think this is maybe the most basic problem possible, but I can't get even the most basic Python to run on OS X using Terminal or IDLE. I used the IDLE editor to create a file with one line of code print 'text string' and I saved the file as module1.py. When using terminal I entered python to

Re: Help with wxPython program :.: return 1?

2009-04-06 Thread Trent Mick
Dennis Lee Bieber wrote: I don't know what Komodo is coded in, but if it is using wx, you may be failing from having two mainloop processes... (same problem as trying to run a Tkinter application from inside IDLE, and probably trying to run a win32gui application from PythonWin) No,

Help with wxPython program :.: return 1?

2009-04-05 Thread Kenny x
Hello, I have a problem with my wxPython 2.8 Application. The program opens and closes and on KomodoEdit it says wxstreamredirect.py returned 1.' What's wrong? http://paste.pocoo.org/show/80/ P.S. I compared my source code to the source code in wxPython in Action, and it looks the same! Why

Re: Help with wxPython program :.: return 1?

2009-04-05 Thread Vlastimil Brom
2009/4/5 Kenny x xarv...@gmail.com: Hello, I have a problem with my wxPython 2.8 Application. The program opens and closes and on KomodoEdit it says wxstreamredirect.py returned 1.'  What's wrong? http://paste.pocoo.org/show/80/ P.S. I compared my source code to the source code in

Need help with first program to connect to mysql database via apache and python.

2008-02-06 Thread pythonbrian
I am just learning python and I am trying to create a simple connection to a mysql table via Python and Apache, using a Python program Unfortunately I keep getting an internal server error (50), when I bring it up in my browser ... information attached. Any help would be appreciated ... Thx,

Re: Need help with first program to connect to mysql database via apache and python.

2008-02-06 Thread Steve Holden
pythonbrian wrote: I am just learning python and I am trying to create a simple connection to a mysql table via Python and Apache, using a Python program Unfortunately I keep getting an internal server error (50), when I bring it up in my browser ... information attached. Any help would be

help to make program better

2007-08-17 Thread yadin
hi! Can any one tell me why is it that i can't see my second frame and why is the value of freq not Appended in the First frame ...thanks I know it is wx python but it has to do with passing variables.thanks import wx def create(parent): return Frame1(parent) [wxID_FRAME1, wxID_FRAME1FREQ,

help to make program better

2007-08-17 Thread yadin
hi! Can any one tell me why is it that i can't see my second frame and why is the value of freq not Appended in the First frame ...thanks I know it is wx python but it has to do with passing variables.thanks import wx def create(parent): return Frame1(parent) [wxID_FRAME1, wxID_FRAME1FREQ,

Re: help to make program better

2007-08-17 Thread math2life
On Aug 17, 9:27 am, yadin [EMAIL PROTECTED] wrote: hi! Can any one tell me why is it that i can't see my second frame and why is the value of freq not Appended in the First frame ...thanks I know it is wx python but it has to do with passing variables.thanks import wx def create(parent):

Re: Help with small program

2007-01-01 Thread gokkog
Paul Watson 写道: Tim Roberts wrote: [EMAIL PROTECTED] wrote: Interesting impl in Python! I am wondering what if the requirement is to find the minimum number of coins which added to the fin sum... Given the set of coins in the original problem (100, 10, 5, 1, 0.5), the solution it

Re: Help with small program

2006-12-31 Thread Paul Watson
Tim Roberts wrote: [EMAIL PROTECTED] wrote: Interesting impl in Python! I am wondering what if the requirement is to find the minimum number of coins which added to the fin sum... Given the set of coins in the original problem (100, 10, 5, 1, 0.5), the solution it provides will always be

Re: Help with small program

2006-12-31 Thread Tom Plunket
Paul Watson wrote: It is certainly possible to construct a set of denominations for which the algorithm occasionally chooses badly. For example, if you give it the set (40,35,10) and ask it to make change for 70, it will be suboptimal. Unless I am missing the point, the minimum number

Re: Help with small program

2006-12-29 Thread Tim Roberts
[EMAIL PROTECTED] wrote: Interesting impl in Python! I am wondering what if the requirement is to find the minimum number of coins which added to the fin sum... Given the set of coins in the original problem (100, 10, 5, 1, 0.5), the solution it provides will always be optimal. Even if we

Re: Help with small program

2006-12-27 Thread gokkog
Paul Watson 写道: snip Interesting impl in Python! I am wondering what if the requirement is to find the minimum number of coins which added to the fin sum... -- http://mail.python.org/mailman/listinfo/python-list

Help with small program

2006-12-24 Thread smartbei
Hello, I am a newbie with python, though I am having a lot of fun using it. Here is one of the excersizes I am trying to complete: the program is supposed to find the coin combination so that with 10 coins you can reach a certain amoung, taken as a parameter. Here is the current program: coins =

Re: Help with small program

2006-12-24 Thread Felix Benner
smartbei schrieb: Hello, I am a newbie with python, though I am having a lot of fun using it. Here is one of the excersizes I am trying to complete: the program is supposed to find the coin combination so that with 10 coins you can reach a certain amoung, taken as a parameter. Here is the

Re: Help with small program

2006-12-24 Thread smartbei
Felix Benner wrote: smartbei schrieb: Hello, I am a newbie with python, though I am having a lot of fun using it. Here is one of the excersizes I am trying to complete: the program is supposed to find the coin combination so that with 10 coins you can reach a certain amoung, taken as a

Re: Help with small program

2006-12-24 Thread Paul Watson
smartbei wrote: Felix Benner wrote: smartbei schrieb: Hello, I am a newbie with python, though I am having a lot of fun using it. Here is one of the excersizes I am trying to complete: the program is supposed to find the coin combination so that with 10 coins you can reach a certain amoung,

Re: Help with small program

2006-12-24 Thread Paul Watson
Better alternative. cointype = (100, 10, 5, 1, 0.5) def coins(fin): needed = {} for c in cointypes: v, r = divmod(fin, c) if v 0: needed[c] = v fin = r return needed if __name__ ==

Re: Need help running external program

2005-03-03 Thread Rigga
Thanks to all for your help it is now working, I rant he code through a debugger and found that the input file I was using to create my list of addresses to wget had newlines in them and were therefore breaking my command line. All your advice has been appreciated. RiGGa --

Re: Need help running external program

2005-03-02 Thread Rigga
Brian van den Broek wrote: Rigga said unto the world upon 2005-02-27 15:04: Tim Jarman wrote: SNIP No, the r was the point - it's there to tell Python not to do any escaping on the string. Try it again with the r and see what happens. Brilliant!!! that works a treat thankyou!!, where

Re: Need help running external program

2005-03-02 Thread Tim Jarman
Rigga wrote: Brian van den Broek wrote: Rigga said unto the world upon 2005-02-27 15:04: (snip stuff about raw strings) Thanks for all your help with this it is appreciated, one further question though, how do I pass a variable to the external program while using the r Thanks RiGGa

Re: Need help running external program

2005-03-02 Thread Tim Jarman
Rigga wrote: (snip) This is the command I am trying to run: feed is a list of web addresses output, input = popen2(wget -q %s -O - | tr '\r' '\n' | tr \' \ | sed -n 's/.*url=\([^]*\).*/\1/p' % feed[counter]) But it does not work, if I escape the string using r and hard code in the

Re: Need help running external program

2005-03-02 Thread Steve Holden
Rigga wrote: Tim Jarman wrote: Rigga wrote: Brian van den Broek wrote: Rigga said unto the world upon 2005-02-27 15:04: (snip stuff about raw strings) Thanks for all your help with this it is appreciated, one further question though, how do I pass a variable to the external program while using

Re: Need help running external program

2005-02-27 Thread Pink
Rigga wrote: Hi, I am running the line of code below from a shell script and it works fine, however I am at a total loss on how i can run it from within a Python script as every option I have tried fails and it appears to be down to the escaping of certain characters. wget -q

Re: Need help running external program

2005-02-27 Thread Rigga
Pink wrote: Rigga wrote: Hi, I am running the line of code below from a shell script and it works fine, however I am at a total loss on how i can run it from within a Python script as every option I have tried fails and it appears to be down to the escaping of certain characters.

Re: Need help running external program

2005-02-27 Thread Leif B. Kristensen
I'm using wget from Python to get extactly one line from a reports page. I made this function that works for me: def wgetline(exp): # see Python Cookbook p. 228 print Getting result from server ... command = 'wget -q -O - \ http://www.foobar.com/report.pl\?UserID=xxx\UserPW=xxx \

Re: Need help running external program

2005-02-27 Thread Tim Jarman
Rigga wrote: Pink wrote: Rigga wrote: Hi, I am running the line of code below from a shell script and it works fine, however I am at a total loss on how i can run it from within a Python script as every option I have tried fails and it appears to be down to the escaping of certain

Re: Need help running external program

2005-02-27 Thread Rigga
Tim Jarman wrote: Rigga wrote: Pink wrote: Rigga wrote: Hi, I am running the line of code below from a shell script and it works fine, however I am at a total loss on how i can run it from within a Python script as every option I have tried fails and it appears to be down to the

Re: Need help running external program

2005-02-27 Thread Brian van den Broek
Rigga said unto the world upon 2005-02-27 15:04: Tim Jarman wrote: SNIP No, the r was the point - it's there to tell Python not to do any escaping on the string. Try it again with the r and see what happens. Brilliant!!! that works a treat thankyou!!, where on earth did you find out about the 'r'

Re: Need help running external program

2005-02-27 Thread Pink
Rigga wrote: No, the r was the point - it's there to tell Python not to do any escaping on the string. Try it again with the r and see what happens. Brilliant!!! that works a treat thankyou!!, where on earth did you find out about the 'r' any pointers to documentation appreciated. This is