Re: [Tutor] PLEASE HELP

2018-04-13 Thread Mayo Adams
discrete, not discreet. On Fri, Apr 13, 2018 at 11:38 AM, Neil Cerutti wrote: > On 2018-04-13, David Rock wrote: > > > >> On Apr 13, 2018, at 09:24, Neil Cerutti wrote: > >> > >> On 2018-04-12, Scharrer, Brianna wrote: > >>> Applications of basic language syntax > >>> > >>> Date/time string

Re: [Tutor] PLEASE HELP

2018-04-13 Thread Neil Cerutti
On 2018-04-13, David Rock wrote: > >> On Apr 13, 2018, at 09:24, Neil Cerutti wrote: >> >> On 2018-04-12, Scharrer, Brianna wrote: >>> Applications of basic language syntax >>> >>> Date/time string parsing >>> >>> Time stamps on data are often recorded in the standard ISO date >>> and time fo

Re: [Tutor] PLEASE HELP

2018-04-13 Thread David Rock
> On Apr 13, 2018, at 09:24, Neil Cerutti wrote: > > On 2018-04-12, Scharrer, Brianna wrote: >> Applications of basic language syntax >> >> Date/time string parsing >> >> Time stamps on data are often recorded in the standard ISO date >> and time format as shown below >> 1999-02-14T21:02:37 -

Re: [Tutor] PLEASE HELP

2018-04-13 Thread Neil Cerutti
On 2018-04-12, Scharrer, Brianna wrote: > Applications of basic language syntax > > Date/time string parsing > > Time stamps on data are often recorded in the standard ISO date > and time format as shown below > > -mm-ddThh:mm:ss > > 2018-01-02T18:31:16 > 6:31pm on January 2, 2018 > > 1999

Re: [Tutor] PLEASE HELP

2018-04-12 Thread Alan Gauld via Tutor
On 12/04/18 18:24, Scharrer, Brianna wrote: What appears below seems to be an assignment of some kind. We do not do your work for you although we will offer help. But it is best if you show us your work so far, or at least describe how you intend to tackle it. In this case you are being given a s

[Tutor] PLEASE HELP

2018-04-12 Thread Scharrer, Brianna
Applications of basic language syntax Date/time string parsing Time stamps on data are often recorded in the standard ISO date and time format as shown below -mm-ddThh:mm:ss 2018-01-02T18:31:16 > 6:31pm on January 2, 2018 1999-02-14T21:02:37 > 9:02pm on February 14, 1999 Write

Re: [Tutor] please help me with after method

2016-11-17 Thread Alan Gauld via Tutor
Always use REply-All or Reply-List to the tutor list. On 17/11/16 18:34, Freedom Peacemaker wrote: > Thank you Alan for answer but i still cant make it. I have improved my > program but it still uses root.update() and now my app looks > professional :) It is my first program. I am self learning Py

Re: [Tutor] please help me with after method

2016-11-16 Thread Alan Gauld via Tutor
On 16/11/16 18:48, Freedom Peacemaker wrote: > Hi, i need help. I am using Python 3.4 and I have wrote little app for > windows only ( windows 7 and higher). Its timer and my app working but not > good. Some people said that i should use after method instead of update() after() executes a function

[Tutor] please help me with after method

2016-11-16 Thread Freedom Peacemaker
Hi, i need help. I am using Python 3.4 and I have wrote little app for windows only ( windows 7 and higher). Its timer and my app working but not good. Some people said that i should use after method instead of update() and nobody told me how. Ive tried many times but i dont know how do it correctl

Re: [Tutor] please help me modify this code so that I can utilize raw_input

2016-10-05 Thread Oscar Benjamin
On 4 October 2016 at 19:11, Alan Gauld via Tutor wrote: >> """Define a function sum() and a function multiply() that sums and >> multiplies (respectively) all the numbers in a list of numbers. For >> example, sum([1, 2, 3, 4]) should return 10, and multiply([1, 2, 3, 4]) >> should return 24.""" >

Re: [Tutor] please help me modify this code so that I can utilize raw_input

2016-10-04 Thread Alan Gauld via Tutor
On 04/10/16 15:04, Richard Koeman wrote: > I would like to modify this code so that instead of me calling the function > with the list as shown [1,2,3,4], the user inputs the list with raw_input. > You don't need to modify your code you just need ton write a function that reads a list from the us

[Tutor] please help me modify this code so that I can utilize raw_input

