Re: Running a Python script on a web server

2011-06-07 Thread Abhijeet Mahagaonkar
I guess i got my answer :) Thanks Regards, Abhijeet On Wed, Jun 8, 2011 at 12:01 PM, D'Arcy J.M. Cain wrote: > On Wed, 8 Jun 2011 11:22:53 +0530 > Abhijeet Mahagaonkar wrote: > > >>Python doesn't normally run in a web browser. There's two easy options: > > > > Is there an option of running it

Re: Running a Python script on a web server

2011-06-07 Thread D'Arcy J.M. Cain
On Wed, 8 Jun 2011 11:22:53 +0530 Abhijeet Mahagaonkar wrote: > >>Python doesn't normally run in a web browser. There's two easy options: > > Is there an option of running it like php? I have never written in php, but > my understanding is that the php script will be saved in some remote server >

Re: Running a Python script on a web server

2011-06-07 Thread Chris Angelico
On Wed, Jun 8, 2011 at 3:52 PM, Abhijeet Mahagaonkar wrote: >>>Python doesn't normally run in a web browser. There's two easy options: > > Is there an option of running it like php? I have never written in php, but > my understanding is that the php script will be saved in some remote server > and

Re: Running a Python script on a web server

2011-06-07 Thread Abhijeet Mahagaonkar
>>Python doesn't normally run in a web browser. There's two easy options: Is there an option of running it like php? I have never written in php, but my understanding is that the php script will be saved in some remote server and we will be able to run it using the url. pls correct me if i;m wrong

Re: Running a Python script on a web server

2011-06-07 Thread Nitin Pawar
There are few options available with mod_python + apache configuration but it comes with limitation as the scripts will be running on servers and you will need to parse the requests and inputs as a web request to the script On Wed, Jun 8, 2011 at 9:34 AM, Chris Angelico wrote: > On Wed, Jun 8

Re: How good is security via hashing

2011-06-07 Thread geremy condra
On Tue, Jun 7, 2011 at 7:30 PM, Paul Rubin wrote: > Christian Heimes writes: >> PyCrypto has a strong pseudorandom number generator, too. > > If you mean the one at pycrypto.org, that page now says: > >    Random number generation > >    Do not use RandomPool to generate random numbers. Use Crypt

Call python function from Matlab

2011-06-07 Thread nazmul.is...@gmail.com
I need to call a python function from a Matlab environment. Is it possible? Let's assume, I have the following python code: def squared(x): y = x * x return y I want to call squared(3) from Matlab workspace/code and get 9. Thanks for your feedback. Nazmul -- http://mail.python.org/mai

Re: Running a Python script on a web server

2011-06-07 Thread Chris Angelico
On Wed, Jun 8, 2011 at 1:10 PM, Abhijeet Mahagaonkar wrote: > So i have requested a server space so I need some inputs on how i will be > able to "host" these scripts on a webserver and have them run on browsers > rather than on individual systems. Python doesn't normally run in a web browser. Th

Running a Python script on a web server

2011-06-07 Thread Abhijeet Mahagaonkar
Dear Pythoners, I have written a few python tools and cant distribute as exe due to scalability issues. I started with a few tools and gave it as exe to the users and now as the number of tools have increased, they complain they have too many exes :) So i have requested a server space so I need s

Re: Dynamic Zero Padding.

2011-06-07 Thread Terry Reedy
On 6/7/2011 7:05 PM, John Posner wrote: You might want to try "new style" string formatting [1], which I think is better than the "old style" in this particular case: >>> "Testing {0:0{1}d}".format(42, 4) 'Testing 0042' >>> "Testing {0:0{1}d}".format(42, 9) 'Testing 00042'

Re: Function call arguments in stack trace?

2011-06-07 Thread Gabriel Genellina
En Tue, 07 Jun 2011 15:09:54 -0300, Dun Peal escribió: In a stack trace, is it possible to somehow get the arguments with which each function was called? So for example, if function `foo` in module `bar` was called with arguments `(1, [2])` when it raised an exception, then instead of:

Re: How good is security via hashing

