Re: [Tutor] domain logic and avoiding setters and setters.

2005-07-12 Thread Alan G
> So I have been trying to figure out how to get around doing getters > and setters and still have an oo way to inherit and apply business > rules. I think you are missing the point a wee bit. The object should not allow you to access its internal data. You should not *need* to access its inter

[Tutor] Giant Calc runs, but need advice on how to make the menu repopup.

2005-07-12 Thread Nathan Pinno
It runs but now how do I make it go back to the previous menu (e.g. from Add to Calculate Menu?)   Here is the latest screenshot:   The Giant Calculator   Copyright 2005 Written and debugged by Nathan Pinno   OPTIONS MENU1) Calculate2) Shapes3) Temperature4) Formulas5) QuitWhat option would yo

Re: [Tutor] Giant Calc runs, but need advice on how to make the menu repopup.

2005-07-12 Thread Pujo Aji
you can wrap your code with while statement that check a user input received at the end of every calculation you made whether go back to main menu or not. pujo On 7/12/05, Nathan Pinno <[EMAIL PROTECTED]> wrote: > > It runs but now how do I make it go back to the previous menu (e.g. from Add >

[Tutor] OT python Licences

2005-07-12 Thread Dave S
This is a bit OT but here goes. My work wants me to write a fairly large python script to analyze some technical ASCII data files. Python and its libraries are GPL. That being the case am I right in thinking that my script would also have to be GPL and I would have to inform my employer as I hand

Re: [Tutor] OT python Licences

2005-07-12 Thread Brian van den Broek
Dave S said unto the world upon 12/07/2005 05:49: > This is a bit OT but here goes. > > My work wants me to write a fairly large python script to analyze some > technical ASCII data files. Python and its libraries are GPL. > > That being the case am I right in thinking that my script would also >

Re: [Tutor] OT python Licences

2005-07-12 Thread Kent Johnson
Dave S wrote: > This is a bit OT but here goes. > > My work wants me to write a fairly large python script to analyze some > technical ASCII data files. Python and its libraries are GPL. > > That being the case am I right in thinking that my script would also > have to be GPL and I would have to

Re: [Tutor] domain logic and avoiding setters and setters.

2005-07-12 Thread Kent Johnson
David Driver wrote: > So I have been trying to figure out how to get around doing getters > and setters and still have an oo way to inherit and apply business > rules. This is what I have some up with so far. Is there any better > way? Hmm. I'm not sure what this has to do with getters and setters

Re: [Tutor] Giant Calc runs, but need advice on how to make the menu repopup.

2005-07-12 Thread Ewald Ertl
Hi! As allready shown in your request for the "The Password Program" some day's ago, which has nearly the same problem as here. Wrap your code into loop's: why are you setting the select-Values directly in the functions defining the menu's? Why not just returning the selected value e.g.: d

[Tutor] Tkinter Q's

2005-07-12 Thread Joseph Quigley
Hi first off, here's my code: # -*- coding: utf-8 -*- from Tkinter import * import random import time import about import quotes def closeprog():     raise SystemExit class main:     root = Tk()     frame = Frame()     root.title("Quoter %s" % (about.ver))     root.minsize(300, 50)     sho

Re: [Tutor] OT python Licences

2005-07-12 Thread Byron
Dave S wrote: >That being the case am I right in thinking that my script would also >have to be GPL and I would have to inform my employer as I hand it over ? > > I don't believe so. Python prefers to encourage its developers to contribute to the general community. However, you can commercia

[Tutor] module with static global

2005-07-12 Thread János Juhász
Dear Guys! I am using a class for connecting to an sql database via odbc. It is like this: import dbi, odbc class scalaDB: def __init__(self): self.cn = odbc.odbc('DSN=scalaDB;UID=query;PWD=query;DATABASE=scalaDB') def closeDB(self): self.cn.close() de

Re: [Tutor] module with static global

2005-07-12 Thread Cedric BRINER
give an eyes to sqlobject.org. -- Cedric BRINER ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] First Project - Ping Sweeper!

2005-07-12 Thread Trent Rigsbee
Hi! I've completed Learning to Program (off the website) and I've started to play around with code that I've found on Useless Python. I'm ready to start my first project! This may be way over my head, but I want to make a ping sweeper (put a range of IP addresses & ping to see which are vaild).

Re: [Tutor] OT python Licences

2005-07-12 Thread Don Parris
On Tue, 12 Jul 2005 10:49:22 +0100 Dave S <[EMAIL PROTECTED]> wrote: > This is a bit OT but here goes. > > My work wants me to write a fairly large python script to analyze some > technical ASCII data files. Python and its libraries are GPL. > > That being the case am I right in thinking that my

Re: [Tutor] OT python Licences

2005-07-12 Thread Sandip Bhattacharya
Dave S wrote: > This is a bit OT but here goes. > > My work wants me to write a fairly large python script to analyze some > technical ASCII data files. Python and its libraries are GPL. > > That being the case am I right in thinking that my script would also > have to be GPL and I would have to

[Tutor] Storing Data Records in XML File

2005-07-12 Thread Gooch, John
I have a Python script that stores the results of the processing that it does in a database, but it has to have an alternate way of storing its data in a database-friendly way (XML)in case the database is not available ( connected down, data store full, etc. ). Any recommendations on a way to do

Re: [Tutor] Storing Data Records in XML File

