> From: David Driver gmail.com>
> I am not necessarily talking about passwords for users but about the
> password that is used for connecting to the database. In a compiled
> language you would have to look pretty hard in a dll to find where the
> password had been encoded. As you point out there
> I am not necessarily talking about passwords for users but about the
> password that is used for connecting to the database.
Hi David,
Ah, ok, I misunderstood the problem then. Hmmm... I agree with the others
who have said that this is difficult. *grin* Eventually, you'll need to
decrypt wh
-- Forwarded message --
Date: Tue, 19 Apr 2005 19:47:20 -0500
From: David Driver <[EMAIL PROTECTED]>
To: Danny Yoo <[EMAIL PROTECTED]>
Subject: Re: [Tutor] How to obfuscate a database password.
I am not necessarily talking about passwords for users but about the
password that is
Appreciate the replies. Also found this link:
http://diveintopython.org/functional_programming/dynamic_import.html
See Example 16.15.
:-) Very pythonesque! Methinks.
thanks
tj
--
Tim Johnson <[EMAIL PROTECTED]>
http://www.alaska-internet-solutions.com
__
On Apr 20, 2005, at 01:29, Danny Yoo wrote:
Is there a convention for obfuscating database passwords?
Hi David,
Most people run passwords through some sort of hashing function. That
is,
databases almost never contain passwords in the clear, but instead
store
the hashes of those passwords.
For
> > Is there a convention for obfuscating database passwords?
Hi David,
Most people run passwords through some sort of hashing function. That is,
databases almost never contain passwords in the clear, but instead store
the hashes of those passwords.
For example, I am almost positive that Amaz
* Alan Gauld <[EMAIL PROTECTED]> [050419 15:08]:
> > Is it possible to dynamically compose a module name
> > for import?
Hi Alan:
> Yes, there is a module somewhere that allows you to import a module
> programatically by passing the name as a string. Look for an import
> or module function
> Is there a convention for obfuscating database passwords?
Depends what you mean.
Do you mean encryption at the point of use?
That depends on the database.
Do you mean in your program?
That usually means unobfuscating it before use and its still
vulnerable to interception.
Do you mean whi
> Is it possible to dynamically compose a module name
> for import?
Yes, there is a module somewhere that allows you to import a module
programatically by passing the name as a string. Look for an import
or module function or module in the docs...
> Pointers to documentation or other discussion
Ok. I got in the working code to have a high score list, and it even
saves/loads one now (!!). The only problem is, clicking back from the
text window to the game window (only after you entered in your name to
go onto the high score list), closes the program. you dont get to say
y/n to another gam
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.
--
***
__import__: http://www.python.org/doc/2.4.1/lib/built-in-funcs.html
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Apr 19, 2005, at 21:22, Tim Johnson wrote:
Hello Pythonmeisters:
Is it possible to dynamically compose a module name
for import?
Pointers to documentation or other discussions would
be sufficient at this time.
thanks
Ah, metaprogramming. I must admit I can't think of a way. Or rather, I
did t
Hi,
The one thing I would try, if I understand what you're after
correctly, would be to run a exec command with the module name.
modulename = 'myModule'
exec 'import ' + modulename
Then you can access the module names as any imported module.
Cheers
Bernard
On 4/19/05, Tim Johnson <[EMAIL PR
Hello Pythonmeisters:
Is it possible to dynamically compose a module name
for import?
Pointers to documentation or other discussions would
be sufficient at this time.
thanks
--
Tim Johnson <[EMAIL PROTECTED]>
http://www.alaska-internet-solutions.com
___
> OK, but that was just your example :-) Here is some ugly quick code
> which might show you how to meet you needs:
>
> class JohnsMultiInitClass:
> def __init__(self, first, second):
> if type(first) == type(second) == str:
> self.string_init(first, second)
> i
GOTCHA!
I let you know guys how it went
Bye for now
Alberto
From: Max Noel <[EMAIL PROTECTED]>
To: "Alberto Troiano" <[EMAIL PROTECTED]>
CC: tutor@python.org, [EMAIL PROTECTED]
Subject: Re: [Tutor] TKinter and things over Linux
Date: Tue, 19 Apr 2005 20:01:31 +0100
On Apr 19, 2005, at 19:57, Al
On Apr 19, 2005, at 19:57, Alberto Troiano wrote:
Thanks Danny
I will try to do that and let you know how it went
But one question thou, does it matter the location where I gunzip the
distutil
If so where should I put it???
NOTE: It's just to be sure that I'm understanding righ
Thanks Danny
I will try to do that and let you know how it went
But one question thou, does it matter the location where I gunzip the
distutil
If so where should I put it???
NOTE: It's just to be sure that I'm understanding right the language
(ENGLISH) of the link you attached
On Tue, 19 Apr 2005 [EMAIL PROTECTED] wrote:
> hi all, while recently trying to insert some data into the following
> table:
>
> # stores unique course definitions
> CREATE TABLE adminCourses (
> ID TINYINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
> Code CHAR(6),
> Title VARCHAR(55),
> Unit
On Tue, 19 Apr 2005, Kent Johnson wrote:
> Sounds like you need to commit() the initial cursor.execute()
Yes. When we upgraded to 2.4, we had to add a commit(), so my own execute
looks like:
self.cursor.execute(this,args)
did = self.connection.affected_rows()
self.connection.commit()
return di
Gooch, John said unto the world upon 2005-04-19 10:20:
Brian,
I think in the OO world it is called Polymorphism, where you have a single
function name, but multiple definitions that are distinguished from one
another by the number of arguments, type of arguments, and sometimes (
Smalltalk ) the r
Sounds like you need to commit() the initial cursor.execute()
Kent
[EMAIL PROTECTED] wrote:
hi all, while recently trying to insert some data into the following
table:
# stores unique course definitions
CREATE TABLE adminCourses (
ID TINYINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
Code CHAR(6
hi all, while recently trying to insert some data into the following
table:
# stores unique course definitions
CREATE TABLE adminCourses (
ID TINYINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
Code CHAR(6),
Title VARCHAR(55),
Units TINYINT UNSIGNED
) TYPE = InnoDB;
I got a 1L value when I ran
> I think in the OO world it is called Polymorphism,
Nope, its called overloading. Polymorphism is where you
send the same message to diferent types of object and
get different behaviour.
> where you have a single function name, but multiple definitions
> that are distinguished from one another b
Kent and Danny,
Thanks for the help. The trick was to put the .read() at the end of the
urllib2 line. It makes some sense now but man I hate it when it is that
simple and I just can't see it.
Thanks again for the great help.
John Ertl
-Original Message-
From: Kent Johnson [mailto:[EM
On Tue, 19 Apr 2005, Ertl, John wrote:
> I have figured out a bit more. I can get the binary values from the
> service but I think they come back as a single string. How do I read
> that into an array?
Hi John,
> The code below will read the first number into the array and print it
> out bu
Ertl, John wrote:
All,
I have figured out a bit more. I can get the binary values from the service
but I think they come back as a single string. How do I read that into an
array? The code below will read the first number into the array and print
it out but how would I read the whole thing into
On Tue, 19 Apr 2005, Alberto Troiano wrote:
> Sorry I have Mysql-python 1.20
> that's the one I can not install
> I said MySQLdb because I'm still using it for windows
> I can't install mysql-python it gives me the error i described
>
> With mysql-python does the sintax change???What should
All,
I have figured out a bit more. I can get the binary values from the service
but I think they come back as a single string. How do I read that into an
array? The code below will read the first number into the array and print
it out but how would I read the whole thing into an array...I woul
Thanks,
That does the trick. Rather than make a function, I'm likely to just
do:
if sys.version_info[:3] < (X,Y,Z):
raise RuntimeError
Jeff
-Original Message-
From: Max Noel [mailto:[EMAIL PROTECTED]
Sent: Monday, April 18, 2005 3:34 PM
To: Smith, Jeff
Cc: tutor@python.org
Subject
Ok, thanks again Greg. Although I didn't see a log file, where would it appear and what would the name be... just in case I missed it. thanks.
JeffGreg Hasseler <[EMAIL PROTECTED]> wrote:
I meant to send my first reply the list..oops. If it doesn't leave anylog file then I would suggest maybe sen
Brian,
I think in the OO world it is called Polymorphism, where you have a single
function name, but multiple definitions that are distinguished from one
another by the number of arguments, type of arguments, and sometimes (
Smalltalk ) the return type of the function.
Here are some example func
Sorry I have Mysql-python 1.20
that's the one I can not install
I said MySQLdb because I'm still using it for windows
I can't install mysql-python it gives me the error i described
With mysql-python does the sintax change???What should I import if not
MySQLdb
Thanks in advanced
Albert
On Apr 19, 2005, at 13:49, Alberto Troiano wrote:
Hi
I have another problem. It seems that I manage to solve a problem and
run into another
The problem is that now I can't install MySQLdb (MySQL database module
for Python 2.3.4)
I try to ./configure and it prints a lot of crap and then says mys
Hi
I have another problem. It seems that I manage to solve a problem and run
into another
The problem is that now I can't install MySQLdb (MySQL database module for
Python 2.3.4)
I try to ./configure and it prints a lot of crap and then says mysql ended
on exit 1
What can I do??
Pleas
> Well I was reading too fast (as usual) - you wanted to print 'yes'
> only if 5 is not in a sub list but you want to look in all the sub
> lists and yet print 'yes' only once???
Oops, me too, so in that case
> So in long hand lets reverse the logic and make sure we print 'yes'
> only once
>
> *Ron A* /Wed Jan 7 18:41:15 EST 2004/
>
> I'm experimenting and would like 'yes' to be printed only if 5 is
not in
> the list, but I want to look in each list. This prints out two
yeses.
> How do I get it to print just one 'yes'?
>
> x = [[1,2,3],[2,4,6],[8,4,5,6],[9,8,7]]
>
> for num in x:
>
Hi,
I've slightly modified the for-Loop containing the "else" and not the if:
>>> x = [[1,2,3],[2,4,6],[8,4,5,6],[9,8,7]]
>>> for num in x:
... if 5 in num:
... break
... else:
... print "YES"
...
>>>
second test:
>>> x = [[1,2,3],[2,4,6],[8,4,6],[9,8,7]]
>>> for num in
> def square(y):
>return y * y
>
> for x in range(1, 11):
>print square(x),
>
> print
>
> Well, I understood the code above. My question is: Is
> it really necessary I have the last "print" statment
No, it just creates a blank line which makes it easier to separate
the output of the pr
40 matches
Mail list logo