2016-10-04 Thread Richard Koeman
I would like to modify this code so that instead of me calling the function with the list as shown [1,2,3,4], the user inputs the list with raw_input. Thanks in advance """Define a function sum() and a function multiply() that sums and multiplies (respectively) all the numbers in a list of numbe

Re: [Tutor] Please Help to build an addon for Anki

2015-04-20 Thread Alan Gauld
On 20/04/15 09:54, Mahesh Chiramure wrote: I liked the addon "Picture-flasher" written for anki very much and I was wondering if the same thing could be done with mp3 and/or flac files. Probably, but I (and probably most of the list) have no idea what anki is or what the addon does. This is a

[Tutor] Please Help to build an addon for Anki

2015-04-20 Thread Mahesh Chiramure
Hi I liked the addon "Picture-flasher" written for anki very much and I was wondering if the same thing could be done with mp3 and/or flac files. Means I am looking for an addon that chooses a random mp3 and/or flac file from a directory provided by me (to the addon as we have to provide in "Pictu

Re: [Tutor] please help

2014-03-22 Thread spir
On 03/21/2014 10:39 PM, Cameron Simpson wrote: On 21Mar2014 20:31, Mustafa Musameh wrote: Please help. I have been search the internet to understand how to write a simple program/script with python, and I did not do anything. I have a file that look like this ID 1 agtcgtacgt… ID 2 aaaa

Re: [Tutor] please help

2014-03-22 Thread Cameron Simpson
On 22Mar2014 00:04, Mark Lawrence wrote: > On 21/03/2014 21:39, Cameron Simpson wrote: > >On 21Mar2014 20:31, Mustafa Musameh wrote: > > > >I would collect the statistics using a dictionary to keep count of > >the characters. See the dict.setdefault method; it should be helpful. > > > > Delightf

Re: [Tutor] please help

2014-03-21 Thread Mark Lawrence
On 21/03/2014 21:39, Cameron Simpson wrote: On 21Mar2014 20:31, Mustafa Musameh wrote: I would collect the statistics using a dictionary to keep count of the characters. See the dict.setdefault method; it should be helpful. Delightfully old fashioned but I'd now prefer http://docs.python.or

Re: [Tutor] please help

2014-03-21 Thread Steven D'Aprano
On Fri, Mar 21, 2014 at 08:31:07PM +1100, Mustafa Musameh wrote: > Please help. I have been search the internet to understand how to > write a simple program/script with python, and I did not do anything. > I have a file that look like this > >ID 1 > agtcgtacgt… > >ID 2 > acccttcc >

Re: [Tutor] please help

2014-03-21 Thread Cameron Simpson
On 21Mar2014 20:31, Mustafa Musameh wrote: > Please help. I have been search the internet to understand how to write a > simple program/script with python, and I did not do anything. > I have a file that look like this > >ID 1 > agtcgtacgt… > >ID 2 > acccttcc > . > . > . > in other wo

Re: [Tutor] please help

2014-03-21 Thread Alan Gauld
On 21/03/14 09:31, Mustafa Musameh wrote: Please help. I have been search the internet to understand how to write a > simple program/script with python, and I did not do anything. There are ma y tutorials on how to write Python for every level of programmer. What is your level? If you can alre

Re: [Tutor] please help

2014-03-21 Thread Mark Lawrence
On 21/03/2014 09:31, Mustafa Musameh wrote: Please help. I have been search the internet to understand how to write a simple program/script with python, and I did not do anything. I have a file that look like this ID 1 agtcgtacgt… ID 2 acccttcc . . . in other words, it contains s

[Tutor] please help

2014-03-21 Thread Mustafa Musameh
Please help. I have been search the internet to understand how to write a simple program/script with python, and I did not do anything. I have a file that look like this >ID 1 agtcgtacgt… >ID 2 acccttcc . . . in other words, it contains several IDs each one has a sequence of 'acgt' le

[Tutor] Please help with beautifulsoup and web scraping

2013-09-23 Thread Kevin Ndung'u
http://stackoverflow.com/q/18974172/2390312 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Please help replace Long place-names with short place-names in many files with Python

2013-09-01 Thread Joel Goldstick
On Sun, Sep 1, 2013 at 4:19 PM, mc UJI wrote: > Dear Pythonistas, > > I am totally new to Python. This means a know the basics. And by basics I > mean the very, very basics. > > I have a problem with which I need help. > > in short, I need to: > > a) Open many files (in a dir) with an .html extens

[Tutor] Please help replace Long place-names with short place-names in many files with Python

2013-09-01 Thread mc UJI
Dear Pythonistas, I am totally new to Python. This means a know the basics. And by basics I mean the very, very basics. I have a problem with which I need help. in short, I need to: a) Open many files (in a dir) with an .html extension b) Find Long name-places (Austria) c) Replace them by shor

[Tutor] please help with read_until, write script

2013-08-15 Thread cindy chao
Hi, all Python Experts, I am a Python beginner. I am trying to script the following steps. I have problem to match the step after 'signature check?' '[999.daisyse.07260019]:' the value of 0726009 is dynamic, every time it will be different, so I don't know how to do it. For sure I have problem to

Re: [Tutor] Please Help

2013-03-22 Thread Martin A. Brown
Greetings, : I have the following data points. : data = [1,2,0,9,0,1,4] : I like to store in an array and print the odd-indexed points, i.e. 2, 9,1 : (considering index starts at 0) : : I have written the following code which is not running: : : import math : : number_list = [1,2,0,

Re: [Tutor] Please Help

2013-03-22 Thread Asokan Pichai
On Fri, Mar 22, 2013 at 6:07 PM, Arijit Ukil wrote: > I have the following data points. > data = [1,2,0,9,0,1,4] > I like to store in an array and print the odd-indexed points, i.e. 2, 9,1 > (considering index starts at 0) > > *I have written the following code which is** not **running:* > > impo

Re: [Tutor] Please Help

2013-03-22 Thread Andreas Perstinger
Please use a meaningful subject. On 22.03.2013 13:37, Arijit Ukil wrote: I have the following data points. data = [1,2,0,9,0,1,4] I like to store in an array and print the odd-indexed points, i.e. 2, 9,1 (considering index starts at 0) You can simply slice your list: >>> data = [1, 2, 0, 9, 0

[Tutor] Please Help

2013-03-22 Thread Arijit Ukil
I have the following data points. data = [1,2,0,9,0,1,4] I like to store in an array and print the odd-indexed points, i.e. 2, 9,1 (considering index starts at 0) I have written the following code which is not running: import math number_list = [1,2,0,9,0,1,4] number_list_1 = [] for k in range

Re: [Tutor] Please Help

2013-03-22 Thread Alan Gauld
On 22/03/13 07:24, Arijit Ukil wrote: f = open ("digi_2.txt", "r+") lines = f.readlines() for line in lines: number_list = [] for number in line.split(','): number_list.append(float(number)) s_data = [] for i in range(len(number_list)): You hardly ever need to do this, its

Re: [Tutor] Please Help

2013-03-22 Thread suhas bhairav
t(x) RegardsSuhas To: tutor@python.org From: arijit.u...@tcs.com Date: Fri, 22 Mar 2013 12:54:01 +0530 Subject: [Tutor] Please Help Hi, I have another small problem. Pls help. I have written the following code: f = open ("digi_2.txt", "r+") lines = f.readlines() for

[Tutor] Please Help

2013-03-22 Thread Arijit Ukil
it Ukil Cc: tutor@python.org Date: 03/21/2013 05:30 PM Subject: Re: [Tutor] Please Help Hi Arijit, On Thu, Mar 21, 2013 at 8:42 PM, Arijit Ukil wrote: > > I am new to python. I like to calculate average of the numbers by reading > the file 'digi_2.txt'. I have written

Re: [Tutor] Please Help

2013-03-21 Thread Dave Angel
On 03/21/2013 08:09 AM, Arijit Ukil wrote: Thanks for the help. You're welcome. You replied privately, instead of including the list, so I'm forwarding the response so everyone can see it. You also top-posted, so the context is backwards. After running your code, I am getting the follow

Re: [Tutor] Please Help

2013-03-21 Thread Amit Saha
Hi Arijit, On Thu, Mar 21, 2013 at 8:42 PM, Arijit Ukil wrote: > > I am new to python. I like to calculate average of the numbers by reading > the file 'digi_2.txt'. I have written the following code: > > def average(s): return sum(s) * 1.0 / len(s) > > f = open ("digi_2.txt", "r+") > > list_of_l

Re: [Tutor] Please Help

2013-03-21 Thread Dave Angel
On 03/21/2013 06:42 AM, Arijit Ukil wrote: I am new to python. Since you're new to Python, I won't try to supply you an answer using list comprehensions, since you've probably not learned them yet. I like to calculate average of the numbers by reading the file 'digi_2.txt'. I have written

Re: [Tutor] Please Help

2013-03-21 Thread Sven
Please trim unrelated text from emails. On 21 March 2013 10:42, Arijit Ukil wrote: > I am new to python. I like to calculate average of the numbers by reading > the file 'digi_2.txt'. I have written the following code: > > def average(s): return sum(s) * 1.0 / len(s) > > f = open ("digi_2.txt",

[Tutor] Please Help

2013-03-21 Thread Arijit Ukil
I am new to python. I like to calculate average of the numbers by reading the file 'digi_2.txt'. I have written the following code: def average(s): return sum(s) * 1.0 / len(s) f = open ("digi_2.txt", "r+") list_of_lists1 = f.readlines() for index in range(len(list_of_lists1)): tt = li

Re: [Tutor] Please help

2013-01-01 Thread Asokan Pichai
I saw the code; I see too many formatting errors: Line No 24 starts a function definition and the next few lines are indented by two spaces, but Line 29 is a print statement that is in line with the def; IOW it completes the function. It is very likely wrong. You are defining functions within fun

Re: [Tutor] Please help

2013-01-01 Thread Jack Little
Maybe tomorrow I can just email you the code ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Please help

2013-01-01 Thread Steven D'Aprano
On 02/01/13 13:02, Jack Little wrote: I do not understand my error (it says something about an out-of-function return on line 179) You cannot use "return" unless it is inside a function. # This is okay. def test(): print "test" return "testing complete" # indented, therefore inside t

Re: [Tutor] Please help

2013-01-01 Thread Ryan Macy
Jack Little wrote: I do not understand my error (it says something about an out-of-function return on line 179) my code is at the link http://www.mediafire.com/download.php?4ga0weu4ifc6s1u ___ Tutor maillist - Tutor@python.org To unsubscribe or change

[Tutor] Please help

2013-01-01 Thread Jack Little
I do not understand my error (it says something about an out-of-function return on line 179)   my code is at the link http://www.mediafire.com/download.php?4ga0weu4ifc6s1u___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription optio

Re: [Tutor] please help - stuck for hours

2011-11-17 Thread Alan Gauld
On 17/11/11 23:12, ADRIAN KELLY wrote: i know i should use input but when i changed to raw_input In Python v3 use input() In python v2 input() is dangerous, use raw_input() instead. > ... it wouldn't recognise the word print on the next line. Show us the exact code and error. You may be miss

Re: [Tutor] please help - stuck for hours

2011-11-17 Thread ADRIAN KELLY
From: waynejwer...@gmail.com Date: Thu, 17 Nov 2011 16:53:59 -0600 Subject: Re: [Tutor] please help - stuck for hours To: kellyadr...@hotmail.com CC: tutor@python.org On Thu, Nov 17, 2011 at 4:32 PM, ADRIAN KELLY wrote: thanks very much, great response really really appreciated it and

Re: [Tutor] please help - stuck for hours

2011-11-17 Thread Wayne Werner
On Thu, Nov 17, 2011 at 4:32 PM, ADRIAN KELLY wrote: > > thanks very much, great response really really appreciated it and now i > understand. i hate to ask again but can you see why it won't print the > 'enter and amount over 50' in the right place?? > Computers are unfailingly stupid machines.

Re: [Tutor] please help - stuck for hours

2011-11-17 Thread ADRIAN KELLY
total=exchange(amount)print 'Your exchange comes to: ',total main() Adrian Kelly 1 Bramble Close Baylough Athlone County Westmeath 0879495663 From: waynejwer...@gmail.com Date: Thu, 17 Nov 2011 15:35:29 -0600 Subject: Re: [Tutor] please help - stuck for hours To: kellyadr.

Re: [Tutor] please help - stuck for hours

2011-11-17 Thread delegbede
n int type right away before doing the multiplication. Hope this helps. Cheers. Sent from my BlackBerry wireless device from MTN -Original Message- From: ADRIAN KELLY Sender: tutor-bounces+delegbede=dudupay@python.org Date: Thu, 17 Nov 2011 21:19:45 To: Subject: [Tutor] please

Re: [Tutor] please help - stuck for hours

2011-11-17 Thread Wayne Werner
On Thu, Nov 17, 2011 at 3:19 PM, ADRIAN KELLY wrote: > i have tried everything, i am trying to build in a loop to my 2 functions > which worked fine up until my latest sorti. > > please have a look if you can.. > > def exchange(cash_in): > euro=1 > dollar=1.35 > base=50 >

[Tutor] please help - stuck for hours

2011-11-17 Thread ADRIAN KELLY
i have tried everything, i am trying to build in a loop to my 2 functions which worked fine up until my latest sorti. please have a look if you can.. def exchange(cash_in):euro=1dollar=1.35base=50if cash_in>base: totalreturn=cash_in*dollarelse:tota

Re: [Tutor] Please help understanding unittest fixtures

2011-08-22 Thread Peter Otten
Steven D'Aprano wrote: > D. Guandalino wrote: >> In this case is there a >> way to force just one setUp() call? > > > I don't know if this is the best way, but the first way that comes to > mind is this: > > > class C(TestCase): > initialised = False > def setUp(self): > if

Re: [Tutor] Please help understanding unittest fixtures

2011-08-21 Thread Steven D'Aprano
D. Guandalino wrote: Suppose I have this TestCase class. class C(TestCase): def setUp(): # very time consuming and resources intensive stuffs. pass def test_A(self): pass def test_B(self): pass def test_C(self): pass The unittest docs says: Each i

[Tutor] Please help understanding unittest fixtures

2011-08-21 Thread D. Guandalino
Suppose I have this TestCase class. class C(TestCase): def setUp(): # very time consuming and resources intensive stuffs. pass def test_A(self): pass def test_B(self): pass def test_C(self): pass The unittest docs says: > Each instance of the TestCas

Re: [Tutor] Please help, the program is not behaving as I want

2011-05-17 Thread Prasad, Ramit
phone: 713 - 216 - 5423 From: tutor-bounces+ramit.prasad=jpmchase@python.org [mailto:tutor-bounces+ramit.prasad=jpmchase@python.org] On Behalf Of I. Dooba Sent: Tuesday, May 17, 2011 11:54 AM To: tutor@python.org Subject: Re: [Tutor] Please help, the program is not behaving as I want T

Re: [Tutor] Please help, the program is not behaving as I want

2011-05-17 Thread Joel Goldstick
On Tue, May 17, 2011 at 12:54 PM, I. Dooba wrote: > Thanks, Joel Goldstick > > There is no error message. > But the program is returning incomplete or too many characters. For > example, instead of "Halal" it will return "l Hala" > or "nol" depending on the length of the word the user inputs. >

Re: [Tutor] Please help, the program is not behaving as I want

2011-05-17 Thread I. Dooba
Thanks, Joel Goldstick There is no error message. But the program is returning incomplete or too many characters. For example, instead of "Halal" it will return "l Hala" or "nol" depending on the length of the word the user inputs. Since I can't predict the words the user will search for, I'm fi

Re: [Tutor] Please help, the program is not behaving as I want

2011-05-17 Thread Joel Goldstick
On Tue, May 17, 2011 at 11:20 AM, I. Dooba wrote: > I'm new to programming and have decided to start with Python following the > advice of experts including Eric S. Raymond. > So far I've learnt quite a lot from this list. > > However, I've the following problem. > > The program was designed (as

Re: [Tutor] Please help, the program is not behaving as I want

2011-05-17 Thread Andre Engels
I am not able to check your code (I get an error message about the usage of urllib, but that might be a difference in Python installations); however, my first guess is that you neglected to take case into account: The page contains the text "Water", not "water", so if you input "water", halal_haram

Re: [Tutor] Please help, the program is not behaving as I want

2011-05-17 Thread Joel Goldstick
On Tue, May 17, 2011 at 11:20 AM, I. Dooba wrote: > I'm new to programming and have decided to start with Python following the > advice of experts including Eric S. Raymond. > So far I've learnt quite a lot from this list. > > However, I've the following problem. > > The program was designed (as

[Tutor] Please help, the program is not behaving as I want

2011-05-17 Thread I. Dooba
I'm new to programming and have decided to start with Python following the advice of experts including Eric S. Raymond. So far I've learnt quite a lot from this list. However, I've the following problem. The program was designed (as part of my practice with Head First Programming) to check whethe

[Tutor] please help me

2010-01-31 Thread Luke Paireepinart
rogram. (P.S. Sorry for the top-post, I'm not sure how to reply in-line to a forwarded message.) -- Forwarded message -- From: invincible patriot Date: Sun, Jan 31, 2010 at 4:05 AM Subject: RE: [Tutor] please help me To: rabidpoob...@gmail.com m sorry but i am not asking

Re: [Tutor] please help me

2010-01-30 Thread Luke Paireepinart
[snip homework] > > > please help me > > This is a tutor mailing list. Tutor means we will help you learn, not that we will write your homework assignments for you for free. That is the opposite of learning. Try all of the programs. Give us what you have tried and what didn't work, why you tho

[Tutor] please help me

2010-01-30 Thread invincible patriot
hii am stuck in these questions can someone please help me in solving and writing programme for these tasks please help me 1 1.1 Write a Python program with a loop that prints out a sequence of numbers as follows:151311...31-1 1.2 Write a small Python program that generates the list of all

Re: [Tutor] please help me

2009-06-18 Thread Emile van Sebille
On 6/18/2009 1:30 AM suzee Eslam said... to every one help me please .. i need the code to do chatting by python in mobiles over bluetooth technology .. i need it please if any one know it send it to me as soon as possible.. thanks for all. Maybe this will get you started... http://www.mobi

[Tutor] please help me

2009-06-18 Thread suzee Eslam
to every one help me please .. i need the code to do chatting by python in mobiles over bluetooth technology .. i need it please if any one know it send it to me as soon as possible.. thanks for all. ___ Tutor maillist - Tutor@python.org http:/

Re: [Tutor] please help with sqlite replace function

2008-11-07 Thread Alan Gauld
"aivars" <[EMAIL PROTECTED]> wrote Please try what sqlite3.version shows on your machine? I also have ActiveState's python (mainly for its very good doc) and I get: >>> import sqlite3 sqlite3.sqlite_version '3.3.4' Me too with Python 2.5.1 from Activestate. Alan G __

Re: [Tutor] please help with sqlite replace function

2008-11-07 Thread aivars
Hello, Denis, Please try what sqlite3.version shows on your machine? Thanks aivars 2008/11/7 spir <[EMAIL PROTECTED]>: > aivars a écrit : >> >> Thanks, John, >> Yes it seems you are right. The ActiveState python version I have >> installed have sqlite 2.3.2 only. I find it strange. > > I also

Re: [Tutor] please help with sqlite replace function

2008-11-07 Thread Alan Gauld
"aivars" <[EMAIL PROTECTED]> wrote Yes it seems you are right. The ActiveState python version I have installed have sqlite 2.3.2 only. I find it strange. Why? SQLite is a separate product. Python bundled the then current version in its standard distribution, but time has moved on. You have ap

Re: [Tutor] please help with sqlite replace function

2008-11-06 Thread aivars
John, just to add to my previous post. after copying sqlite3.dll (3.6.2) version into Python25\DLLs directory and running import sqlite3 dir(sqlite3) >>> sqlite3.version '2.3.2' >>> sqlite3.version_info (2, 3, 2) >>> sqlite3.sqlite_version_info (3, 6, 2) >>> sqlite3.sqlite_version '3.6.2' an

Re: [Tutor] please help with sqlite replace function

2008-11-06 Thread aivars
Thanks, John, Yes it seems you are right. The ActiveState python version I have installed have sqlite 2.3.2 only. I find it strange. I see that on a python website there is is a new version Python26 relesed. Should i go on and install Python26? I understand that I can install pure Python from pytho

Re: [Tutor] please help with sqlite replace function

2008-11-06 Thread John Fouhy
2008/11/7 aivars <[EMAIL PROTECTED]>: > I use python 2.5.2.2 (activestate), WinXP, sqlite version 3.6.2 Hi Aivars, I believe python has its own built-in sqlite, rather than using the version you installed independently. So it is possible that the python version of sqlite is older than 3.6.2 and

[Tutor] please help with sqlite replace function

2008-11-06 Thread aivars
Hello, I am stuck now. I have a sqlite database with a table calendar (which is an auxilary calendar table containing dates, years, months, days) >From sqlite prompt I can run the following query without any problem: SELECT replace( datums,'-','' ) FROM calendar where Y='2008' and M='5' It give

Re: [Tutor] please help with simple python CGI script

2008-10-26 Thread Steve Willoughby
aivars wrote: Hello, Lie, I renamed the directory back to Cgi-bin and the scripts are NOT working. Going back to cgi-bin it works. I also do not understand why. Aivars 2008/10/26 Lie Ryan <[EMAIL PROTECTED]>: On Sun, 26 Oct 2008 08:32:52 +, Alan Gauld wrote: "aivars" <[EMAIL PROTECTED]>

Re: [Tutor] please help with simple python CGI script

2008-10-26 Thread aivars
Hello, Lie, I renamed the directory back to Cgi-bin and the scripts are NOT working. Going back to cgi-bin it works. I also do not understand why. Aivars 2008/10/26 Lie Ryan <[EMAIL PROTECTED]>: > On Sun, 26 Oct 2008 08:32:52 +, Alan Gauld wrote: > >> "aivars" <[EMAIL PROTECTED]> wrote in mes

Re: [Tutor] please help with simple python CGI script

2008-10-26 Thread Lie Ryan
On Sun, 26 Oct 2008 08:32:52 +, Alan Gauld wrote: > "aivars" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >>I finally get the script working! >> >> I renamed the script directory from Cgi-bin to cgi-bin just as Alan >> told. > > I'm glad it worked but I confess I'm not sure w

Re: [Tutor] please help with simple python CGI script

2008-10-26 Thread Alan Gauld
"aivars" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I finally get the script working! I renamed the script directory from Cgi-bin to cgi-bin just as Alan told. I'm glad it worked but I confess I'm not sure why it worked. The interpreter was apparently finding your script OK

Re: [Tutor] please help with simple python CGI script

2008-10-26 Thread aivars
I finally get the script working! I renamed the script directory from Cgi-bin to cgi-bin just as Alan told. Many thanks to all you who responded Aivars 2008/10/26 aivars <[EMAIL PROTECTED]>: > Thanks John and Alan > > I get the following error when I run the script from IDLE: > > Traceback (mo

Re: [Tutor] please help with simple python CGI script

2008-10-25 Thread aivars
Thanks John and Alan I get the following error when I run the script from IDLE: Traceback (most recent call last): File "C:\Cgi-bin\friends1.py", line 15, in who = form['person'].value File "C:\Python25\lib\cgi.py", line 567, in __getitem__ raise KeyError, key KeyError: 'person' Ai

Re: [Tutor] please help with simple python CGI script

2008-10-25 Thread Alan Gauld
"aivars" <[EMAIL PROTECTED]> wrote still banging mu head with Wesley Chun's simple example - I'm not sure if this is significant but It gives me the following error: Traceback (most recent call last): File "C:\Cgi-bin\friends1.py", line 15, in Notice that the file path has Cgi no

Re: [Tutor] please help with simple python CGI script

2008-10-25 Thread aivars
It does not work neither as script or from command line. I will try to find the guy Wesley Chun and ask him 2008/10/25 John Pomni <[EMAIL PROTECTED]>: > Hi, > > The script does not work from command line but I guess you do not have > any problems running it as CGI? > > I like cgitb modules for deb

Re: [Tutor] please help with simple python CGI script

2008-10-24 Thread aivars
Thanks very much, Kent, So it seems that directory /cgi-bin should be a subdirectory to that directory from which the web server was started/is running. That worked and Deitel's script - getting time displayed finally worked. still banging mu head with Wesley Chun's simple example - #!C:\python2

Re: [Tutor] please help with simple python CGI script

2008-10-24 Thread Kent Johnson
On Fri, Oct 24, 2008 at 10:25 AM, aivars <[EMAIL PROTECTED]> wrote: > Hello, > > I am learning python. > > I start the python CGI server like this: > > python -m CGIHTTPServer (this syntax I saw in Wesley Chun's Core > Python Programming chapter 20.5) > > The server starts in command prompt on wind

[Tutor] please help with simple python CGI script

2008-10-24 Thread aivars
Hello, I am learning python. I start the python CGI server like this: python -m CGIHTTPServer (this syntax I saw in Wesley Chun's Core Python Programming chapter 20.5) The server starts in command prompt on windows XP by answering: Serving HTTP on 0.0.0.0 port 8000... Next I want to run this s

Re: [Tutor] please help formating

2007-05-25 Thread Kent Johnson
Just for fun, here is a parser written with pyparsing. It treats newlines as whitespace so it will work with the split data you posted. http://pyparsing.wikispaces.com/ data = '''(39577484, 39577692) [['NM_003750']] (107906, 108011) [['NM_002443']] (113426, 113750) [['NM_138634', 'NM_002443']] (1

Re: [Tutor] please help formating

2007-05-25 Thread Kent Johnson
kumar s wrote: > hi group, > > i have a data obtained from other student(over 100K) > lines that looks like this: > (39577484, 39577692) [['NM_003750']] > (107906, 108011) [['NM_002443']] > (113426, 113750) [['NM_138634', 'NM_002443']] > (106886, 106991) [['NM_138634', 'NM_002443']] > (100708, 100

Re: [Tutor] please help formating

2007-05-22 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Why does my "homework-alert" ring with this post? Andreas kumar s wrote: > hi group, > > i have a data obtained from other student(over 100K) > lines that looks like this: > (39577484, 39577692) [['NM_003750']] > (107906, 108011) [['NM_002443']] > (

[Tutor] please help formating

2007-05-22 Thread kumar s
hi group, i have a data obtained from other student(over 100K) lines that looks like this: (39577484, 39577692) [['NM_003750']] (107906, 108011) [['NM_002443']] (113426, 113750) [['NM_138634', 'NM_002443']] (106886, 106991) [['NM_138634', 'NM_002443']] (100708, 100742) [['NM_138634', 'NM_002443']]

Re: [Tutor] please help me

2007-04-13 Thread Greg Perry
Let no good deed go unpunished! -Original Message- From: Daniel Yoo Date: Friday, Apr 13, 2007 8:24 pm Subject: Re: [Tutor] please help me > If this is homework, please tell your teacher I helped - I need the > extra credit. > >Please avoid giving homework answers like t

Re: [Tutor] please help me

2007-04-13 Thread Daniel Yoo
> If this is homework, please tell your teacher I helped - I need the > extra credit. Please avoid giving homework answers like this. Rather than actually help the person, it can do harm, because it encourages a lazy attitude toward solving problems. ___

Re: [Tutor] please help me!

2007-04-12 Thread Ben Sherman
You On 4/12/07, suryo agung <[EMAIL PROTECTED]> wrote: > pleate tell me how to make > > input number=4 > result > > 1 > 22 > 333 > > > in python > please give me your answer. input_number = 4 for i in range(1,input_number + 1): print str(i) * i If this is homework, please tell your teach

Re: [Tutor] please help me!

2007-04-12 Thread Kent Johnson
suryo agung wrote: > pleate tell me how to make > > input number=4 > result > > 1 > 22 > 333 > > > in python > please give me your answer. This looks a lot like homework to me. What have you tried? What have you learned? Kent ___ Tutor maillist

[Tutor] please help me!

2007-04-12 Thread suryo agung
pleate tell me how to make input number=4 result 1 22 333 in python please give me your answer. ___ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Please help to resolve this...

2006-11-08 Thread Danny Yoo
>> def hello(): >> return "Hello World" >> >> server = SOAP.SOAPServer(("localhost", 23000)) >> server.registerFunction(hello) >> server.serve_forever() > > Have you tried running server.py? There's a glaring error in it. (Hint: SOAP > != SOAPpy) Actually, there's a much more glaring er

Re: [Tutor] Please help to resolve this...

2006-11-08 Thread Danny Yoo
> *#server.py* > import SOAPpy > > > def hello(): > return "Hello World" > > server = SOAP.SOAPServer(("localhost", 23000)) > server.registerFunction(hello) > server.serve_forever() Hi Asrarahmed, I also want to reiterate what Luke said: it does get a little irritating if we see the same

Re: [Tutor] Please help to resolve this...

2006-11-08 Thread Luke Paireepinart
Asrarahmed Kadri wrote: > Hi, Asrarahmed: You posted this exact question only 4 hours ago. Reposting questions this quickly is an abuse of the mailing list, as far as I'm concerned. If you don't wait at _minimum_ a full day, preferably at least 2, for an answer, it just irritates people and makes

Re: [Tutor] Please help to resolve this...

2006-11-08 Thread Andreas Kostyrka
* Asrarahmed Kadri <[EMAIL PROTECTED]> [061108 19:51]: > Hi, > > I have successfully installed the SOAPpy module. The version is 0.11.6 > > I am trying to run simple test program for server and cliet. The script for > server is executing without any error; but the client script is giving me Well

[Tutor] Please help to resolve this...

2006-11-08 Thread Asrarahmed Kadri
Hi,   I have successfully installed the SOAPpy module. The version is 0.11.6   I am trying to run simple test program for server and cliet. The script for server is executing without any error; but the client script is giving me the error as below. TRACEBACK:   C:\project stuff-programs>python cli

Re: [Tutor] Please help to debug this function..

2006-11-07 Thread ALAN GAULD
Reposting to the list. --- Asrarahmed Kadri <[EMAIL PROTECTED]> wrote: > > >except ValueError: > > >flag = False > > >startdate = None > > >enddate = None > > >err_msg = traceback.format_exc() > > >index =

Re: [Tutor] Please help to debug this function.. it takes a date and num. of days and returns startdate and enddate (fwd)

2006-11-06 Thread Danny Yoo
[Forwarding to Tutor; busy at the moment] -- Forwarded message -- Date: Mon, 6 Nov 2006 18:41:54 + From: Asrarahmed Kadri <[EMAIL PROTECTED]> To: Danny Yoo <[EMAIL PROTECTED]> Subject: Re: [Tutor] Please help to debug this function.. it takes a date and num.

Re: [Tutor] Please help to debug this function.. it takes a date andnum. of days and returns startdate and enddate

2006-11-06 Thread Alan Gauld
"Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote > Please test it, comment on the logic . I haven't tested it but here are some comments: > import string > import datetime > import traceback > > def dateCheck(date1,num_days): >flag = True >startdate = None >enddate = None > >if num_

  1   2   >