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

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

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

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

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

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

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

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
ertainty.IT Services Business Solutions Outsourcing ________ From: Amit Saha To: Arijit Ukil Cc: tutor@python.org Date: 03/21/2013 05:30 PM Subject: Re: [Tutor] Please Help Hi Arijit, On Thu, Mar

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",

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

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
Where do you intend the variable cash_in to come from? The system doesn't know what cash_in is beyond that you mentioned it and that makes it impossible to multiply it with dollar which is a float type. If cash_in is supposed to be an input from the user, you probably should make it an int typ

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 >

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

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

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

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

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

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

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']] > (

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

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

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_

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

2006-11-06 Thread Danny Yoo
On Mon, 6 Nov 2006, Asrarahmed Kadri wrote: > I have written a function that takes a date and an integer representing > the number of days. > > Please test it, comment on the logic . Hi Asrarahmed, You should be able to write your own tests too. You might want to look at: http://www.

Re: [Tutor] Please help!!

2006-05-21 Thread Kent Johnson
uot;Alan Gauld" <[EMAIL PROTECTED]>/ > To: /"MATATA EMMANUEL" <[EMAIL PROTECTED]>/ > CC: // > Subject: /Re: [Tutor] Please help!!/ > Date: /Sat, 20 May 2006 17:58:20 +0100/ > >[CCing back to list] > > > >&

Re: [Tutor] Please help!!

2006-05-20 Thread Alan Gauld
> Man! I was thinking that it was simple. This is a little bit hard > but will try to make sense of it as I can. OK, the way this list operates is that you try to solve it yourself. When it doesn't work you tell us what you tried to do and what went wrong. We then try to point you in the right d

Re: [Tutor] Please help!!

2006-05-20 Thread MATATA EMMANUEL
d a simple search of the string for the img >tag>may suffice.>>HTH,>>Alan Gauld>Author of the Learn to Program web site>http://www.freenetpages.co.uk/hp/alan.gauld>>>>>  From:  "Alan Gauld" <[EMAIL PROTECTED]>>>  To:  "MATATA EMMANUEL" <

Re: [Tutor] Please help!!

2006-05-20 Thread Alan Gauld
gt; > From: "Alan Gauld" <[EMAIL PROTECTED]> > To: "MATATA EMMANUEL" <[EMAIL PROTECTED]>, > Subject: Re: [Tutor] Please help!! > Date: Sat, 20 May 2006 13:15:41 +0100 > >>I'm tasked to write a Paython script which is supposed to hit a &

Re: [Tutor] Please help!!

2006-05-20 Thread Alan Gauld
> I'm tasked to write a Paython script which is supposed to hit > a web site and download a shapefile from that web site. The urllib module should do that for you but... > I don't have any clue and would like your help. What do you know? Do you understand HTML? and specifically how to create

Re: [Tutor] Please help!!

2006-05-19 Thread Bernd Prager
Hey Matata, >From the website http://www.boddie.org.uk/python/HTML.html: import urllib # Get a file-like object for the Python Web site's home page. f = urllib.urlopen("http://www.python.org";) # Read from the object, storing the page's contents in 's'. s = f.read() f.close() Hope this helps,

Re: [Tutor] Please help!!

2006-05-19 Thread Henry Finucane
On 5/19/06, MATATA EMMANUEL <[EMAIL PROTECTED]> wrote: > > > > Hi there, Hi! > > I'm tasked to write a Paython script which is supposed to hit a web site and > download a shapefile from that web site. Cool. Look at urllib in your python documentation. > I don't have any clue and Me neither :) >

Re: [Tutor] Please help with comparision in range of numbers

2005-09-16 Thread Kent Johnson
Srinivas Iyyer wrote: > I want to find such instances of jack and jill's that > fall in the same ranges and they should be in opposite > to each other. > > Truely, I always flunk and my mind gets blackedout > when I see these number ranges. I do not know how to > write : check "if a range of num

Re: [Tutor] Please help with comparision in range of numbers

2005-09-15 Thread Danny Yoo
> 1427021_s_at chr7:102786983-102794499(+) > 1452285_a_at chr7:102786983-102794499(+) > 1445553_atchr7:102848766-102910961(-) > 1420925_atchr7:102863841-102887410(+) > 1450041_a_at chr7:102863841-102887410(+) > 1447553_x_at chr7:102899711-102899

Re: [Tutor] Please help

2005-08-03 Thread Alan G
> sorry for repost. OK, since nobody respoinded I'll make a few suggestions. > I have a file (3339203 lines) that looks like this: Get it working first then worry about tuning it for the volumes later. > > (col:1)(col:2) (col:3) Is the above explanatory or part of the file? Doesn't m

