Re: [Tutor] How do I fix the following error? Code and error message supplied.

2005-08-03 Thread Nathan Pinno
Hey Danny and all, Alan's tutorial did help me, and showed me how to correctly load a file upon entry, and save upon exit. It should be smooth sailing from here on it. Thank again, Nathan --- Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc:

Re: [Tutor] Web Browser in Python

2005-08-03 Thread Shitiz Bansal
Hi, I actually want to create a web-browser on my own. There are so many changes i would like to see in my browser that i felt that i would be better of creating my own rather than trying to modify the existing ones.As for the size of project, I have been pursuing programming as a hobby for years

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, Nathan Pinno wrote: > I added a plus sign to show Python to add "\n" or a new line to end of > the file. Ok, better. So the plus sign was necessary in between: sitelist[site][1] and "\n" in order to glue them together into one string. Just for kicks, let's loo

Re: [Tutor] More Q's on Socket Programming

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, Joseph Quigley wrote: > decided to make a bot. But then I got an idea to make a chatting > program. It worked nicely on our home network but it had a small > problem you can't type anything and send it to the person you are > chatting with untill they reply!! Hi Joseph,

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
At least I know the basics of file I/O for here is my filereader and filewriter programs: Filereader: filename = raw_input("File name please: ") f = file(filename, "r") for line in f.readlines(): print line f.close() Filewriter: text = raw_input("Enter some text to export: ") filename = raw_i

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
I added a plus sign to show Python to add "\n" or a new line to end of the file. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor mailing list" Sent: Wednesday, August 03, 2005 8:53 PM Subject: Re: [Tutor] What's the invalid syn

Re: [Tutor] commercial use of python?

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, Jeff Peery wrote: > hello, I was wondering about the license agreement for python. if I use > python to create an application that is intended to sell commercially > for profit is that violating the agreement listed in www.opensource.com? > Or is that only for the interpreter

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, Nathan Pinno wrote: > I forgot to add that it works because commas separate it into groups so that > when the reads the file it has output, the program can split it into the > site, ID, and passcard. Hi Nathan, Ok, it's good that we're looking back, because that's not righ

Re: [Tutor] How do I fix the following error? Code and error message supplied.

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, Nathan Pinno wrote: > Traceback (most recent call last): > File "D:\Python24\password.py", line 82, in -toplevel- > load_file(sitelist,filename) > File "D:\Python24\password.py", line 51, in load_file > [site,ID,passcard] = string.split(in_line,",") > File "D:\P

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
I forgot to add that it works because commas separate it into groups so that when the reads the file it has output, the program can split it into the site, ID, and passcard. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo" <[EMAIL PROTECTED]> Cc: "Tutor maili

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
Sure, the problem was that I had forgotten a comma before the "\n". I added a comma and it came up with another error that I fixed on my own, then the current error came up. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor maili

[Tutor] commercial use of python?

2005-08-03 Thread Jeff Peery
hello, I was wondering about the license agreement for python. if I use python to create an application that is intended to sell commercially for profit is that violating the agreement listed in www.opensource.com? Or is that only for the interpreter? for example if I embed the python interpreter i

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, Nathan Pinno wrote: > See my latest message for how I fixed this error and got another in its > place. Wait, wait, before we go on: can you explain in your own words why there was something wrong, what the correction was, and why the correction works? The reason I ask is be

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Bob Gailer
At 06:21 PM 8/3/2005, Nathan Pinno wrote: Hey all,   What wrong with the following syntax?   def save_file(sitelist,filename):     out_file = open(filename,"w")     for site in sitelist.keys():     out_file.write(site+","+sitelist[site][0]+","+sitelist[site][1]"\n") sitelist[site][1]"\n" is n

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
See my latest message for how I fixed this error and got another in its place. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo" <[EMAIL PROTECTED]> Cc: "Tutor mailing list" Sent: Wednesday, August 03, 2005 7:48 PM Subject: Re: [Tutor] What's the invalid synta

[Tutor] How do I fix the following error? Code and error message supplied.

