"Dick Moores" <[EMAIL PROTECTED]> wrote
> I'd like to know how to use sys.exit() to quit a program.
>
I see that you already figured that out.
You can also quit by raising SystemExit, which is
what sys.exit does... but you don't need to import sys...
> Is there a way to use it the way I want to?
"Jorge Azedo" <[EMAIL PROTECTED]> wrote
> import random
>
> def randomList(n1,n2,len):
>'''n1-n2 range of numbers, len - length of the final list
>
>Returns a list'''
Don't worry too much about writing the doc string to fit in
the IDE hint box. Think more about how it will look when
peop
Am 31.10.2006 um 08:35 schrieb shawn bright:
> hey there,
> i am trying to use a graph and chart app called matplotlib, but i
> cannot figgure out how to have it plot a simple chart over time.
> the docs say to use the function plot_date() but i cannot seem to get
> the values to agree.
> I am
shawn bright wrote:
> hey there,
> i am trying to use a graph and chart app called matplotlib, but i cannot
> figgure out how to have it plot a simple chart over time.
> the docs say to use the function plot_date() but i cannot seem to get
> the values to agree.
> I am sending datetimes to the ch
Hi,from http://docs.python.org/ref/objects.htm """Types affect almost all aspects of object behavior. Even the importance of object identity is affected in some sense: for immutable types, operations that compute new values may actually return a reference to any existing object with the same type a
ok, looks like the date2num() function on a datetime.datetime object is working. So cool.i am very new at this, so i may be back ( read probably be back ). Thanks much for the tips.i appreciate it a lot.sk
On 10/31/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
shawn bright wrote:> hey there,> i am tr
Premnath Sah wrote:
> I would like to know how i can guarantee that a new immutable object is
> infact a new object.
>
> Example:
>
> >>> a = 1
> >>> b = 1
> >>> a is b
> True
>
> is what i get. i want a and b to be two different object.
I don't think there is any way to control this for th
Hi to all,
For my Thesis project, I want to use a Genetic Algorithm to generate
multiple spatial organization solutions for Architectural projects. My
idea is that a software that does this would be useful as a rapid
prototyping tool and more important it will probably reach solutions
that a h
> Im facing a problem with SOAPpy which checks for recursive objects using
> id(obj).
>
> In my case value for 2 SOAP headers are same and iam getting a recursion
> error. if i pass different object with same value SOAPpy does not complain
> (by using str(value) and unicode(value)).
If you can inc
i am a senior in high school, my school requires me to get a mentor and interview 2 people for my senior project. i am wondering if any one would be my mentor or be willing to answer some questions. if you are interested please email me
___
Tutor maillis
On 10/31/06, Kent Johnson <[EMAIL PROTECTED]> wrote:
Premnath Sah wrote:> I would like to know how i can guarantee that a new immutable object is> infact a new object.>> Example:>> >>> a = 1> >>> b = 1
> >>> a is b> True>> is what i get. i want a and b to be two different object.I don't think th
I've got a web form with a lot of form fields. I'd like to be able to map
the form fields to an object's attributes. I'm having a little trouble
figuring out how.
I was thinking of something like this..
form = cgi.FieldStorage()
widget = Widget()
form_field_object_map = {'widget_name' : widget.
On 01/11/06, Mike Hansen <[EMAIL PROTECTED]> wrote:
> form = cgi.FieldStorage()
> widget = Widget()
>
> form_field_object_map = {'widget_name' : widget.name,
> 'alt_widget_name' : widget.alt_name,
> ...}
>
> for form_field in form_field_obje
Hi folks,
In just thought I'd mention that my web tutor has now passed
the million visitors mark. Thanks to all those on the tutor
list who have paid a visit.
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
_
Very cool! Congrats!On 10/31/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
Hi folks,In just thought I'd mention that my web tutor has now passedthe million visitors mark. Thanks to all those on the tutorlist who have paid a visit.Alan GauldAuthor of the Learn to Program web site
http://www.freenetpages
I found this simple calculator on the web:
from Tkinter import *
from math import *
###http://sunsite.uakom.sk/sunworldonline/swol-02-1998/swol-02-python.htmlBy
Cameron Laird and Kathryn Soraiz...Getting Started with Python###
def evaluate(event):
label['text'] = "Result: " + str(eval(ex
"Mike Hansen" <[EMAIL PROTECTED]> wrote
> I've got a web form with a lot of form fields. I'd like to be able
> to map
> the form fields to an object's attributes. I'm having a little
> trouble
> figuring out how.
John has answered that bit.
> There will be some fields I'll need to validate(bo
Congrats! I know that what I know about Python I learned from your
guide, so a personal thanks from me :)
Alan Gauld wrote:
> Hi folks,
>
> In just thought I'd mention that my web tutor has now passed
> the million visitors mark. Thanks to all those on the tutor
> list who have paid a visit.
Hi everyone,I'm trying to run some commands with mingw from python. However, somehow my home directory (for mingw) is being changed when I initialize tk. Here's an example:import osfrom Tkinter import Tkos.system("C:/msys/1.0/bin/sh.exe --login -i -c 'pwd' ") # just print my home directoryroot =
On Tue, 31 Oct 2006, Alan Gauld wrote:
> In just thought I'd mention that my web tutor has now passed
> the million visitors mark. Thanks to all those on the tutor
> list who have paid a visit.
I've visted that site a few times. Thanks and congratulations.
my background just disappeared it shows a black
screen like it cant find the default background. if that makes sense
I've added my own and it cant seem to find it i removed it and re added
it it doesn't seem to be working though anyone have any ideas?
___
Thanks for all your help guys, but after trying to read just bits and
pieces of the manual and not understanding a single sentence, much less
a single chapter, I decided to just put this function on hold until I
read the whole Tutorial from start to finish. I just hope it doesn't
take to long..
>From Kent >>You don't say what OS you are running but under Windows it is trivial to>>have multiple versions of Python installed, I have 2.3, 2.4 and 2.5.>>They are each in their own directories, all in the system path. I have
>>aliases called py23, py24 and py25 that let me launch the version I>>
Alan Gauld wrote:
>Hi folks,
>
>In just thought I'd mention that my web tutor has now passed
>the million visitors mark. Thanks to all those on the tutor
>list who have paid a visit.
>
>Alan Gauld
>Author of the Learn to Program web site
>http://www.freenetpages.co.uk/hp/alan.gauld
>
On 10/31/06, Danny Yoo <[EMAIL PROTECTED]> wrote:
> Im facing a problem with SOAPpy which checks for recursive objects using> id(obj).>> In my case value for 2 SOAP headers are same and iam getting a recursion> error. if i pass different object with same value SOAPpy does not complain
> (by using s
25 matches
Mail list logo