Re: [Tutor] user-given variable names for objects

2007-12-12 Thread Luke Paireepinart
Che M wrote: > I'm sure this is a classic beginner's topic, and I've read a bit about > it online already, but I'd like to ask about it here as well. I want > to assign names to objects based on what a user inputs so that I can > later keep track of them. Yes, this comes up quite a bit. > In pa

Re: [Tutor] user-given variable names for objects

2007-12-12 Thread Alan Gauld
"Che M" <[EMAIL PROTECTED]> wrote > I'm sure this is a classic beginner's topic, Indeed it is, it comes up about once a month or more! > I want to assign names to objects based on what a > user inputs so that I can later keep track of them. This is almost never what you want to do, for pre

Re: [Tutor] Python Versions

2007-12-12 Thread Alan Gauld
"earlylight publishing" <[EMAIL PROTECTED]> wrote > Actually the first thing I noticed is the author would say something > like "you can run the program by pressing F5 Ah! Yes that would cause problems. He obviously does intend you to use an Edit window rather than a shell in that case. A great p

Re: [Tutor] Python Versions

2007-12-12 Thread Michael Langford
There are 3 big schools of "how do you program" as far as what tools you have open where. IDE Geeks: "the author" you are reading about is one if them. This means you run eclipse, idle, visual studio, kdevelop, etc, and you debug and run out of that as well if you can. This is what most primarily

Re: [Tutor] Python Versions

2007-12-12 Thread earlylight publishing
I'm a "she" not a "he". :-) But actually I don't believe I was a member of this group when I was working with the book "A Byte Of Python" I don't believe I ever described a problem with raw_input here. That concept seems pretty clear to me but as you say the OP hasn't described a specific pr

Re: [Tutor] Python Versions

2007-12-12 Thread Luis N
On Dec 13, 2007 3:38 PM, earlylight publishing <[EMAIL PROTECTED]> wrote: > Do people really write whole applications just using the shell? > The shell isn't intended for writing whole applications. However, it's invaluable for testing. For writing whole applications I'd recommend The One True Edit

Re: [Tutor] Python Versions

2007-12-12 Thread earlylight publishing
Actually the first thing I noticed is the author would say something like "you can run the program by pressing F5 or selecting "run program" from the "run" menu. Neither of those things work from the shell. Saving programs also didn't work well for me when I put them in the shell. Do people r

Re: [Tutor] python and interface duplex checks

2007-12-12 Thread Michael Langford
Python can easily run ifconfig -a itself and then move through its output. You can either parse out each string and then redisplay them. If you *really* want to rewrite ifconfig, you need to call ioctl (http://docs.python.org/lib/module-fcntl.html) and you need passing in ioctl codes such as ones

[Tutor] user-given variable names for objects

2007-12-12 Thread Che M
I'm sure this is a classic beginner's topic, and I've read a bit about it online already, but I'd like to ask about it here as well. I want to assign names to objects based on what a user inputs so that I can later keep track of them. In particular, I want to time multiple events by gett

[Tutor] python and interface duplex checks

2007-12-12 Thread Michael Langford
Most easily: If your card supports ethtool, you can just open the ethtool startup config file to check there whether or not you set it to duplex in the configuration (see if you have an ETHTOOL_OPTS env variable). If you're not sure if your card can handle duplex (or you're not sure the config fil

Re: [Tutor] python and interface duplex checks

2007-12-12 Thread Michael Langford
Most easily: If your card supports ethtool, you can just open the ethtool startup config file to check there whether or not you set it to duplex in the configuration (see if you have an ETHTOOL_OPTS env variable). If you're not sure if your card can handle duplex (or you're not sure the config fil

[Tutor] python and interface duplex checks

2007-12-12 Thread Robert Recchia
I was wondering can python can be used to check the duplex settings of a network card on a Linux os. -- Robert Recchia ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Computer Classes at Foothill

2007-12-12 Thread Elaine
Winter quarter classes start Monday, 7 January, at Foothill College. These two may be of interest to you: 1) Introduction to Python Programming Prerequisite: Any programming language experience CIS 68K - Monday evenings at Middlefield campus in Palo Alto 2) Application Software Development with A

Re: [Tutor] Parsing DICOMRT file

