[Tutor] How to obfuscate a database password.

2005-04-19 Thread David Driver
Is there a convention for obfuscating database passwords? I think that in the end there will be a script that boot-straps to zipped modules but I don't think that that is secure enough. I was thinking about asking the database lists but I think that this is more of a general question. -- ***

Re: [Tutor] How to obfuscate a database password.

2005-04-20 Thread David Driver
So I could do the folowing: Create a DB logon for each user that has permissions to just about everything. Have them log on each time. This would require an application that they could manage their passwords. I already needed an application for managing permissions within the applic

[Tutor] Building application namespaces.

2005-04-22 Thread David Driver
I have generally used python for tasks that are scripty and not appish. I have found that I don't know the language very well even though I have been scripting with it for about two years. To remedy this I am in the process of laying out a mock up for an accounting system (GL, AR, AP). This is the

Re: [Tutor] Building application namespaces.

2005-04-23 Thread David Driver
In the root script I import Common. Inside of Common's __init__.py I import the basic domain modules. Is this correct? >If I understand the setup correctly it should work. How are you importing Common? If you say >import Common >you should be able to refer to Common.sobjs. If you say >from Common

[Tutor] Name spaces again

2005-04-24 Thread David Driver
I have read the essay at and I am still having problems understanding what I need to do. Here is the structure that I am looking at: Root folder StartHere.py Common folder __init__.py sobj.py

[Tutor] Debian install problems.

2005-05-11 Thread David Driver
I don't know is this is the proper place to post this but I need some help. I am running Damn Small Linux at the moment. I enabled apt-get and adjusted the list file to use the testing branch so I could install python2.4. The apt-get went fine, I think. I didn't get and errors. When I went to inst

Re: [Tutor] Debian install problems.

2005-05-11 Thread David Driver
Thank you John and Ziyad. That is exactly what I needed to know. Thanks for the Debian resources. I didn't know that there was a list for python on Debian. On 5/11/05, John Purser <[EMAIL PROTECTED]> wrote: > David, > > If you don't get an answer here on tutor.python.org then you might want to >

[Tutor] who called the class method?

2005-06-21 Thread David Driver
Is there a way to test if a class method was called from an instance? What I am trying to do is if a method is called from the class return a commanding proxy with an mock or stub type object as the proxied object. If it is called from the instance I want to return a proxy for the instance. Does

Re: [Tutor] who called the class method?

2005-06-21 Thread David Driver
Ketn You are correct. What I will do is an instance method that calls the class method with an optional parameter. I don't know what I was thinking, I was just messing around with nested classes for the first time and kind of forgot how to program. On 6/21/05, David Driver <[EMAIL P

Re: [Tutor] who called the class method?

2005-06-21 Thread David Driver
You are right to be confused because I was as well. I was shooting for: > OR do you mean you will have an actual class method > (ie static in C++/Java speak) and want to know if the > activating message was sent to the class object or to > an instance of the class? The easiest solution was to do

[Tutor] Dict operation question.

2005-07-07 Thread David Driver
I have a function def updateit(self,**mydict): which is intended to update a dictionary self.somedict. If there are keys in mydict that are not in self.somedict I want them returned in a new dict. here is what i am doing now: errdict = dict([(a,b) for a,b in mydict.items() if not a in self.so

Re: [Tutor] Dict operation question.

2005-07-08 Thread David Driver
ast a novice's understanding. Thanks for the suggestions! I do appreciate the input. the python community is probably the best on the Internet. On 7/7/05, David Driver <[EMAIL PROTECTED]> wrote: > I have a function > ... ___ Tu

[Tutor] domain logic and avoiding setters and setters.

2005-07-11 Thread David Driver
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? class RuleViolationError(Exception): def __init__(self, msg): self.msg = msg

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

[Tutor] Decorators, I am confused.

2005-07-14 Thread David Driver
What I would like to do is something like this: class testObj(object): _rules = list() def evalRules(self): for r in _rules: r() def rule(func): if not func in func.__class__._rules: func.__class__._rules.append(func) print testis._ru

[Tutor] dictionary question

2005-07-28 Thread David Driver
The following code: print str(dict(a=1,b=2,c=-1)) print str(dict(a=1,c=-1,b=2)) print str(dict(c=-1,a=1,b=2)) print str(dict(b=2,a=1,c=-1)) print str(dict(b=2,c=-1,a=1)) print print str(dict(a=1,b=2,c=23)) print str(dict(a=1,c=23,b=2)) print str(dict(c=23,a=1,b=2)) print str(dict(b=2,a=1,c=23)) pr