2005-08-03 Thread Nathan Pinno
Hey all,   How do I fix the following error: File to load: passcard.txt   Traceback (most recent call last):  File "D:\Python24\password.py", line 82, in -toplevel-    load_file(sitelist,filename)  File "D:\Python24\password.py", line 51, in load_file    [site,ID,passcard] = string.split(in

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
That's part of my signature. It describes who I am. - Original Message - From: Bob Gailer To: Nathan Pinno ; Tutor mailing list Sent: Wednesday, August 03, 2005 7:48 PM Subject: Re: [Tutor] What's the invalid syntax? Code supplied At 06:21 PM 8/3/2005, Nath

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
I'm running Windows XP Home, but Albertito tried the same code on XP Pro, and got the same response. - Original Message - From: "Kristian Zoerhoff" <[EMAIL PROTECTED]> To: Sent: Wednesday, August 03, 2005 7:42 PM Subject: Re: [Tutor] Help with file I/O. > On 8/3/05, Nathan Pinno <[EMAI

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
The only thing I see there is [0] and [1]. Should that be passcard instead? - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor mailing list" Sent: Wednesday, August 03, 2005 7:36 PM Subject: Re: [Tutor] What's the invalid syntax? C

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
Thanks Danny. Albertito and me thought there might be a bug there. I see that guess was wrong. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor" Sent: Wednesday, August 03, 2005 7:41 PM Subject: Re: [Tutor] Help with file I/O.

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Kristian Zoerhoff
On 8/3/05, Nathan Pinno <[EMAIL PROTECTED]> wrote: > The error was: > Warning: Problem with getpass. Passwords may be echoed. This sounds like a problem with your terminal. What OS are you running this on? It appears to be some variant of Windows, based on your earlier posts, but the particular ve

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, Nathan Pinno wrote: > > Warning: Problem with getpass. Passwords may be echoed. > It does indeed echo. I forgot to add that. Hi Nathan, If you're running your program under IDLE, we shouldn't expect too much: getpass depends on running under a console environment, and pro

Re: [Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, Nathan Pinno wrote: > What wrong with the following syntax? > > out_file.write(site+","+sitelist[site][0]+","+sitelist[site][1]"\n") [text cut] > It highlighted the last " if that will help any. Take a close look at the end of the line. Here, I'll underline it:

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
It does indeed echo. I forgot to add that. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Alan G" <[EMAIL PROTECTED]>; "Alberto Troiano" <[EMAIL PROTECTED]>; "Danny Yoo" <[EMAIL PROTECTED]>; "luke" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, August 03, 2005 3:42 PM Subj

[Tutor] What's the invalid syntax? Code supplied

2005-08-03 Thread Nathan Pinno
Hey all,   What wrong with the following syntax?   def save_file(sitelist,filename):    out_file = open(filename,"w")    for site in sitelist.keys():    out_file.write(site+","+sitelist[site][0]+","+sitelist[site][1]"\n")    out_file.close() It highlighted the last " if that will help an

[Tutor] removal

2005-08-03 Thread Roger Sell
Please remove from the Tutor recipient list. Thanks, Roger Sell ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] More Q's on Socket Programming

2005-08-03 Thread Alan G
> chatting with untill they reply!! I also have one computer as the > server and another as the client can I have a dedicated server > program that handles two clients instead of having a direct connect? Yes, but usually the way to do that is to have the server listening for requests and th

Re: [Tutor] CVS for Python

2005-08-03 Thread Alan G
> I meant CVS for my own Python scripts. Yep, but that's just standard CVS functionality. You set up a CVS repository and load your scripts into them using normal CVS commands. Actually I don't use CVS for this but rather the simpler RCS, upon which CVS is built. But there is nothing special a

Re: [Tutor] I need advice about which way to go.

2005-08-03 Thread Alan G
> cards = {"Ace", "Two", "Three", "Four", "Five", "Six", "Seven", > "Eight", > "Nine", "Ten", "Jack", "Queen", "King"} > card_types = {"Diamond", "Heart", "Spade", "Club"} {} means they are dictionaries but you don;t provide key:value pairs. You probably want lists here not dictionaries

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
The error was: Warning: Problem with getpass. Passwords may be echoed. My code is: #This is for a password protected program to store passwords. import getpass password = "hello" sitelist = {} def main_menu(): print "1) Add a login info card" print "2) Lookup a login info card" pri

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Alan G
> When I ran my new password program, using getpass, it warned me that > passwords might be echoed, because there was a problem with getpass. > How do I fix this? Can we see the code and error message. Otherwise we'd just be guessing... The Python error messages usually tell you as much as you

Re: [Tutor] Help with file I/O.

2005-08-03 Thread Nathan Pinno
When I ran my new password program, using getpass, it warned me that passwords might be echoed, because there was a problem with getpass. How do I fix this? - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Alberto Troiano" <[EMAIL PROTECTE

Re: [Tutor] Zope/Python web devel

2005-08-03 Thread Luis N
On 8/3/05, Jay Loden <[EMAIL PROTECTED]> wrote: > I've been considering some web projects recently, but I have some concerns > about selecting the tools I plan to use. I like Python, and I was immediately > thinking of using Zope to build on. > > However, I am concerned about performance, resource

[Tutor] More Q's on Socket Programming

2005-08-03 Thread Joseph Quigley
Hi, I changed my mind. After I got interested in socket programming I decided to make a bot. But then I got an idea to make a chatting program. It worked nicely on our home network but it had a small problem you can't type anything and send it to the person you are chatting with untill the

Re: [Tutor] I need advice about which way to go.

2005-08-03 Thread Nathan Pinno
Playertotal is for calculating the total of the player's hand. This is important, because if the player's total is greater than 21, he loses in Blackjack. B is for the second card in the player's hand and t2 was for the second card's type (i.e Heart, Diamond, Club, or Spade) - Original

Re: [Tutor] I need advice about which way to go.

2005-08-03 Thread Bob Gailer
At 11:36 AM 8/3/2005, Nathan Pinno wrote: Here is the code then: I'll throw in some suggestions. 1 - check for balanced parentheses. This has bit you before and you have several lines below with unbalanced parentheses. 2 - since Python indexes start at 0, take advantage of this. Use random.choice

Re: [Tutor] CVS for Python

2005-08-03 Thread Danny Yoo
> I meant CVS for my own Python scripts. Right now, when I make a change > to an existing script, I copy it into an "old" directory, rename with to > append the version number, and overrwrite the actual script with the new > version. This works well but sometimes is a pain to handle when multiple

Re: [Tutor] imbedding python into another program?

2005-08-03 Thread Jeff Peery
Andre, thanks for the help with this. I put it to work yesterday and it works perfectly.   was wondering if it is possible to import modules without a users having to type 'import whatever'. for example in my application I would like the user to just start operating on arrays that exist in my progr

Re: [Tutor] CVS for Python

2005-08-03 Thread Smith, Jeff
If this is a Windows box then I highly recommend CVSNT (http://www.cvsnt.com/) with TortoiseCVS (http://www.tortoisecvs.org/). I've heard good things about Subversion but haven't tried it yet and don't know how its Windows installation is. There is also a TortoiseSVN (http://www.tortoisesvn.org/)

Re: [Tutor] I've run into a jam on the exercise on file I/O

2005-08-03 Thread Nathan Pinno
Here is the latest code and error: Traceback (most recent call last): File "D:\Python24\grades.py", line 99, in -toplevel- save_grades(students,filename) File "D:\Python24\grades.py", line 51, in save_grades out_file.write(x+","+max_points[x]+"\n") TypeError: unsupported operand type(s)

Re: [Tutor] HTML/text formatting question

2005-08-03 Thread Kent Johnson
Smith, Jeff wrote: > I have a tool that outputs data in either html or text output. > > Currently I'm writing chucks like: > > if html: > print '' > print '' > print '' > print 'Differences %s: %s' % (htypestr, lbl1) > if html: You might want to consider some kind of template lib

Re: [Tutor] CVS for Python

2005-08-03 Thread Bernard Lebel
Okay sorry for not being clear. I meant CVS for my own Python scripts. Right now, when I make a change to an existing script, I copy it into an "old" directory, rename with to append the version number, and overrwrite the actual script with the new version. This works well but sometimes is a pain

Re: [Tutor] CVS for Python

2005-08-03 Thread Alan G
> Does anyone can recomment a good CVS for Python? CVS? What exactly do you want beyond the standard tool? Alan G. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] I've run into a jam on the exercise on file I/O

2005-08-03 Thread Nathan Pinno
I've been chatting with Albertito on MSN and came up with this solution: int(x), and change student into student ids, and remove #Max. Will this work, or will I need to add sequential IDs? - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Yo

Re: [Tutor] I need advice about which way to go.

2005-08-03 Thread Nathan Pinno
Here is the code then: #This is code for a blackjack game. import randomcash = 0new_cash = 100cards = {"Ace", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"}card_types = {"Diamond", "Heart", "Spade", "Club"}bet = 0playertotal = 0comp_total = 0

Re: [Tutor] I need advice about which way to go.

2005-08-03 Thread Bob Gailer
At 11:12 AM 8/3/2005, Nathan Pinno wrote: Sorry about that, I thought it was clear that n = number randomly chosen. I was thinking of if the number was a five, it would choose a card with a five on it. I don't want to have to code stuff that I have to repeat again and again. That's what classe

Re: [Tutor] CVS for Python

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, Bernard Lebel wrote: > Does anyone can recomment a good CVS for Python? Hi Bernard, I'm not quite sure I understand what you mean yet. Are you looking for a revision control system for Python? If that's what you're looking for, then CVS is one implementation of such a sy

Re: [Tutor] I need advice about which way to go.

2005-08-03 Thread Nathan Pinno
Sorry about that, I thought it was clear that n = number randomly chosen. I was thinking of if the number was a five, it would choose a card with a five on it. I don't want to have to code stuff that I have to repeat again and again. I'm not worrying about card types, I have that figured out sep

Re: [Tutor] HTML/text formatting question

2005-08-03 Thread Alan G
> if html: >print '' >print '' >print '' You can use a single print with a triple quoted string to simplify a bit. > I was wondering if there was a better way to do this with a standard > Python library. I donlt think there is one in the standard library but there is an HTML genera

[Tutor] CVS for Python

2005-08-03 Thread Bernard Lebel
Hello, Does anyone can recomment a good CVS for Python? Thanks Benrard ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Extract information from an HTML table

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, David Holland wrote: > I would like to do the following. I have an HTML document with a table > with 2 columns. I would like to write a program to join the 2 columns > together, ideally with same font etc. Ie get all the information between > and and the next and and put

Re: [Tutor] i want to build my own arabic training corpus data and use the NLTK to deal with

2005-08-03 Thread Danny Yoo
On Wed, 3 Aug 2005, enas khalil wrote: > i want to build my own arabic training corpus data and use the NLTK to > parse and make test for unkown data Hi Enas, By NLTK, I'll assume that you mean the Natural Language Toolkit at: http://nltk.sourceforge.net/ Have you gone through the introd

Re: [Tutor] substituting empty line with stuff

2005-08-03 Thread Shantanoo Mahajan
+++ Srinivas Iyyer [02-08-05 14:54 -0700]: | Hello group: | | I have a file (3339203 lines) that looks like this: | | (col:1)(col:2) (col:3) | AD134KL | X X | X X | X X | | AD144KL | Y YYY

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

[Tutor] Zope/Python web devel

2005-08-03 Thread Jay Loden
I've been considering some web projects recently, but I have some concerns about selecting the tools I plan to use. I like Python, and I was immediately thinking of using Zope to build on. However, I am concerned about performance, resource usage, and scalability. Does anyone here have any expe

Re: [Tutor] Web Browser in Python

2005-08-03 Thread Alan G
> I need to program a web browser in python.I dont have any idea of > how > to start, what i do have is time and willingness to learn. Can you explain what you have in mind? Do you actually want to create a web browser like IE or FireFox from scratch using Python? Or do you want to control your

Re: [Tutor] fourier transform

2005-08-03 Thread Jeff Peery
Hi again, is there a good reason why the output is dependant upon the sampling rate. in the example if you increase from say 64 to 128 samples the output increases by a factor of 2.   Christian Meesters <[EMAIL PROTECTED]> wrote: Hi Jeff,On 3 Aug 2005, at 02:03, Jeff Peery wrote:> hope this is more

[Tutor] HTML/text formatting question

2005-08-03 Thread Smith, Jeff
I have a tool that outputs data in either html or text output. Currently I'm writing chucks like: if html: print '' print '' print '' print 'Differences %s: %s' % (htypestr, lbl1) if html: ... This seems clunky and my next step was going to be to define generic functions

Re: [Tutor] How do I add an argument too...

2005-08-03 Thread Jay Loden
I think it was just a typo for "the python distro" that came out as "the epython distro"... On Thursday 21 July 2005 9:15 pm, Danny Yoo wrote: > On Thu, 21 Jul 2005, Joseph Quigley wrote: > > optparse.. Can I download that as a module or do I have to download > > epython? > > Hi Joseph, > > optpa

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] Deleting an entry from a dictionary

