Re: Python help needed

2019-08-08 Thread Dan Sommers
On 8/8/19 12:26 PM, Paolo G. Cantore wrote: > I think the special case treatment could be avoided. > > First: Join all items with ' and ' > Second: Replace all ' and ' with ', ' except the last That works great, until one of the elements of the original list is "spam and eggs": >>> spam = [

Re: Python help needed

2019-08-08 Thread Paolo G. Cantore
Am 08.08.19 um 01:18 schrieb MRAB: On 2019-08-07 21:36, Kuyateh Yankz wrote: #trying to write a function that takes a list value as an argument and returns a string with all the items separated by a comma and a space, with and inserted before the last item. For example, passing the previous sp

Re: Python help needed

2019-08-07 Thread MRAB
On 2019-08-07 21:36, Kuyateh Yankz wrote: #trying to write a function that takes a list value as an argument and returns a string with all the items separated by a comma and a space, with and inserted before the last item. For example, passing the previous spam list to the function would return

Re: Python Help

2014-10-14 Thread Chris Angelico
On Wed, Oct 15, 2014 at 4:57 PM, Jeffe wrote: > Looking for a something basic yet operational, fee based or we can discuss > equity if succesfully funded. Have some Big people interested with a solid > business framework. Just need the software to show and its on.. > Unfortunately, the Python J

Re: [Python-Help] learning python

2013-05-05 Thread leonardo selmi
thanks! Il giorno 05/mag/2013, alle ore 18:58, Eric Brunson ha scritto: > On 05/05/2013 10:08 AM, leonardo selmi wrote: >> hi guys >> >> i need to find a good book to learn python with exercises and solutions, any >> suggestions? >> >> thanks! >> > > Leonardo, > > There are several good

Re: [Python-Help] learning python

2013-05-05 Thread Eric Brunson
On 05/05/2013 10:08 AM, leonardo selmi wrote: hi guys i need to find a good book to learn python with exercises and solutions, any suggestions? thanks! Leonardo, There are several good online tutorials available, many listed here: http://wiki.python.org/moin/BeginnersGuide There is al

Re: [Python-Help] help to code...

2013-05-02 Thread bob gailer
On 5/2/2013 9:50 AM, leonardo selmi wrote: Please in future post plain text. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Help] how does the % work?

