Re: [Tutor] mod_python

2007-01-02 Thread Luke Paireepinart
Jalil wrote: > I was just wondering if anyone know of a any good site with examples > of mod_python tutorial. > the mod_python manual assume isnt really that helpful. I have been learning mod_python recently and I found the manual to be quite good... what are you having problems with specifically

Re: [Tutor] Starting python from a DOS prompt from any directory?

2007-01-02 Thread Daniel McQuay
On 1/1/07, Alan Gauld <[EMAIL PROTECTED]> wrote: "Bob Gailer" <[EMAIL PROTECTED]> wrote >> Sure I understand that, but it looks from your post that >> you have somehow managed to install Python. > As I recall Steve said at the beginning that he ran Python from a > network drive. Nope, he said

Re: [Tutor] SPE - Stani's Python Editor ?

2007-01-02 Thread Chris Hengge
I've recently started playing with Eclipse and the two PyDev plugin's over the holidays. I'm seriously liking it... but my likes are more closely related to Visual Studio as an editor, so this is like the perfect environment for me.. http://www.showmedo.com/videos/series?name=PyDevEclipseList Th

[Tutor] mod_python

2007-01-02 Thread Jalil
I was just wondering if anyone know of a any good site with examples of mod_python tutorial. the mod_python manual assume isnt really that helpful. thanks ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] simple animation

2007-01-02 Thread Ketan Maheshwari
That helps. Thanks. Kent Johnson wrote: > Ketan Maheshwari wrote: >> Hi All >> >> I want to create a simple animation on a 2D cartesian plane, wherein >> there are 2 identical circles drawn at an arbitrary distance with >> each other. > > Here is a simple animation written in Tkinter that might

Re: [Tutor] simple animation

2007-01-02 Thread Kent Johnson
Ketan Maheshwari wrote: > Hi All > > I want to create a simple animation on a 2D cartesian plane, wherein > there are 2 identical circles drawn at an arbitrary distance with each > other. Here is a simple animation written in Tkinter that might get you started: http://effbot.org/zone/tkinter-a

Re: [Tutor] simple animation

2007-01-02 Thread Christopher Arndt
Ketan Maheshwari schrieb: > Is it possible to show this scenario as an animation sequence and > capturing the coordinates of the centers of the circles at each step and > stopping the iteration when they get tangential. Have a look at the PyGame library: http://pygame.org Don't be put off be th

[Tutor] simple animation

2007-01-02 Thread Ketan Maheshwari
Hi All I want to create a simple animation on a 2D cartesian plane, wherein there are 2 identical circles drawn at an arbitrary distance with each other. Now the idea is to move the circles randomly with a fixed step size and check the distance between their centers. this uses the formula d=sqr

Re: [Tutor] Need help with rewriting script to use Decimal module

2007-01-02 Thread Terry Carroll
On Tue, 2 Jan 2007, Terry Carroll wrote: > Dick, if your goal is to have a routine to get the fraction with the least > possible error (as opposed to learing how to use Decimal), have a look at > this recipe from the Python Cookbook: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/

Re: [Tutor] basic python question/getting values

2007-01-02 Thread Carroll, Barry
Joe: See below: > -Original Message- > Date: Tue, 2 Jan 2007 19:16:33 + (UTC) > From: Joe M <[EMAIL PROTECTED]> > Subject: [Tutor] basic python question/getting values > To: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Re: [Tutor] Need help with rewriting script to use Decimal module

2007-01-02 Thread Terry Carroll
On Mon, 1 Jan 2007, Dick Moores wrote: > bestFracForMinimumError() is only a small part of a program I wrote > long ago, called frac.py Dick, if your goal is to have a routine to get the fraction with the least possible error (as opposed to learing how to use Decimal), have a look at this rec

Re: [Tutor] python cx_Oracle.LOB

2007-01-02 Thread Jalil
Thanks Jason, here is my code import cx_Oracle db = cx_Oracle.connect('xx','x','') cursor=db.cursor() #cursor.execute('set long 5000') #sqlen="""set long 5000""" #cursor.execute(sqlen) sqtext="""select TExt from sq_updates where action_id= '851151'""" cursor.execute(sqtext) rettext

Re: [Tutor] python cx_Oracle.LOB

2007-01-02 Thread Jason Massey
An example of your code would help. According to the cx_oracle docs at http://www.python.net/crew/atuining/cx_Oracle/html/index.html under the LOB Objects heading: 6. LOB Objects *NOTE*: This object is an extension the DB API. It is returned whenever Oracle CLOB, BLOB and BFILE columns are fetch

Re: [Tutor] basic python question/getting values