2005-07-12 Thread Max Noel
On Jul 12, 2005, at 18:44, Gooch, John wrote: I have a Python script that stores the results of the processing that it does in a database, but it has to have an alternate way of storing its data in a database-friendly way (XML)in case the database is not available ( connected down, data st

Re: [Tutor] Storing Data Records in XML File

2005-07-12 Thread Danny Yoo
On Tue, 12 Jul 2005, Gooch, John wrote: > I have a Python script that stores the results of the processing that it > does in a database, but it has to have an alternate way of storing its > data in a database-friendly way (XML)in case the database is not > available ( connected down, data store

[Tutor] First Project - Ping Sweeper!

2005-07-12 Thread Python
ping uses icmp. icmp does not have port numbers. icmp is a host-to- host protocol for managing the flow of packets and reporting errors. http://en.wikipedia.org/wiki/ICMP_Echo_Request describes the outgoing "ping packet", but is probably too low-level to be useful. Port numbers are used in UDP a

Re: [Tutor] First Project - Ping Sweeper!

2005-07-12 Thread Reed L. O'Brien
Python wrote: > ping uses icmp. icmp does not have port numbers. icmp is a host-to- > host protocol for managing the flow of packets and reporting errors. > http://en.wikipedia.org/wiki/ICMP_Echo_Request > describes the outgoing "ping packet", but is probably too low-level to > be useful. > > Por

Re: [Tutor] domain logic and avoiding setters and setters.

2005-07-12 Thread David Driver
I appreciate your input. You are correct. I read a bunch of LoD stuff Northeastern website. It codified a bunch of things that I had been working through. But what you are not seeing (I must be terrible at this, always hard to tell how much code to post) is this chunk of code represents an idea ab

Re: [Tutor] domain logic and avoiding setters and setters.

2005-07-12 Thread Alan G
OK, I'll take a chance because as you say I don't know the details of what you are building. And if its a Framework for persistence, or an IDE for building persistence then get/set may be your best bet - after all that's why Java Beans have them so that Java IDEs can manipulate object properties at

Re: [Tutor] OT python Licences

2005-07-12 Thread Dave S
Many thanks for all your input, you have been great. At the moment Tkinter is a favorite, I have started reading the documentation and it seems fairly straightforward + can do what I need. Many thanks once again :-) Dave ___ Tutor maillist - Tutor@py

Re: [Tutor] Tkinter Q's

2005-07-12 Thread Michael Lange
On Mon, 11 Jul 2005 17:22:57 + Joseph Quigley <[EMAIL PROTECTED]> wrote: Hi, Joseph, > Hi first off, here's my code: > > # -*- coding: utf-8 -*- > from Tkinter import * > import random > import time > import about > import quotes > > > def closeprog(): > raise SystemExit > > class ma

[Tutor] recursion odities accross diferent versions of the 2.4.1 interpreter

2005-07-12 Thread Brian van den Broek
Hi all, I'm playing about with some recursive functions where I am getting near the recursion limit. This caused me to do a test, and I am puzzled by the different results when run in the prompt, IDLE and PythonWin. My simple test code is: >>> c = 0 >>> def recursion_test(): global c

Re: [Tutor] Tkinter Q's

2005-07-12 Thread jfouhy
Quoting Joseph Quigley <[EMAIL PROTECTED]>: > Hi first off, here's my code: > > # -*- coding: utf-8 -*- > from Tkinter import * > import random > import time > import about > import quotes > > > def closeprog(): > raise SystemExit > > class main: > root = Tk() > frame = Frame() > root.titl

[Tutor] python newbie..system call help

2005-07-12 Thread Mike Pindzola
I am writing a small program to speed up the efficiency of me on my home linux machine. I need it to communicate serveral times to the bash shell to issue and retrieve info. I took a guess and tryed the system() function call, but python quickly rejected that. Should I be even trying to make a

Re: [Tutor] python newbie..system call help

2005-07-12 Thread jfouhy
Quoting Mike Pindzola <[EMAIL PROTECTED]>: > Should I be even trying to make a system call? Is there a better way to > talk to the shell? Either way, please enlighten me. Thanks. There may be a better way to achieve what you want to do, without using the shell at all. For example, the os and os.

Re: [Tutor] python newbie..system call help

2005-07-12 Thread Mike Pindzola
Yes, I have did 'import os'. For starters I want to read the result of 'pwd' and print it out in the program for the user to see what path is being read. Also, I need to have a function to handle root access if the user does not have such privledges since I will be mounting and unmounting hardw

Re: [Tutor] python newbie..system call help

2005-07-12 Thread Mike Pindzola
I have figured many things out. system works, i just forgot to type os.system(). I have been looking into the os module and am finding alot of useful stuff. I still need to workout the best way to ask a user for a root password, show when typed and then pass it to the system... thanks for

Re: [Tutor] OT python Licences

2005-07-12 Thread Chuck Allison
Hello Sandip, Tuesday, July 12, 2005, 10:38:09 AM, you wrote: SB> Dave S wrote: >> This is a bit OT but here goes. >> >> My work wants me to write a fairly large python script to analyze some >> technical ASCII data files. Python and its libraries are GPL. >> >> That being the case am I right i

Re: [Tutor] python newbie..system call help

2005-07-12 Thread Danny Yoo
On Tue, 12 Jul 2005, Mike Pindzola wrote: > I have figured many things out. system works, i just forgot to type > os.system(). I have been looking into the os module and am finding alot > of useful stuff. I still need to workout the best way to ask a user for > a root password, show when ty