2007-12-12 Thread Kent Johnson
Bryan Fodness wrote: > I am trying to parse a DICOMRT file, which is a radiation therapy DICOM > file. This might be helpful - I haven't tried it, but it seems to be designed for this sort of thing: http://construct.wikispaces.com/ Also googling 'python dicom' gets quite a few hits. Kent

Re: [Tutor] Parsing DICOMRT file

2007-12-12 Thread Eric Brunson
Bryan Fodness wrote: > I am trying to parse a DICOMRT file, which is a radiation therapy > DICOM file. I'm a little late to the party, but you may want to take a look at this: http://mypage.iu.edu/~mmiller3/python/#dycom > > First, I get different outputs from the two methods below. > > f

Re: [Tutor] Parsing DICOMRT file

2007-12-12 Thread Bryan Fodness
Just downloaded it and have not had a chance to check it out. Thanks, Bryan On Dec 12, 2007 6:18 PM, Eric Brunson <[EMAIL PROTECTED]> wrote: > Bryan Fodness wrote: > > I am trying to parse a DICOMRT file, which is a radiation therapy > > DICOM file. > > I'm a little late to the party, but you ma

Re: [Tutor] Parsing DICOMRT file

2007-12-12 Thread Bryan Fodness
Thanks for the immediate response! On Dec 12, 2007 5:57 PM, John Fouhy <[EMAIL PROTECTED]> wrote: > On 13/12/2007, Bryan Fodness <[EMAIL PROTECTED]> wrote: > > I am new to doing anything like this. I have looked at > > http://www.leadtools.com/SDK/Medical/DICOM/ltdc1.htm and am > > not sure how

Re: [Tutor] Parsing DICOMRT file

2007-12-12 Thread John Fouhy
On 13/12/2007, Bryan Fodness <[EMAIL PROTECTED]> wrote: > I am new to doing anything like this. I have looked at > http://www.leadtools.com/SDK/Medical/DICOM/ltdc1.htm and am > not sure how to proceed. I haven't much experience here, but this is how I'd proceed, I think: 1. Start by reading the

Re: [Tutor] Python Versions

2007-12-12 Thread Tiger12506
The OP has not specified what his problems specifically are, but "earlylight publishing" described his problem before, and he was not understanding why the >>> prompt was expecting immediate keyboard input when he typed in raw_input(). So a noob cannot figure out why it is advantageous to have a

Re: [Tutor] Python Versions

2007-12-12 Thread Alan Gauld
"earlylight publishing" <[EMAIL PROTECTED]> wrote >I have the latest python version too when I first started "A Byte of >Python" > my code wouldn't work either. My problem was that I was programming > in the shell (the screen with the three '>>>' on it). I found when > I wrote > the examples i

Re: [Tutor] Noob question

2007-12-12 Thread Dick Moores
At 01:43 PM 12/11/2007, Dick Moores wrote: >Concatenating strings is still VERY slow in CPython 2.5.1 compared to >using join(), however. See . Code slightly modified and moved to Dick __

Re: [Tutor] Python Versions

2007-12-12 Thread Kent Johnson
Gman wrote: > Hmm how do I put this without looking completely igrint! No worries, this is a list for beginners! > I have 2.51 and have been encountering many errors > when I try to use some examples from the book "A byte of python". At first > I thought well a few minor things I will just m

Re: [Tutor] Python Versions

2007-12-12 Thread earlylight publishing
I have the latest python version too when I first started "A Byte of Python" my code wouldn't work either. My problem was that I was programming in the shell (the screen with the three '>>>' on it). I found when I wrote the examples in a new window (cntrl+N) they all worked as advertized. He

Re: [Tutor] Python Versions

2007-12-12 Thread wesley chun
> Well I have 2.51 and have been encountering many errors > when I try to use some examples from the book "A byte of python". At first > I thought well a few minor things I will just move on and try the next. > Well some work and others dont, and mind you I am only trying to get the > basics down.A

[Tutor] Python Versions

2007-12-12 Thread Gman
Hmm how do I put this without looking completely igrint! I am new to python and peck away at it every chance i get.Well I also follow the list here and remember A big todo about versions and compatibility. Well I have 2.51 and have been encountering many errors when I try to use some examples