2013-03-22 Thread bob gailer
It is better to post to just one list at a time. On 3/22/2013 1:06 PM, leonardo selmi wrote: name = raw_input("What is your name?") quest = raw_input("What is your quest?") color = raw_input("What is your favorite color?") print """Ah, so your name is %s, your quest is %s, and your favorite col

Re: [Python-Help] idle doesn't work

2013-03-12 Thread leonardo
thanks now python shell works Il 12/03/2013 17.52, Ned Deily ha scritto: In article <513f5080.6030...@libero.it>, leonardo wrote: first of all thanks for trying to help me. the text of my email was the following: i have a mac os x 10.8, i had already python 2.7, i downloaded python 3.3 an

Re: [Python-Help] idle doesn't work

2013-03-12 Thread Ned Deily
In article <513f5080.6030...@libero.it>, leonardo wrote: > first of all thanks for trying to help me. the text of my email was the > following: > i have a mac os x 10.8, i had already python 2.7, i downloaded python > 3.3 and active tcl 8.5, but idle and the new version don't work, the > answe

Re: [Python-Help] idle doesn't work

2013-03-12 Thread leonardo
first of all thanks for trying to help me. the text of my email was the following: i have a mac os x 10.8, i had already python 2.7, i downloaded python 3.3 and active tcl 8.5, but idle and the new version don't work, the answer is:"idle's subprocess didn't make connection or personal firewall

Fwd: Re: [Python-Help] idle doesn't work

2013-03-11 Thread leonardo
sorry for that, that answer didn't help me.. regards Il 10/03/2013 23.59, Matthew Dixon Cowles ha scritto: Dear Leonardo, Sending the same message three times isn't likely to produce faster or better help. Is the reply that you got on the main Python list satisfactory? Regards,

Re: Python help: Sending a "play" command to quicktime, or playing a movie in python

2009-10-23 Thread Chris Varnon
>> On Fri, Oct 23, 2009 at 5:17 PM, Chris Rebert wrote: >>> On Fri, Oct 23, 2009 at 3:07 PM, Varnon Varnon wrote: I'm sure this is a simple problem, or at least I hope it is, but I'm not an experience programer and the solution eludes me. My realm of study is the behavioral sc

Re: Python help: Sending a "play" command to quicktime, or playing a movie in python

2009-10-23 Thread Chris Rebert
> On Fri, Oct 23, 2009 at 5:17 PM, Chris Rebert wrote: >> On Fri, Oct 23, 2009 at 3:07 PM, Varnon Varnon wrote: >>> I'm sure this is a simple problem, or at least I hope it is, but I'm >>> not an experience programer and the solution eludes me. >>> >>> My realm of study is the behavioral sciences

Re: Python help: Sending a "play" command to quicktime, or playing a movie in python

2009-10-23 Thread Chris Varnon
Thanks, That works wonderfuly. Once I set quicktimes preferences to "play on open" it opens and plays the movie exactly like I want. But now I need a line of code to bring python to the front again so it can read my input. Any more suggestions? On Fri, Oct 23, 2009 at 5:17 PM, Chris Rebert wrote:

Re: Python help: Sending a "play" command to quicktime, or playing a movie in python

2009-10-23 Thread Terry Reedy
Chris Rebert wrote: On Fri, Oct 23, 2009 at 3:07 PM, Varnon Varnon wrote: I'm sure this is a simple problem, or at least I hope it is, but I'm not an experience programer and the solution eludes me. My realm of study is the behavioral sciences. I want to write a program to help me record data

Re: Python help: Sending a "play" command to quicktime, or playing a movie in python

2009-10-23 Thread Chris Rebert
On Fri, Oct 23, 2009 at 3:07 PM, Varnon Varnon wrote: > I'm sure this is a simple problem, or at least I hope it is, but I'm > not an experience programer and the solution eludes me. > > My realm of study is the behavioral sciences. I want to write a > program to help me record data from movie fil

Re: Python help for a C++ programmer

2008-01-16 Thread Bruno Desthuilliers
mlimber a écrit : > I'm writing a text processing program to process some survey results. > I'm familiar with C++ and could write it in that, but I thought I'd > try out Python. I've got a handle on the file I/O and regular > expression processing, FWIW, and depending on your text format, there ma

Re: Python help for a C++ programmer

2008-01-16 Thread Tim Chase
> I want something like (C++ code): > > struct Response > { >std::string name; >int age; >int iData[ 10 ]; >std::string sData; > }; > > // Prototype > void Process( const std::vector& ); > > int main() > { >std::vector responses; > >while( /* not end of file */ )

Re: Python help for a C++ programmer

2008-01-16 Thread Neil Cerutti
On Jan 16, 2008 9:23 AM, mlimber <[EMAIL PROTECTED]> wrote: > I'm writing a text processing program to process some survey results. > I'm familiar with C++ and could write it in that, but I thought I'd > try out Python. I've got a handle on the file I/O and regular > expression processing, but I'm

Re: Python help for a C++ programmer

2008-01-16 Thread Lutz Horn
Hi, On Wed, 16 Jan 2008 06:23:10 -0800 (PST), "mlimber" <[EMAIL PROTECTED]> said: > I'm writing a text processing program to process some survey results. > I'm familiar with C++ and could write it in that, but I thought I'd > try out Python. I've got a handle on the file I/O and regular > expressi

Re: Python Help!!!

2007-06-13 Thread Christof Winter
Elfine Peterson Tjio wrote: > I'm trying to make a program that reads Fasta file and print it out. I used > the SeqIO module and the results is: > > 'ATGGTCATSingleAlphabet()' > > For this purpose, should I use SeqIO or Fasta? > > for example: > > from Bio import SeqIO > > or > > from Bio

Re: Python Help!!!

2007-06-13 Thread Nathan Harmston
Hi, you could try this: def parse(self, ifile): id="" seq="" for line in open(ifile, 'r'): if '>'==line[0]: if id!="" and len(seq)>0: yield id,seq seq = "" id=line[1:].strip("\n")

Re: Python Help!!!

2007-06-11 Thread James Stroud
Elfine Peterson Tjio wrote: > I'm trying to make a program that reads Fasta file and print it out. I used > the SeqIO module and the results is: > > 'ATGGTCATSingleAlphabet()' > > For this purpose, should I use SeqIO or Fasta? > > for example: > > from Bio import SeqIO > > or > > from Bi

Re: Python Help!!!

2007-06-11 Thread kyosohma
On Jun 11, 3:39 am, Elfine Peterson Tjio <[EMAIL PROTECTED]> wrote: > I'm trying to make a program that reads Fasta file and print it out. I used > the SeqIO module and the results is: > > 'ATGGTCATSingleAlphabet()' > > For this purpose, should I use SeqIO or Fasta? > > for example: > > from B

Fwd: RE: [Python-Help] Python Help

2006-09-28 Thread Gabriel Genellina
Forwarding full message to the Python list: Hello, I am trying to create a script. I have most of it wrote, but it isn't working like it should. Could you please take a look and let me know whats wrong with it? What happens is that there is an array that is created and I verified the information

Re: Python help for Access database

2006-07-31 Thread John Machin
BartlebyScrivener wrote: > John Machin wrote: > > >> or mxODBC > >> [very good but not free]. > > I love mxODBC. It's free for noncommercial use. > I was presuming that the OP was mucking about with Access only because he was so constrained by his job :-) -- http://mail.python.org/mailman/listi

Re: Python help for Access database

2006-07-31 Thread BartlebyScrivener
John Machin wrote: >> or mxODBC >> [very good but not free]. I love mxODBC. It's free for noncommercial use. http://www.egenix.com/files/python/mxODBC.html rd -- http://mail.python.org/mailman/listinfo/python-list

Re: Python help for Access database

2006-07-31 Thread John Machin
shakir wrote: > HI All, > > I need help for inserting recods into the access database using python > script through ODBC. I can insert data without any problem if I hard > coded the run_Date field. But I need run_Date field should be mytime.. > I am getting error Data type mismatch in criteria exp

Re: Python Help

2006-06-15 Thread Ten
On Wednesday 14 June 2006 16:57, Kathy Garcia wrote: > htmldiv style='background-color'DIV class=RTE > P BR FONT face="Courier New"To Whom it May Concern BR I have recently > downloaded Python 2.4.3 on Windows XP. The program does not recongnize when > I type in python " name 'python' is not define

Re: Python Help

2006-06-14 Thread Tim Chase
> I have recently downloaded Python 2.4.3 on Windows XP. The > program does not recongnize when I type in python:" name > 'python' is not defined". Please tell me how to correct this. Sounds like you don't have it in your path. In XP, use Win+Break to pull up your system properties (the same as

Re: [Python-Help] os listdir access denied when run as a service

2006-05-25 Thread Danny Yoo
On Thu, 25 May 2006, Thomas Thomas wrote: > I am trying to access a mapped network drive folder. everything works > fine normally. But when i run the application as service I am getting > the error The error is on the line: for filename in os.listdir(folder):#line 25 and I have to ass

Re: [Python-Help] Reading from socket file handle took too long

2006-03-03 Thread Etienne Desautels
Hi, thanks Matthew for the answer. It help me think a little bit more. I found a solution and I think I found the culprit but I would need to do more investigation to be sure. My solution is to work directly with the socket library instead of using the higher level urllib2 library. Now it tak

Re: [Python-Help] HOWTO Send a string???

2006-01-24 Thread Sbaush
Firstly i would like to do the Send/Receive function. In the second moment i would implement the threading with this functions. is it a good way?In your opinion where could i found a valid implementation of udp send/receive? 2006/1/23, Eric Brunson <[EMAIL PROTECTED]>: This is a reasonably simple t

Re: [Python-Help] Programming help

2004-12-06 Thread Bob Gailer
At 07:07 PM 12/5/2004, Alfred Canoy wrote: Please help me out:(.. I've been trying to figure this out for 2 days now.. I don't know what to use to print all the list of numbers. I hve know idea how should I do this. I tried a lot of trial & error for the the def, dict, .list( ). have no luck. I

Re: [Python-Help] Programming help

2004-12-06 Thread Danny Yoo
On Mon, 6 Dec 2004, Alfred Canoy wrote: > Please help me out:(.. I've been trying to figure this out for 2 days > now.. I don't know what to use to print all the list of numbers. I hve > know idea how should I do this. I tried a lot of trial & error for the > the def, dict, .list( ). have no luc

Re: Python-Help ( Mean,Median & Mode)

2004-12-05 Thread Dan Bishop
"Alfred Canoy" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Hello, > > I revised my source code. It was doing great but I'm having problem listing > all the numbers that I'd input. How can I input all the numbers that I > selected? The source code and the output below: > >

Re: [Python-Help] Programming help

2004-12-05 Thread Abe Mathews
t;,number > sum = sum + number > print " [x,...,x] ?" > > Al > _ _ > _ _ > Alfred Canoy > Agana, Guam > Pacific time > [EMAIL PROTECTED] > > - Original Message - > From: "Matthew Dixon Cowles" <[EMAIL PROTECTED]> > T

Re: [Python-Help] Programming help

2004-12-05 Thread Alfred Canoy
;, current_count,":",number sum = sum + number print " [x,...,x] ?" Al _ _ _ _ Alfred Canoy Agana, Guam Pacific time [EMAIL PROTECTED] - Original Message - From: "Matthew Dixon Cowles" <[EMAIL PROTECTED]> To: "Alfred Canoy" <[EMAIL PROTE

Re: Python-Help ( Mean,Median & Mode)

2004-12-05 Thread Cousin Stanley
| I revised my source code. It was doing great | but I'm having problem listing all the numbers | that I'd input. | | How can I input all the numbers that I selected? Alfred As a method to list the numbers that have been input and avoid having to know in advance how many numbers are need

Re: Python-Help ( Mean,Median & Mode)

2004-12-05 Thread Alfred Canoy
Al _ _ _ _ Alfred Canoy Agana, Guam Pacific time [EMAIL PROTECTED] - Original Message - From: "Bob Gailer" <[EMAIL PROTECTED]> To: "Alfred Canoy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, December 05, 2004 7:50 PM Su

Re: [Python-Help] (fwd)

2004-12-05 Thread Steven Bethard
Craig Ringer wrote: It looks to me like you'd be better off reading each input number into a list. You may also find it useful to write a generator function to read your values in: >>> def read_numbers(): ... while True: ... number = int(raw_input('Enter a number: ')) ... if n

Re: [Python-Help] (fwd)

2004-12-05 Thread Steven Bethard
Craig Ringer wrote: As you can see, it's much easier to work with data in lists. Some of the other methods, like list.sort() and list "slices" will also be useful to you, but I'll let you figure out the details ;-) . Something else that might be useful to you if you're using Python 2.4: >>> lst =

Re: [Python-Help] (fwd)

2004-12-05 Thread Bob Gailer
At 10:07 PM 12/4/2004, Alfred Canoy wrote: Hello, I'm just new to programming and would like to ask for help.. Build a module that contains three functions that do the following: a.. Compute the average of a list of numbers b.. Finds the statistical median value of a list of numbers The m

Re: [Python-Help] (fwd)

2004-12-05 Thread Craig Ringer
On Sun, 2004-12-05 at 13:07, Alfred Canoy wrote: > a.. Compute the average of a list of numbers > b.. Finds the statistical median value of a list of numbers > c.. Finds the mode of a list of numbers > > count = 0 > sum = 0 > number = 1 > > print 'Enter 0 to exit the loop' > w

Re: [Python-Help] (fwd)

2004-12-04 Thread Joe Raul
"Alfred Canoy" <[EMAIL PROTECTED]> news:[EMAIL PROTECTED] > Hello, > > I'm just new to programming and would like to ask for help.. > > Build a module that contains three functions that do the following: > > a.. Compute the average of a list of numbers > b.. Finds the statistical

Re: [Python-Help] (fwd)

2004-12-04 Thread Paul Rubin
"Alfred Canoy" <[EMAIL PROTECTED]> writes: > I'm just new to programming and would like to ask for help.. > > Build a module that contains three functions that do the following: > > a.. Compute the average of a list of numbers > b.. Finds the statistical median value of a list of num

RE: [Python-Help] (fwd)

2004-12-04 Thread Robert Brewer
Alfred Canoy wrote: > I'm just new to programming and would like to ask for help.. > > Build a module that contains three functions that do the following: > > a.. Compute the average of a list of numbers > b.. Finds the statistical median value of a list of numbers > c.. Finds

Re: [Python-Help] (fwd)

2004-12-04 Thread Alfred Canoy
Hello, I'm just new to programming and would like to ask for help.. Build a module that contains three functions that do the following: a.. Compute the average of a list of numbers b.. Finds the statistical median value of a list of numbers c.. Finds the mode of a list of numbers Can