Re: [Tutor] Please help

2005-08-03 Thread Allen John Schmidt, Jr.
Whoops! Had to correct it! Hey, I had a similar problem not too long ago. My data came in the first format, but I didn't need it formated like that. Here is how I would have written it: import re col=re.compile('(AD.*?)\s*$') datas=re.compile('\s*(.+?)\s+(.+?)') f1 = open('xx','r') mind={} match

Re: [Tutor] Please help

2005-08-03 Thread Allen John Schmidt, Jr.
Hey, I had a similar problem not too long ago. My data came in the first format, but I didn't need it formated like that. Here is how I would have written it: import re col=re.compile('(AD.*?)\s*$') datas=re.compile('\s*(.+?)\s+(.+?)') f1 = open('xx','r') mind={} matching='' for i in meat:

Re: [Tutor] Please Help: Hacking

2005-07-22 Thread byron
Quoting Jeremy Jones <[EMAIL PROTECTED]>: > Here you go. This should be enlightening: > > http://www.catb.org/~esr/writings/unix-koans/script-kiddie.html Hi Jeremy, That's great... Thanks for sharing the link. Byron --- This me

Re: [Tutor] Please Help: Hacking

2005-07-22 Thread Jeremy Jones
Suranga Sarukkali wrote: > Python's Great fro Hacking Right? Please tell me more like when you > tell it to a College Student (That tell's What I'm) and since I > Sort of new to Programming in Python it's going be easy if done so. > Please reply to me at your earliest convenience and by the way

Re: [Tutor] Please Help: Hacking

2005-07-22 Thread Adam Bark
How to become a hackerOn 7/17/05, Suranga Sarukkali < [EMAIL PROTECTED]> wrote: Python's Great fro Hacking Right? Please tell me more like when you tell it to a College Student (That tell's What I'm) and since I Sort of new to Programming in Python it's going be easy if done so. Please rep

Re: [Tutor] PLEASE HELP ON PYTHON

2005-07-16 Thread Alan G
Hello, > Downloaded from the Original WebSite Did you get it installed OK? I'll assume you use Windows, if another OS let us know which. Is there a Python menu in your Start->Programs menu? If you select Python GUI dows a window open called Python Shell or similar? It should contain a prompt lik

Re: [Tutor] PLEASE HELP ON PYTHON

2005-07-16 Thread Rob Andrews
On 7/15/05, Suranga Sarukkali <[EMAIL PROTECTED]> wrote: > > Hai, I (Suranga) started using Python2.4 Downloaded from the Original > WebSite www.python.org a week ago but still I have not made any good > progress on Programming and all that Tutorials available make it like hell > to get started a

Re: [Tutor] PLEASE HELP ON PYTHON

2005-07-16 Thread Brian van den Broek
Suranga Sarukkali said unto the world upon 16/07/2005 00:18: > Hai, I (Suranga) started using Python2.4 Downloaded from the > Original WebSite www.python.org a week ago but still I have not > made any good progress on Programming and all that Tutorials > available make it like hell to get started a

Re: [Tutor] please help

2005-07-10 Thread Alan G
> The line that Ive been writing (of course wrong > script): > > f1 = open('myfile','r') > stuff = f1.read().split('\n') > for i in stuff: > if i != '//': >trcode = line.split('\t')[0] >trquant = line.split('\t')[1] >print trcode+'\t'+trquant > You use i in the for loop

Re: [Tutor] please help

2005-07-10 Thread Danny Yoo
On Sun, 10 Jul 2005, Srinivas Iyyer wrote: > I have a file that looks like this: > > // > AB32456\tTransaction from India > \t 43 \t 34 > \t 34 \t 65 > \t 12 \t 35 > // [some lines cut] > What I have to do: > // > AB32456\tTransaction from India > AB32456\t 43 \t 34 >

Re: [Tutor] Please help me get started on how to program useing python 2.4!!! (fwd)

2005-03-11 Thread Danny Yoo
[Forwarding to [EMAIL PROTECTED] Sorry about the repetition.] -- Forwarded message -- Date: Fri, 11 Mar 2005 17:18:03 EST From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [Tutor] Please help me get started on how to program useing python 2.4!!! ok heres where i

Re: [Tutor] Please help me get started on how to program useing python 2.4!!! (fwd)

2005-03-11 Thread Danny Yoo
om: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [Tutor] Please help me get started on how to program useing python 2.4!!! ok i understand some of that like the = things being ture or false but i am not realy wanting to know if its = or not, i was just trying to figer out how to ma

  1   2   >