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
> 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
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
> - 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
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
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
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
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(''
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
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
> *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
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
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
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
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
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
(*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
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
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
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
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
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.
>
>
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
> ...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
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
> 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..
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:
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
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
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
> >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'
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
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(
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
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
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
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
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
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
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
40 matches
Mail list logo