2005-08-03 Thread Smith, Jeff
Sorry about that. I missed the '0' in your statement and just read it as pop(). I guess I'm sill not used to giving pop an argument :-) Jeff -Original Message- From: Kent Johnson [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 03, 2005 10:41 AM Cc: tutor@python.org Subject: Re: [Tuto

Re: [Tutor] Deleting an entry from a dictionary

2005-08-03 Thread Kent Johnson
Smith, Jeff wrote: > Ummm...that doesn't do what I asked. > > pop is a linguistic idiom for > > (val, mylist) = (mylist[-1], mylist[0:-1]) No, actually, not quite. >From the docs: s.pop([i]) same as x = s[i]; del s[i]; return x so val = mylist.pop(0) is the same as val = mylist[0] del my

[Tutor] Extract information from an HTML table

2005-08-03 Thread David Holland
Hi All, I would like to do the following.  I have an HTML document with a table with 2 columns.I would like to write a program to join the 2 columns together, ideally with same font etc.Ie get all the information between and and the next and and put it together.  Does anyone have any idea on ho

Re: [Tutor] Deleting an entry from a dictionary

2005-08-03 Thread Jay Loden
I don't believe it does...some time ago I asked about this when I was creating a list and I wanted the opposite of list.append() - if you search "prepend to a list" you should find the responses I was sent. The only solutions Python offers that I'm aware of are to either use list.insert() at t