2007-01-02 Thread Joe M
Thanks. I appreciate the quick response. I am going to kick myself for this one ;) On Tue, 2 Jan 2007, Asrarahmed Kadri wrote: > Date: Tue, 2 Jan 2007 19:38:04 + > From: Asrarahmed Kadri <[EMAIL PROTECTED]> > To: Joe M <[EMAIL PROTECTED]> > Subject: Re: [Tutor] basic python question/getting

Re: [Tutor] Encoding and Decoding

2007-01-02 Thread Carlos
Kent, Will give this a try. Thanks for your help, Carlos Kent Johnson wrote: > OK, off the top of my head (not tested) here are some things to get > you started. > > You could write a function that would retrieve a coordinate value > given an index number, for example: > def getCoord(data, i

Re: [Tutor] basic python question/getting values

2007-01-02 Thread Kent Johnson
Joe M wrote: > I have a few scripts that will return a value ie here I am testing to see > if a database is alive (script is called dbping.py): > > def db_alive(): > dbRunning = '0' > try: > con = pg.connect(dbname='xxx', host='localhost', user > ='xxx',port = xxx) >

[Tutor] python cx_Oracle.LOB

2007-01-02 Thread Jalil
I am trying to fetch a CLOB datatype with with cx_Oracle and I can seem to get it to work. I was able to fetch the text from the db with sql commands but i can fetch in a python code. I get this output. [(,)] when I run my code. any way to find out how to go around this? __

[Tutor] basic python question/getting values

2007-01-02 Thread Joe M
I apologize in advanced as I know this is basic information, but I cannot seem to figure it. I have a few scripts that will return a value ie here I am testing to see if a database is alive (script is called dbping.py): def db_alive(): dbRunning = '0' try: con =

Re: [Tutor] Encoding and Decoding

2007-01-02 Thread Kent Johnson
Carlos wrote: > Hi Kent, > > I have yet to get into OO, and the GA that I'm using was done in this > way, so I can't mess with it that much. So for now yes, the list has to > be a flat element containing all this info. > > I have been reading about OO lately and a element class seems to be a >

Re: [Tutor] Encoding and Decoding

2007-01-02 Thread Carlos
Hi Kent, I have yet to get into OO, and the GA that I'm using was done in this way, so I can't mess with it that much. So for now yes, the list has to be a flat element containing all this info. I have been reading about OO lately and a element class seems to be a good idea, I'm working on it

Re: [Tutor] Encoding and Decoding

2007-01-02 Thread Kent Johnson
Carlos wrote: > The genetic algorithm that Im using (GA) generates solutions for a given > problem, expressed in a list, this list is composed by integers. Every > element in the list takes 8 integers, is a little messy but this is because > > List [0] = Tens X position > List [1] = Units X pos

Re: [Tutor] Need help with rewriting script to use Decimal module

2007-01-02 Thread Kent Johnson
Dick Moores wrote: > from decimal import Decimal as D > > def bestFracForMinimumError(decimal, minimumError): > denom = 0 > while True: > denom += 1 > num = round(D(str(decimal)) * D(str(denom))) > error = abs(str((str(D(num) / D(str(denom))) - This looks back

[Tutor] Encoding and Decoding

2007-01-02 Thread Carlos
Hello, I have been having problems to solve a situation in which I need to encode and decode information, hope that someone can give me a hand. The solution for this problem has gone thru many iterations, but I recently found that the long (for me) is the only one. As you might remember Im wor

Re: [Tutor] Need help with rewriting script to use Decimal module

2007-01-02 Thread Dick Moores
from decimal import Decimal as D def bestFracForMinimumError(decimal, minimumError): denom = 0 while True: denom += 1 num = round(D(str(decimal)) * D(str(denom))) error = abs(str((str(D(num) / D(str(denom))) - D(str(decimal))) / str(D(str(decimal)) * d("100"))

Re: [Tutor] Starting python from a DOS prompt from any directory?

2007-01-02 Thread Steve Oldner
Sorry for the delay, and the confusion. C and D are the local PC dir, where C has the network and mandatory programs installed. D is my working DIR. SO PYTHON is installed locally for me. From: [EMAIL PROTECTED] on behalf of Bob Gailer Sent: Mon 1/1/2007 4

Re: [Tutor] Starting python from a DOS prompt from any directory?

2007-01-02 Thread Mark Wilkinson
I think this will answer your question: http://www.python.org/doc/faq/windows.html#how-do-i-run-a-python-program -under-windows Mark This email and any attachment may contain confidential, privileged information for the sole use of the intended recipient. If you are not the intended recipien