[Tutor] hi

2005-01-10 Thread Gopinath V, ASDC Chennai
Title: hi Hi   Can  any1 please tell me how do i open an editor in python running in linux os -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 11, 2005 11:37 AM To: [EMAIL PROTECTED] Subject: Welcome to the "Tutor" mailing list (Digest m

Re: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Alan Gauld
> I just wanted to let everyone know a detail about Jython. It is not > in > fact an interpreter written in Java it is a dynamic Python to > JavaByteCode compiler. Its several things, it includes jythonc (note the last letter) which is a JVM compiler. But jython is also a full implementation of

Re: [Tutor] My best GUI app so far.

2005-01-10 Thread Jacob S.
Great! I took the improvements you gave me an added support for keys (So you can type in 1.25+2= instead of having to type the buttons.) As always, I encourage improvements to my code. Maybe that will be my disclaimer... I have always liked and wanted to adopt Liam's. Oh, by the way, I'm not tryin

Re: [Tutor] My best GUI app so far.

2005-01-10 Thread Jacob S.
> - How about some white space! Yikes, you trying to make me go blind? Ahh. That's definitely a odd preference of mine. > - You don't actually need to save all the buttons to attributes. Great idea! > - Much of the button creation is common - I made a button creating function and call that. I

Re: [Tutor] My best GUI app so far.

2005-01-10 Thread Kent Johnson
My suggestions: - How about some white space! Yikes, you trying to make me go blind? - You don't actually need to save all the buttons to attributes. - Much of the button creation is common - I made a button creating function and call that. Copy / paste is not your friend, it is a danger! Refact

Re: [Tutor] My best GUI app so far.

2005-01-10 Thread jfouhy
Quoting "Jacob S." <[EMAIL PROTECTED]>: > Is there some way that I could loop over those button definitions? You could try something like this: defArgs = { 'width':4, 'height':3 } # Format: ( label, callback, grid_row, grid_column ) buttons = [ ('0', s

Re: [Tutor] More and more OT - Python/Java

2005-01-10 Thread Max Noel
dom4j? What is it? Is it part of the standard Java distribution? If not, where can it be found? Update: Okay, looks like it's time to go to bed. The link was in bright blue and somehow I didn't see it. D'oh. -- Max maxnoel_fr at yahoo dot fr -- ICQ #85274019 "Look at you hacker... A pathetic c

[Tutor] My best GUI app so far.

2005-01-10 Thread Jacob S.
Here's the code. If you have time, look it over and give me suggestions for improvement! (big toothy grin) ### Start of Calculator.py ### from __future__ import division from Tkinter import * class Application(Frame): def ctb(self): if self.shouldblank: self.distext.set(''

Re: [Tutor] More and more OT - Python/Java

2005-01-10 Thread Max Noel
On Jan 11, 2005, at 01:38, Kent Johnson wrote: Max Noel wrote: A good follow-up to that would be McMillan & Wiggleswrorth's "Java Programming - Advanced Topics", through which I'm currently reading. It has some really good stuff, including things about XML parsing with SAX and DOM... I m

[Tutor] need to hide process

2005-01-10 Thread Paul Tremblay
I am trying to hide a process from a python script and don't know if I can do so. The process is a pax command, and my unsucesful code is below. I am trying to read from a pax archive (similar to a tar archive) to get a list of files. As long as the pax archive is valid, the code below works fine

Re: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Jacob S.
> *sigh* I have no net at home at moment, which is very frustrating when > I want to d/l documentation & editors. For the mo, it's all Notepad. > Ick. Call me stupid or whatever, but how do you send and receive mail to this list? Maybe someone on the list could send you Eclipse as an attachment ma

Re: [Tutor] More and more OT - Python/Java

2005-01-10 Thread Kent Johnson
Max Noel wrote: A good follow-up to that would be McMillan & Wiggleswrorth's "Java Programming - Advanced Topics", through which I'm currently reading. It has some really good stuff, including things about XML parsing with SAX and DOM... I may actually be about to understand how to use S

Re: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Kent Johnson
Chad Crabtree wrote: I just wanted to let everyone know a detail about Jython. It is not in fact an interpreter written in Java it is a dynamic Python to JavaByteCode compiler. At least that's how I understand this document. http://www.jython.org/applets/issues.html I found this interesting a

Re: [Tutor] Is there a way to force update the screen in tkinter?

2005-01-10 Thread Danny Yoo
On Mon, 10 Jan 2005, R. Alan Monroe wrote: > I don't have the code here at home, but today I tried my first > experiments in Tkinter. I set up a button that fired off a function to > resize a rectangle in a canvas, with a for loop. Only problem is that > the screen isn't repainted in all the ste

[Tutor] Is there a way to force update the screen in tkinter?

2005-01-10 Thread R. Alan Monroe
I don't have the code here at home, but today I tried my first experiments in Tkinter. I set up a button that fired off a function to resize a rectangle in a canvas, with a for loop. Only problem is that the screen isn't repainted in all the steps of the for loop - only at the very end, when the re

Re: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Danny Yoo
On Tue, 11 Jan 2005, Liam Clarke wrote: > > > (Why can't a non-static method comparison be called from a static > > > reference? What does that mean anyway? > > > > Er... What was your code like? (before and after correcting > > the error) Hi Liam, It's actually easier to see the reas

Fwd: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Max Noel
(*bangs head on keyboard* gah, I clicked Reply instead of Reply to All again -- sorry!) Begin forwarded message: From: Max Noel <[EMAIL PROTECTED]> Date: January 11, 2005 00:09:11 GMT To: "Alan Gauld" <[EMAIL PROTECTED]> Subject: Re: [Tutor] Slightly OT - Python/Java On Jan 10, 2005, at 20:04, Al

Re: [Tutor] More and more OT - Python/Java

2005-01-10 Thread Max Noel
On Jan 10, 2005, at 22:00, Liam Clarke wrote: Hehe, I'm not up to collections yet... working through Learning Java by O'Reilly. If you already know a bit about OOP, I would recommend that you read bruce Eckel's "Thinking in Java". An excellent book, freely available on-line (do a quick Google se

Re: [Tutor] CGI problem

2005-01-10 Thread Patric Michael
Hi David... You need to explicitly name your form element to "inputkey" to make your current code work correctly. ( Based on what you have shown below.) Or, to make the code correct, change "inputkey" to "language". Remember that the name in each form element becomes the key in the key/value

[Tutor] CGI problem

2005-01-10 Thread David Holland
I am trying to write a CGI program here is the code of the HTML ALL Bromley Lewisham Here is the python #!/usr/bin/env python boroughdict = { 'BROMLEY': 0.5, 'LEWISHAM':0.1 } class dummy:#mocked up input o

Re: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Liam Clarke
On Mon, 10 Jan 2005 01:33:39 +, Max Noel <[EMAIL PROTECTED]> wrote: > > > (Also very frustrating is having lists that can be comprised only of > > one variable type.) > > First things first: don't use lists/arrays. Use Collections instead > (classes like ArrayList, HashMap, etc.). The

Re: [Tutor] Something is wrong in file input output functions.

2005-01-10 Thread Michael Powe
On Mon, Jan 10, 2005 at 12:15:18PM -0800, kumar s wrote: > Dear group, > I have written a small piece of code that takes a file > and selects the columns that I am interested in and > checks the value of the column on a condition (value > that eqauls 25) and then write it the to another file. > >

[Tutor] Something is wrong in file input output functions.

2005-01-10 Thread kumar s
Dear group, I have written a small piece of code that takes a file and selects the columns that I am interested in and checks the value of the column on a condition (value that eqauls 25) and then write it the to another file. Code: import sys from string import split import string print "enter

Re: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Alan Gauld
> ...on Java ... > quite like, much superior to C++, although it does lack the elegance of > Python and Ruby. Superior is a relative term. Java has lots of huge restrictions compared to C++ - the lack of operator overloading being maybe the biggest, since it prevents true sub typing of builtins an

Re: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Chad Crabtree
I just wanted to let everyone know a detail about Jython. It is not in fact an interpreter written in Java it is a dynamic Python to JavaByteCode compiler. At least that's how I understand this document. http://www.jython.org/applets/issues.html I found this interesting and I thought you all

Re: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Alan Gauld
> Actually, I have the Intel assembler manuals at home, haven't even > looked at 'em. If we're going for speed... Actually modern C compilers usually mean that well written C can outperform even assembler, to write good assembler is just so hard that very few people can outsmart a good comiler..

Re: [Tutor] Modifying game of life

2005-01-10 Thread Kent Johnson
if randval > perc: EMPTY <= you don't need the lines like this, they don't do anything return EMPTY And you can test for less-than-or-equal in one test elif randval <= perc: return PERSON in fact since one of the tests has to be true you can just use else:

RE: [Tutor] Modifying game of life

2005-01-10 Thread Kooser, Ara S
Kent and Max. Thank you very much. It works fine now. Ara perc = raw_input("Please enter a threshold between 0-1. ") perc = float(perc) def percolation(perc): randval = random.random() print randval PERSON, EMPTY = '*', '.' if randval > perc: EMPTY return EMPT

Re: [Tutor] Making Windows Text Editors Compile and Run Python

2005-01-10 Thread Kent Johnson
I use TextPad for Python and Jython development. There is a Python syntax highlighter available on the TextPad web site you may be interested in. It's pretty easy to create a new tool in TextPad to run the current window. Here is a summary of my setup: In TextPad preferences, create a new tool. G

Re: [Tutor] Modifying game of life

2005-01-10 Thread Kent Johnson
Kooser, Ara S wrote: I was trying to modify the Game of Life to a percolation model (you can pick what the probability of each point being occupied). I wrote the def for the percolation however when I print the world all I get is NONE NONE NONE NONE Etc... I know my problem is in the line world

Re: [Tutor] Input to python executable code and design question

2005-01-10 Thread Danny Yoo
> >To help you out. You need some sort of error checking to be sure that > >within your given range you won't get something like a math domain > >error. > > > > > Yes, I thought that: > try: > #function > exception: > pass Hi Ismael, Python's keyword for exception handling is 'except'

Re: [Tutor] Modifying game of life

2005-01-10 Thread Max Noel
On Jan 10, 2005, at 17:53, Kooser, Ara S wrote: Does anyone have an suggestions, explanations, websites? Thanks. Ara import random perc = raw_input("Please enter a threshold between 0-1. ") raw_input("Press return to make a world") PERSON, EMPTY = '*', '.' def percolation(perc): randval = ran

[Tutor] Modifying game of life

2005-01-10 Thread Kooser, Ara S
I was trying to modify the Game of Life to a percolation model (you can pick what the probability of each point being occupied). I wrote the def for the percolation however when I print the world all I get is NONE NONE NONE NONE Etc... I know my problem is in the line world[i, j] = percolation(

[Tutor] Making Windows Text Editors Compile and Run Python

2005-01-10 Thread james . homme
Hi, Idol is not an option for me since it does not work with my screen reader. I am trying to use Notetab and Textpad to compile and run Python. Does anyone have directions for either program to do this? Thanks. Jim James D Homme, Information Design + Development Highmark Inc. [EMAIL PROTEC

Re: [Tutor] Input to python executable code and design question

2005-01-10 Thread Chad Crabtree
Ismael Garrido wrote: > [EMAIL PROTECTED] wrote: > >> Quoting Ismael Garrido <[EMAIL PROTECTED]>: >> >> >> >>> I am trying to make a program that will plot functions. For that, I >>> need >>> to be able to get an input (the function to be plotted) and execute it. >>> > > > > > >So you want the

RE: [Tutor] import question (solved)

2005-01-10 Thread Ryan Davis
The problem was with how I was starting the interpreter. The sys.path didn't have all the needed folders. I was running my scripts in xemacs, using C-c C-c to re-run my script after making a change. The problem turned out to be I wasn't using the package names in the import statements. Once I

Re: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Kent Johnson
Liam Clarke wrote: No, its allegedly for reliability reasons - if it compiles then you should never get a runtime eror due to the wrong kind of object being passed. I used to believe passionately in that principle, now, after using Python I'm not so convinced it matters as much as I thought. THe ty

Re: [Tutor] Slightly OT - Python/Java

2005-01-10 Thread Max Noel
On Jan 10, 2005, at 00:18, Liam Clarke wrote: Hi all, I've been forcing myself to learn Java, and I was wondering if anyone's used Jython. To clarify - Jython generates Java bytecode? I've also learnt Java in roughly 1 week last autumn, because that's what's used at the University of Leeds. All i

Re: [Tutor] German Tutorials auf Deutsch

2005-01-10 Thread Gregor Lingl
Hallo Michael - und alle! Hello Mike - and all! You can find several links to Python ressources for beginners in German on the website http://python4kids.net (or http://www.rg16.asn-wien.ac.at/~python/ ) (Du kannst mehrere Links zu deutschen Python-Einführungen auf oben erwähnter Website finden.) M

Re: [Tutor] Hi. Is there another mailing list like this one?

2005-01-10 Thread Pierre Barbier de Reuille
If you're "bored" you can try the newsgroup comp.lang.python ... there's huge lot more questions ! Yet, this forum is dedicated to beginner, the newsgroup not ! Pierre Jacob S. a écrit : The subject line says it all... Okay I'll add some. I'm am bored and people are not asking enough questions/a