Re: [Tutor] Deleting an entry from a dictionary

2005-08-03 Thread Smith, Jeff
Ummm...that doesn't do what I asked. pop is a linguistic idiom for (val, mylist) = (mylist[-1], mylist[0:-1]) shift is the standard idiom for (val, mylist) = (mylist[0], mylist[1:]) but Python doesn't appear to offer this. Jeff -Original Message- From: Kent Johnson [mailto:[EMAIL PR

Re: [Tutor] Deleting an entry from a dictionary

2005-08-03 Thread Adam Bark
Oh yeah using del is better. I was typing as Danny sent his reply so I didn't realise untill after I had sent that.On 8/3/05, Smith, Jeff < [EMAIL PROTECTED]> wrote: Although that works, I kinda prefer     del meals['breakfast'] since that explicitly indicates what is going on.   Speaking of

[Tutor] Please help

2005-08-03 Thread Srinivas Iyyer
sorry for repost. Hello group: I have a file (3339203 lines) that looks like this: (col:1)(col:2) (col:3) AD134KL X X X X X X AD144KL Y Y Y Y Now I have to

Re: [Tutor] Deleting an entry from a dictionary

2005-08-03 Thread Kent Johnson
Smith, Jeff wrote: > Speaking of which, I note that there is a pop for lists but no shift. > Is there a Python idiom for this or is it just > val = mylist.shift() =>(val, mylist) = (mylist[0], mylist[1:]) > which seems a little clumsy. val = mylist.pop(0) Kent _

Re: [Tutor] Web Browser in Python

2005-08-03 Thread Kent Johnson
R. Alan Monroe wrote: >>>I need to program a web browser in python.I dont have any idea of how to >>>start, what i do have is time and willingness to learn.Could anyone direct >>>me to some suitable reference? >>>Shitiz >>> > > >>How about Grail http://grail.sourceforge.net/ ? > > > Looks neat

[Tutor] i want to build my own arabic training corpus data and use the NLTK to deal with

2005-08-03 Thread enas khalil
i want to build my own arabic training corpus data and use the NLTK to parse and make test for unkown data how can i build this file and make it available to treat with it using different NLTK classes please tell me how can i start thanks Start your day with Yahoo! - make it your home page ___

Re: [Tutor] Deleting an entry from a dictionary

2005-08-03 Thread Smith, Jeff
Title: Message Although that works, I kinda prefer     del meals['breakfast'] since that explicitly indicates what is going on.   Speaking of which, I note that there is a pop for lists but no shift.  Is there a Python idiom for this or is it just val = mylist.shift() =>    (val, mylist)

Re: [Tutor] fourier transform

2005-08-03 Thread Christian Meesters
Hi Jeff, On 3 Aug 2005, at 02:03, Jeff Peery wrote: > hope this is more clear. from the output I would expect that two > spikes appear with amplitude = 1.  [snip] > I don't understand the output amplitudes. they should all be zero > except for at one herz it should be one. not sure about the fre

Re: [Tutor] Web Browser in Python

2005-08-03 Thread R. Alan Monroe
>> I need to program a web browser in python.I dont have any idea of how to >> start, what i do have is time and willingness to learn.Could anyone direct >> me to some suitable reference? >> Shitiz >> > How about Grail http://grail.sourceforge.net/ ? Looks neat, but it doesn't run on my box: C

Re: [Tutor] Web Browser in Python

2005-08-03 Thread Luis N
On 8/3/05, Shitiz Bansal <[EMAIL PROTECTED]> wrote: > Hi, > I need to program a web browser in python.I dont have any idea of how to > start, what i do have is time and willingness to learn.Could anyone direct > me to some suitable reference? > Shitiz > How about Grail http://grail.sourceforge.

[Tutor] Web Browser in Python

2005-08-03 Thread Shitiz Bansal
Hi, I need to program a web browser in python.I dont have any idea of how to start, what i do have is time and willingness to learn.Could anyone direct me to some suitable reference? Shitiz__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam

Re: [Tutor] print a line in IDLE as bold, italics or a color

2005-08-03 Thread Victor Reijs
Hello Alan, Alan G wrote: >> Thanks for your feedback. I managed to get some color in my print in >> IDLE (or the Paint Shop Pro Script Output window): > > I'm intrigued. Does PSP now support scripting in Python? > Is that a standard feature? (I'm a Photoshop Elements user > myself...) It is p

Re: [Tutor] print a line in IDLE as bold, italics or a color

2005-08-03 Thread Alan G
> Thanks for your feedback. I managed to get some color in my print in > IDLE (or the Paint Shop Pro Script Output window): I'm intrigued. Does PSP now support scripting in Python? Is that a standard feature? (I'm a Photoshop Elements user myself...) > ### > import sys > print >> sys.stderr,'Hel

Re: [Tutor] print a line in IDLE as bold, italics or a color

2005-08-03 Thread Victor Reijs
Hello Alan, Thanks for your feedback. I managed to get some color in my print in IDLE (or the Paint Shop Pro Script Output window): ### import sys print >> sys.stderr,'Hello world' ### All the best, Victor Alan G wrote: > Is there any reason why you want to change the ouput only in IDLE? > O

Re: [Tutor] I need advice about which way to go.

2005-08-03 Thread Alan G
Hi Nathan, The problem with this problem descripton is that you have an idea clear in your own head but the rest oif us only have the words. So... > I am writing a poker game and a blackjack game. Two separate games or one game that can play both? > I was wondering which way would be Python sma

Re: [Tutor] print a line in IDLE as bold, italics or a color

2005-08-03 Thread Alan G
> Error messages in IDLE also get a color (red), so it loooks to be > standard 'IDLE'/python;-) > Also IDEL recognize keywords while typing and changes the color (to > orange), so it is quite normal in IDLE... > But now; how can user's python program use it? IDLE is written in Tkinter so it uses