2011-06-07 Thread Paul Rubin
Nobody writes: > The problem with /dev/urandom is that it shares the same entropy pool as > /dev/random, so you're "stealing" entropy which may be needed for tasks > which really need it (e.g. generating SSL/TLS keys). The most thorough analysis of Linux's /dev/*random that I know of is here:

Re: How good is security via hashing

2011-06-07 Thread Paul Rubin
Christian Heimes writes: > PyCrypto has a strong pseudorandom number generator, too. If you mean the one at pycrypto.org, that page now says: Random number generation Do not use RandomPool to generate random numbers. Use Crypto.Random instead. RandomPool is deprecated and will be re

Paramiko Threading Error

2011-06-07 Thread mud
Hi All, Does anybody know what the following error means with paramiko, and how to fix it. I don't know what is causing it and why. I have updated paramiko to version 1.7.7.1 (George) but still has the same issue. Also I can not reproduce the problem and therefore debugging is harder for me. E

Re: Dynamic Zero Padding.

2011-06-07 Thread Larry Hudson
On 06/07/2011 03:01 PM, harrismh777 wrote: Ethan Furman wrote: --> print("Testing %0*i" % (width, 1)) The '*' acts as a place holder for the width argument. very nice... It works for precision as well as width. wid = 10 prec = 3 num = 123.456789 print "%0*.*f" % (wid, prec, num) gives

Re: Generator Frustration

2011-06-07 Thread TommyVee
"Thomas Rachel" wrote in message news:isi5dk$8h1$1...@r03.glglgl.eu... Am 04.06.2011 20:27 schrieb TommyVee: I'm using the SimPy package to run simulations. Anyone who's used this package knows that the way it simulates process concurrency is through the clever use of yield statements. Some of

Re: how to avoid leading white spaces

2011-06-07 Thread Roy Smith
On 06/06/2011 08:33 AM, rusi wrote: >> Evidently for syntactic, implementation and cultural reasons, Perl >> programmers are likely to get (and then overuse) regexes faster than >> python programmers. "ru...@yahoo.com" wrote: > I don't see how the different Perl and Python cultures themselves >

Re: Dynamic Zero Padding.

2011-06-07 Thread John Posner
Friedrich: >> I would be much obliged if someone can give me some tips on how to >> achieve a variably pad a number. > :) > > ('%%0%dd' % (pads,)) % (n,) > > Probably be good to wrap it in a function. It looks kind of obscure as it > is. You might want to try "new style" string formatting [1]

pthreads in C++ with embedded Python

2011-06-07 Thread Tom Brown
Hi guys! I am trying to build a C++ application that uses pthreads and embedded python. I've simplified the problem down so that the Python code is a single class that subclasses from Queue. The main thread of the C++ application adds to the queue. A worker thread in the C++ application reads from

Re: Dynamic Zero Padding.

2011-06-07 Thread Chris Angelico
On Wed, Jun 8, 2011 at 7:43 AM, Mel wrote: > :) > > ('%%0%dd' % (pads,)) % (n,) > > Probably be good to wrap it in a function.  It looks kind of obscure as it > is. Would get rather pretty (read: ugly and impossible to read) if you wanted to put a literal percent sign in front of the number. :)

Re: virtualenv problem on win32

2011-06-07 Thread dim
Got similar things. Don't know what is the root cause but enabling distribute seems to work... c:\_work\home>virtualenv --distribute pyve\openpyxl New python executable in pyve\openpyxl\Scripts\python.exe A globally installed setuptools was found (in c:\python25\lib\site- packages) Use the --no-si

Re: How good is security via hashing

2011-06-07 Thread Christian Heimes
Am 07.06.2011 20:26, schrieb Terry Reedy: > On 6/7/2011 7:35 AM, Robin Becker wrote: > >> I guess what I'm asking is whether any sequence that's using random to >> generate random numbers is predictable if enough samples are drawn. > > Apparently so. random.random is *not* 'cryptographically secu

Re: Dynamic Zero Padding.

2011-06-07 Thread harrismh777
Ethan Furman wrote: --> print("Testing %0*i" % (width, 1)) The '*' acts as a place holder for the width argument. very nice... -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic Zero Padding.

2011-06-07 Thread MRAB
On 07/06/2011 22:36, Friedrich Clausen wrote: Hello All, I want to print some integers in a zero padded fashion, eg. : print("Testing %04i" % 1) Testing 0001 but the padding needs to be dynamic eg. sometimes %05i, %02i or some other padding amount. But I can't insert a variable into the form

Re: Dynamic Zero Padding.

2011-06-07 Thread harrismh777
Friedrich Clausen wrote: I would be much obliged if someone can give me some tips on how to achieve a variably pad a number. b='04' a="testing %"+b+"i" print(a % 1) testing 0001 kind regards, m harris -- http://mail.python.org/mailman/listinfo/python-list

RE: Dynamic Zero Padding.

2011-06-07 Thread Prasad, Ramit
Python 2.6.x >>> 'test {0:.2f}'.format(1) 'test 1.00' >>> 'test {0:{1}f}'.format(1,2) 'test 1.00' >>> 'test {0:{1}f}'.format(1,.2) 'test 1.00' >>> 'test {0:.{1}f}'.format(1,2) 'test 1.00' Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston,

Python-URL! - weekly Python news and links (Jun 7)

2011-06-07 Thread Cameron Laird
[Drafted by Gabriel Genellina.] QOTW: "'Reminds me of the catch-phrase from the first Pirates of the Caribbean movie: 'It's more of a guideline than a rule.'" - Tim Roberts, 2011-05-27, on the "mutator-methods-return-None" Announcing two maintenance releases (including security fixes): 2.5.

Re: Dynamic Zero Padding.

2011-06-07 Thread Ethan Furman
Friedrich Clausen wrote: Hello All, I want to print some integers in a zero padded fashion, eg. : print("Testing %04i" % 1) Testing 0001 but the padding needs to be dynamic eg. sometimes %05i, %02i or some other padding amount. But I can't insert a variable into the format specification to a

Re: Dynamic Zero Padding.

2011-06-07 Thread Emile van Sebille
On 6/7/2011 2:36 PM Friedrich Clausen said... Hello All, I want to print some integers in a zero padded fashion, eg. : print("Testing %04i" % 1) Testing 0001 but the padding needs to be dynamic eg. sometimes %05i, %02i or some other padding amount. But I can't insert a variable into the form

Re: Dynamic Zero Padding.

2011-06-07 Thread Mel
Friedrich Clausen wrote: > I want to print some integers in a zero padded fashion, eg. : > print("Testing %04i" % 1) > Testing 0001 > > but the padding needs to be dynamic eg. sometimes %05i, %02i or some > other padding amount. But I can't insert a variable into the format > specification t

Re: Dynamic Zero Padding.

2011-06-07 Thread Chris Rebert
On Tue, Jun 7, 2011 at 2:36 PM, Friedrich Clausen wrote: > Hello All, > > I want to print some integers in a zero padded fashion, eg. : > print("Testing %04i" % 1) > Testing 0001 > > but the padding needs to be dynamic eg. sometimes %05i, %02i or some > other padding amount. But I can't inser

Re: How good is security via hashing

2011-06-07 Thread geremy condra
On Tue, Jun 7, 2011 at 1:42 PM, Paul Rubin wrote: > geremy condra writes: >> # adds random junk to the filename- should make it hard to guess >> rrr = os.urandom(16) >> fname += base64.b64encode(rrr) > > Don't use b64 output in a filename -- it can have slashes in it!  :-( > > Simplest is to use

Dynamic Zero Padding.

2011-06-07 Thread Friedrich Clausen
Hello All, I want to print some integers in a zero padded fashion, eg. : >>> print("Testing %04i" % 1) Testing 0001 but the padding needs to be dynamic eg. sometimes %05i, %02i or some other padding amount. But I can't insert a variable into the format specification to achieve the desirable padd

Re: How good is security via hashing

2011-06-07 Thread Nobody
On Tue, 07 Jun 2011 13:27:59 +0100, Robin Becker wrote: >> If you want the full 16 bytes of unpredictability, why don't you just >> read 16 bytes from >> /dev/urandom and forget about all the other stuff? > > I have a vague memory that the original author felt that entropy might > run out or somet

Re: How good is security via hashing

2011-06-07 Thread Ian Kelly
On Tue, Jun 7, 2011 at 2:42 PM, Paul Rubin wrote: > geremy condra writes: >> # adds random junk to the filename- should make it hard to guess >> rrr = os.urandom(16) >> fname += base64.b64encode(rrr) > > Don't use b64 output in a filename -- it can have slashes in it!  :-( > > Simplest is to use

Re: Validating string for FDQN

2011-06-07 Thread Nobody
On Tue, 07 Jun 2011 15:52:05 +1000, Chris Angelico wrote: >> [1] If a hostname ends with a dot, it's fully qualified. > > Outside of BIND files, when do you ever see a name that actually ends > with a dot? Whenever it is entered that way. This may be necessary on complex networks with local sub

Re: How good is security via hashing

2011-06-07 Thread Paul Rubin
geremy condra writes: > # adds random junk to the filename- should make it hard to guess > rrr = os.urandom(16) > fname += base64.b64encode(rrr) Don't use b64 output in a filename -- it can have slashes in it! :-( Simplest is to use old fashioned hexadeimal for stuff like that, unless the numbe

Re: Function call arguments in stack trace?

2011-06-07 Thread Neil Cerutti
On 2011-06-07, Dun Peal wrote: > On Jun 7, 1:23?pm, Neil Cerutti wrote: >> Use pdb. > > Neil, thanks for the tip; `pdb` is indeed a great debugging > tool. > > Still, it doesn't obviate the need for arguments in the stack > trace. For example: > > 1) Arguments in stack trace can expedite a debugg

Re: GIL in alternative implementations

2011-06-07 Thread Ian Kelly
On Tue, Jun 7, 2011 at 2:22 PM, Ian Kelly wrote: > from functools import partial > > def g(value): >    print(value) >    return partial(g, value+1) > > f = partial(0) > for i in range(1): >    f = f() The "partial(0)" should read "partial(g, 0)", of course. -- http://mail.python.org/mailman

Re: GIL in alternative implementations

2011-06-07 Thread Ian Kelly
On Tue, Jun 7, 2011 at 11:51 AM, Ethan Furman wrote: >> I'm not sure where he gets the idea that this has any impact on >> concurrency, though. > > What if f has two calls to self.h() [or some other function], and self.h > changes in between? > > Surely that would be a major headache. I could ima

Re: Function call arguments in stack trace?

2011-06-07 Thread Irmen de Jong
On 7-6-2011 21:31, Dun Peal wrote: > On Jun 7, 1:23 pm, Neil Cerutti wrote: >> Use pdb. > > Neil, thanks for the tip; `pdb` is indeed a great debugging tool. > > Still, it doesn't obviate the need for arguments in the stack trace. If you can't use pdb perhaps you can use the following: Pyro ha

Re: How good is security via hashing

2011-06-07 Thread geremy condra
On Tue, Jun 7, 2011 at 3:18 AM, Robin Becker wrote: > A python web process is producing files that are given randomized names of > the form > > hh-MMDDhhmmss-.pdf > > where rrr.. is a 128bit random number (encoded as base62). The intent of the > random part is to prevent recipients

Re: Function call arguments in stack trace?

2011-06-07 Thread Ian Kelly
On Tue, Jun 7, 2011 at 1:31 PM, Dun Peal wrote: > On Jun 7, 1:23 pm, Neil Cerutti wrote: >> Use pdb. > > Neil, thanks for the tip; `pdb` is indeed a great debugging tool. > > Still, it doesn't obviate the need for arguments in the stack trace. Your program could use sys.excepthook to generate a

Re: simple web/html testing

2011-06-07 Thread Tim
On Jun 7, 2:05 pm, Miki Tebeka wrote: > http://pypi.python.org/pypi/selenium? I looked at Selenium and it may be what I need, but when I searched for selenium and "broken link" (one of the things I need to test for), I found only an unanswered question: http://groups.google.com/group/selenium-use

Re: Function call arguments in stack trace?

2011-06-07 Thread Dun Peal
On Jun 7, 1:23 pm, Neil Cerutti wrote: > Use pdb. Neil, thanks for the tip; `pdb` is indeed a great debugging tool. Still, it doesn't obviate the need for arguments in the stack trace. For example: 1) Arguments in stack trace can expedite a debugging session, and even obviate it completely: "Wh

Re: GIL in alternative implementations

2011-06-07 Thread Ethan Furman
Carl Banks wrote: On Monday, June 6, 2011 9:03:55 PM UTC-7, Gabriel Genellina wrote: En Sat, 28 May 2011 14:05:16 -0300, Steven D'Aprano escribi�: On Sat, 28 May 2011 09:39:08 -0700, John Nagle wrote: Python allows patching code while the code is executing. Can you give an example of w

Re: regarding session in python

2011-06-07 Thread Michiel Overtoom
On Jun 7, 2011, at 20:09, Kev Dwyer wrote: > vipul jain wrote: > >> hey i am new to python and i want to make a website using python . >> so for that i need a login page. in this login page i want to use the >> sessions... but i am not getting how to do it > > The Python standard library do

Re: International translation of docs - is it a scam?

2011-06-07 Thread Terry Reedy
On 6/7/2011 8:46 AM, Chris Gonnerman wrote: On the 30th of May, I received an email from a man (I'll leave out his name, but it was properly male) offering to translate the docs for the gdmodule (which I maintain) into Belorussian. He wanted my approval, and a link from my page to his. This seeme

Re: how to avoid leading white spaces

2011-06-07 Thread ru...@yahoo.com
On 06/06/2011 08:33 AM, rusi wrote: > For any significant language feature (take recursion for example) > there are these issues: > > 1. Ease of reading/skimming (other's) code > 2. Ease of writing/designing one's own > 3. Learning curve > 4. Costs/payoffs (eg efficiency, succinctness) of use > 5.

Re: How good is security via hashing

2011-06-07 Thread Terry Reedy
On 6/7/2011 7:35 AM, Robin Becker wrote: I guess what I'm asking is whether any sequence that's using random to generate random numbers is predictable if enough samples are drawn. Apparently so. random.random is *not* 'cryptographically secure'. https://secure.wikimedia.org/wikipedia/en/wiki/C

Re: Function call arguments in stack trace?

2011-06-07 Thread Neil Cerutti
On 2011-06-07, Dun Peal wrote: > Hi, > > In a stack trace, is it possible to somehow get the arguments with > which each function was called? > > So for example, if function `foo` in module `bar` was called with > arguments `(1, [2])` when it raised an exception, then instead of: > > Traceback

Function call arguments in stack trace?

2011-06-07 Thread Dun Peal
Hi, In a stack trace, is it possible to somehow get the arguments with which each function was called? So for example, if function `foo` in module `bar` was called with arguments `(1, [2])` when it raised an exception, then instead of: Traceback (most recent call last): File "bar.py",

Re: simple web/html testing

2011-06-07 Thread Miki Tebeka
http://pypi.python.org/pypi/selenium ? -- http://mail.python.org/mailman/listinfo/python-list

Re: regarding session in python

2011-06-07 Thread Kev Dwyer
vipul jain wrote: > hey i am new to python and i want to make a website using python . > so for that i need a login page. in this login page i want to use the > sessions... but i am not getting how to do it The Python standard library doesn't include a session framework, but you can either u

Re: regarding session in python

2011-06-07 Thread Miki Tebeka
Can you give us more context? Which web framework are you working with? You can have a look at http://pythonwise.blogspot.com/2007/05/websession.html ;) -- http://mail.python.org/mailman/listinfo/python-list

regarding session in python

2011-06-07 Thread vipul jain
hey i am new to python and i want to make a website using python . so for that i need a login page. in this login page i want to use the sessions... but i am not getting how to do it -- http://mail.python.org/mailman/listinfo/python-list

Re: GIL in alternative implementations

2011-06-07 Thread Carl Banks
On Monday, June 6, 2011 9:03:55 PM UTC-7, Gabriel Genellina wrote: > En Sat, 28 May 2011 14:05:16 -0300, Steven D'Aprano > escribi�: > > > On Sat, 28 May 2011 09:39:08 -0700, John Nagle wrote: > > > >> Python allows patching code while the code is executing. > > > > Can you give an example of

Re: International translation of docs - is it a scam?

2011-06-07 Thread Phil Thompson
On 7 Jun 2011 16:27:32 GMT, Peter Pearson wrote: > On Tue, 07 Jun 2011 16:55:28 +0200, Alain Ketterlin wrote: >> Chris Gonnerman writes: >> >>> On the 30th of May, I received an email from a man (I'll leave out his >>> name, but it was properly male) offering to translate the docs for the >>> gdm

Re: International translation of docs - is it a scam?

2011-06-07 Thread Peter Pearson
On Tue, 07 Jun 2011 16:55:28 +0200, Alain Ketterlin wrote: > Chris Gonnerman writes: > >> On the 30th of May, I received an email from a man (I'll leave out his >> name, but it was properly male) offering to translate the docs for the >> gdmodule (which I maintain) into Belorussian. [...] > > The

Re: how to avoid leading white spaces

2011-06-07 Thread ru...@yahoo.com
On 06/06/2011 09:29 AM, Steven D'Aprano wrote: > On Sun, 05 Jun 2011 23:03:39 -0700, ru...@yahoo.com wrote: [...] > I would argue that the first, non-regex solution is superior, as it > clearly distinguishes the multiple steps of the solution: > > * filter lines that start with "CUSTOMER" > * extra

simple web/html testing

2011-06-07 Thread Tim
hi, I'm new to web testing and after having googled for a day and a half I figured it might be better to ask here. What I've got is a tree of static HTML documentation I want to test. For example to test that o referenced images exist and are not corrupted, o links to files from the table of cont

Re: International translation of docs - is it a scam?

2011-06-07 Thread Alain Ketterlin
Chris Gonnerman writes: > On the 30th of May, I received an email from a man (I'll leave out his > name, but it was properly male) offering to translate the docs for the > gdmodule (which I maintain) into Belorussian. [...] The same has happened on the gcc list, where it has been considered a sc

Re: The pythonic way equal to "whoami"

2011-06-07 Thread Kushal Kumaran
On Tue, Jun 7, 2011 at 7:54 PM, TheSaint wrote: > Hello, > I was trying to find out whose the program launcher, but os.environ['USER'] > returns the user whom owns the desktop environment, regardless the program > is called by root. > I'd like to know it, so the program will run with the right pri

Re: The pythonic way equal to "whoami"

2011-06-07 Thread Nitin Pawar
import getpass user = getpass.getuser() On Tue, Jun 7, 2011 at 7:54 PM, TheSaint wrote: > Hello, > I was trying to find out whose the program launcher, but os.environ['USER'] > returns the user whom owns the desktop environment, regardless the program > is called by root. > I'd like to know it,

The pythonic way equal to "whoami"

2011-06-07 Thread TheSaint
Hello, I was trying to find out whose the program launcher, but os.environ['USER'] returns the user whom owns the desktop environment, regardless the program is called by root. I'd like to know it, so the program will run with the right privileges. Is there any standard function on python, that

Re: A simple way to print few line stuck to the same position

2011-06-07 Thread TheSaint
Hans Mulder wrote: > If you use curses, you must initialize it by calling curses.initscr(), > which returns a "WindowObject" representing the konsole window. To > put things on the screen, you call methods on this object. Keep in > mind that a "window" in curses jargon is just a rectangle inside

Re: How good is security via hashing

2011-06-07 Thread Paul Rubin
Robin Becker writes: > I have a vague memory that the original author felt that entropy might > run out or something like that so reading from /dev/urandom always was > not a good idea. If there is enough entropy to begin with, then /dev/urandom should be cryptographically strong. The main dange

Re: python + php encrypt/decrypt

2011-06-07 Thread Peter Irbizon
Hello Ian, thanks, I found another php script but it is not working as well :/ What am I doing wrong? And I have another question too: when I use text for encoding "Text for 1" and "Text for 11" the first letters of encoded strings are the same in both strings? here is my py: # -*- coding: utf-8 -

International translation of docs - is it a scam?

2011-06-07 Thread Chris Gonnerman
On the 30th of May, I received an email from a man (I'll leave out his name, but it was properly male) offering to translate the docs for the gdmodule (which I maintain) into Belorussian. He wanted my approval, and a link from my page to his. This seemed fair, so I told him to tell me when it

Re: How good is security via hashing

2011-06-07 Thread Robin Becker
On 07/06/2011 12:40, Jean-Paul Calderone wrote: astcgi and the initialization is only carried out once and then say 50 rrr values are generated. How much randomness do you actually have in this scheme? The PID is probably difficult for an attacker to know, but it's allocated roughly monotonic

Re: GIL in alternative implementations

2011-06-07 Thread Jean-Paul Calderone
On Jun 7, 12:03 am, "Gabriel Genellina" wrote: > En Sat, 28 May 2011 14:05:16 -0300, Steven D'Aprano   > escribi : > > > > > > > > > > > On Sat, 28 May 2011 09:39:08 -0700, John Nagle wrote: > > >> Python allows patching code while the code is executing. > > > Can you give an example of what you

Re: Print Window on IDLE

2011-06-07 Thread Steve Oldner
Thanks Gabriel! Do you know where any documentation is on printing to a local printer for 3.2? I've found Hammond's and Golden's info for win32, but haven't seen if it works for 3.2. Again thank you for your reply and submitting the bug. -- Steve Oldner -Original Message- From: py

Re: How good is security via hashing

2011-06-07 Thread Robin Becker
/dev/urandom does not block, that's the point of it as compared to / dev/random. Jean-Paul my mistake, I thought it was the other way round, on FreeBSD they're the same anyway which is what we test on. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list

Re: How good is security via hashing

2011-06-07 Thread Jean-Paul Calderone
On Jun 7, 7:35 am, Robin Becker wrote: > On 07/06/2011 11:26, Nitin Pawar wrote:> Have you tried using UUID module? > > > Its pretty handy and comes with base64 encoding function which gives > > extremely high quality randon strings > > > ref: > >http://stackoverflow.com/questions/621649/python-an

Re: How good is security via hashing

2011-06-07 Thread Jean-Paul Calderone
On Jun 7, 6:18 am, Robin Becker wrote: > A python web process is producing files that are given randomized names of > the form > > hh-MMDDhhmmss-.pdf > > where rrr.. is a 128bit random number (encoded as base62). The intent of the > random part is to prevent recipients of one file

Re: How good is security via hashing

2011-06-07 Thread Robin Becker
On 07/06/2011 11:26, Nitin Pawar wrote: Have you tried using UUID module? Its pretty handy and comes with base64 encoding function which gives extremely high quality randon strings ref: http://stackoverflow.com/questions/621649/python-and-random-keys-of-21-char-max .. I didn't actually ask

Re: How good is security via hashing

2011-06-07 Thread Nitin Pawar
Have you tried using UUID module? Its pretty handy and comes with base64 encoding function which gives extremely high quality randon strings ref: http://stackoverflow.com/questions/621649/python-and-random-keys-of-21-char-max On Tue, Jun 7, 2011 at 3:48 PM, Robin Becker wrote: > A python web

How good is security via hashing

2011-06-07 Thread Robin Becker
A python web process is producing files that are given randomized names of the form hh-MMDDhhmmss-.pdf where rrr.. is a 128bit random number (encoded as base62). The intent of the random part is to prevent recipients of one file from being able to guess the names of others.

Cheap China Yiwu Small Commodity PayPal, free shipping, wholesale

2011-06-07 Thread 1812575608
Cheap wholesale (free shipping) http://www.aliexpress.com/fm-store/906966 Novelty stationery Best-selling daily necessities Cleverly incorporated Series Outdoor Travel Fashion Home Appliances Japan and South Korea Fashion Jewelry Ms. beauty products Children's Toys Auto supplies Series Seasonal goo

Re: sys.tracebacklimit not working in Python 3.2?

2011-06-07 Thread Gabriel Genellina
En Fri, 27 May 2011 17:38:50 -0300, Thorsten Kampe escribió: sys.tracebacklimit = 0 The 3.2 documentation says "When set to 0 or less, all traceback information is suppressed and only the exception type and value are printed". Bug? Yes; reported at http://bugs.python.org/issue12276 -- Gab

Re: new string formatting with local variables

2011-06-07 Thread Ben Finney
Steven D'Aprano writes: > On Tue, 07 Jun 2011 10:11:01 +1000, Ben Finney wrote: > > > I tend to use ‘u"foo {bar} baz".format(**vars())’, since ‘vars’ can > > also take the namespace of an object. I only need to remember one > > “give me the namespace” function for formatting. […] > > It's a code

Re: GIL in alternative implementations

2011-06-07 Thread Steven D'Aprano
On Tue, 07 Jun 2011 01:03:55 -0300, Gabriel Genellina wrote: > En Sat, 28 May 2011 14:05:16 -0300, Steven D'Aprano > escribió: > >> On Sat, 28 May 2011 09:39:08 -0700, John Nagle wrote: >> >>> Python allows patching code while the code is executing. >> >> Can you give an example of what you mean