Re: [Tutor] Storing information as attributes or in a dictionary

2012-09-18 Thread Steven D'Aprano
On Tue, Sep 18, 2012 at 07:14:26AM -0700, Michiel de Hoon wrote: > Dear all, > > Suppose I have a parser that parses information stored in e.g. an XML file. You mean like the XML parsers that already come with Python? http://docs.python.org/library/markup.html http://eli.thegreenplace.net/2012/0

Re: [Tutor] stored variable :p:

2012-09-18 Thread Paradox
On 09/19/2012 09:21 AM, Lamar iVisionary wrote: Trying to write the following in Python. "Hi, my name is Bob!", .What is your name? print " Hi," + "my name is Bob!, strname= raw_input ("What is your name?") Hi ###, nice to meet you! I'm 18. How old are you? I cant figure out

Re: [Tutor] stored variable

2012-09-18 Thread Steven D'Aprano
On Tue, Sep 18, 2012 at 08:21:41PM -0500, Lamar iVisionary wrote: > I cant figure out to get the stored variable / (Name) to appear when I > respond Hi , nice to meet you. name = raw_input("Good day stranger, to whom do I have the honour of addressing? ") print "Greetings and salutations %s,

[Tutor] Border width of Canvas widget in tkinter

2012-09-18 Thread Alok Joshi
I am using Python 3.x   I am unable to remove the border in a Canvas widget with bd=0 or borderwidth=0. Can someone please explain how one can do this?   I give below my program   class Avatar(Frame):     def __init__(self,parent=None,width=100,height=100,ovalness=1,bgFrameColor='Blue',bgCanvasCo

[Tutor] Unzipping a Zip of folders that have zips within them that I'd like to unzip all at once.

2012-09-18 Thread Gregory Lund
I teach at a college and I'm trying to use Python (2.6 because I'm running my tool in ArcGIS) to unzip a .zip file that contains one folder full of student folders, each with 1 or more submissions (zipfiles) that represent student submissions to weekly lab assignments. It all starts with an origin

Re: [Tutor] Input handling?

2012-09-18 Thread Scott Yamamoto
Thanks for everything. I'll keep this in mind as I continue coding.___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Input handling?

2012-09-18 Thread eryksun
On Tue, Sep 18, 2012 at 1:23 PM, Scott Yamamoto wrote: > > 1) expect: raw_input to assign the variable to "" > 2)No output to stderr; has a loading symbol after hitting enter without input > (tried both input and raw_input) > Doesn't affect active interpreter. Only affects the screen with the run

Re: [Tutor] Input handling?

2012-09-18 Thread Scott Yamamoto
0) using mobile yahoo mail 1) expect: raw_input to assign the variable to "" 2)No output to stderr; has a loading symbol after hitting enter without input (tried both input and raw_input) Doesn't affect active interpreter. Only affects the screen with the run option. 3) def simulation():   import

Re: [Tutor] Storing information as attributes or in a dictionary

2012-09-18 Thread Oscar Benjamin
On 18 September 2012 15:14, Michiel de Hoon wrote: > Dear all, > > Suppose I have a parser that parses information stored in e.g. an XML > file. I would like to design a Python class to store the information > contained in this XML file. > > One option is to create a class like this: > > class Re

Re: [Tutor] simple random string generator

2012-09-18 Thread Matthew Dalrymple
I wanna apologize about the emails...idk y some people can't see what I was saying...I'm just using my hotmail account...I did try to bold what I was saying but I guess that converts it to HTML I appreciate u guys being patient with me and I'm sorry for any trouble that had occurred due to this

[Tutor] Storing information as attributes or in a dictionary

2012-09-18 Thread Michiel de Hoon
Dear all, Suppose I have a parser that parses information stored in e.g. an XML file. I would like to design a Python class to store the information contained in this XML file. One option is to create a class like this: class Record(object): pass and store the information in the XML file

Re: [Tutor] simple random string generator

2012-09-18 Thread eryksun
On Tue, Sep 18, 2012 at 1:24 AM, Dave Angel wrote: > On 09/18/2012 01:15 AM, Mark Lawrence wrote: >> @Matthew Dalrymple I don't know what is happening but that's at least >> two messages from you that show precisely nothing, just original >> comments from others. Anyone else seeing the same thing

Re: [Tutor] Input handling?

2012-09-18 Thread Oscar Benjamin
On Sep 18, 2012 10:02 AM, "Oscar Benjamin" wrote: > > > On Sep 18, 2012 7:14 AM, "Steven D'Aprano" wrote: > > Apologies for gmail screwing up your name. I wish I could use mutt on this machine. Oscar ___ Tutor maillist - Tutor@python.org To unsubscr

Re: [Tutor] Input handling?

2012-09-18 Thread Oscar Benjamin
On Sep 18, 2012 7:14 AM, "Steven D'Aprano" wrote: > > On Tue, Sep 18, 2012 at 12:04:22AM -0400, Dave Angel wrote: > > Somehow you managed to put your other message in its own thread, instead > > of adding to this one. > > Not all mail clients support threading, either when receiving or > sending.

Re: [Tutor] reducing a list evenly when deleting elements by index

2012-09-18 Thread Pete O'Connell
Thanks Stephen. That looks like nice clean code too! Cheers Pete On Tue, Sep 18, 2012 at 9:59 AM, Stephen Haywood < step...@averagesecurityguy.info> wrote: > Someone has already tried. https://github.com/sebleier/RDP > > > On Mon, Sep 17, 2012 at 5:50 PM, Pete O'Connell > wrote: > >> When I ha

Re: [Tutor] combining c and python

2012-09-18 Thread wesley chun
another option that no one has mentioned yet is the use of 'ctypes' with existing C libraries: http://docs.python.org/library/ctypes cheers, -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "A computer never does what you want... only what you tell it." +wesley chun : wesc