Re: Is this secure?

2010-02-23 Thread Steven D'Aprano
On Tue, 23 Feb 2010 18:39:53 -0800, Paul Rubin wrote: > Steven D'Aprano writes: >> Paul, if you were anyone else, I'd be sneering uncontrollably about >> now, but you're not clueless about cryptography, so what have I missed? >> Why is reducing the number of distinct letters by more than 50% >> a

Re: Creating variables from dicts

2010-02-23 Thread Steven D'Aprano
On Tue, 23 Feb 2010 20:44:10 -0800, Luis M. González wrote: > On Feb 24, 1:15 am, Steven D'Aprano > wrote: >> On Tue, 23 Feb 2010 19:47:22 -0800, Luis M. González wrote: >> > On Feb 23, 10:41 pm, Steven D'Aprano >> > wrote: >> >> On Tue, 23 Feb 2010 15:41:16 -0800, Luis M. González wrote: >> >>

Re: python shell crashing on paste

2010-02-23 Thread Michel Claveau - MVP
Hi! Where (directory) are you, when the problem come? Have you try with UAC disabled? @+ -- MCI -- http://mail.python.org/mailman/listinfo/python-list

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-23 Thread sjdevn...@yahoo.com
On Feb 23, 8:03 pm, Nobody wrote: > On Mon, 22 Feb 2010 22:27:54 -0800, sjdevn...@yahoo.com wrote: > > Basically, multiprocessing is always hard--but it's less hard to start > > without shared everything.  Going with the special case (sharing > > everything, aka threading) is by far the stupider a

Re: Can't Access ANY url from python (errno 61)

2010-02-23 Thread MattB
On Feb 20, 7:00 pm, Steven D'Aprano wrote: > On Sat, 20 Feb 2010 18:28:16 +, Martin P. Hellwig wrote: > > On 02/20/10 00:20, MattB wrote: > > > > >> Also, based on Martin's comment, I just wanted to make you all aware > >> that I intend no misuse, but rather am just trying to learn, as I'm a

Re: Bay Area PUG Meeting Thursday in Mountain View, CA

2010-02-23 Thread Aahz
In article <4b84a825.1030...@invalid.com>, W. eWatson wrote: >On 2/23/2010 2:50 PM, Aahz wrote: >> In article, >> W. eWatson wrote: >>> >>> Anyone here going to the meeting,Subject? As far as I can tell, it meets >>>from 7:30 to 9 pm. Their site shows no speaker yet, and there seems to >>> be an

Re: Is this secure?

2010-02-23 Thread Lawrence D'Oliveiro
In message <7xwry39tpi@ruckus.brouhaha.com>, Paul Rubin wrote: > More generally still, passwords regardless of their entropy content are > a sucky way to encapsulate cryptographic secrets. They’re a shared secret. How else would you represent a shared secret, if not with a shared secret? --

Re: Creating variables from dicts

2010-02-23 Thread Luis M . González
On Feb 24, 1:15 am, Steven D'Aprano wrote: > On Tue, 23 Feb 2010 19:47:22 -0800, Luis M. González wrote: > > On Feb 23, 10:41 pm, Steven D'Aprano > > wrote: > >> On Tue, 23 Feb 2010 15:41:16 -0800, Luis M. González wrote: > >> > By the way, if you want the variables inside myDict to be free > >>

Re: Bay Area PUG Meeting Thursday in Mountain View, CA

2010-02-23 Thread W. eWatson
On 2/23/2010 2:50 PM, Aahz wrote: In article, W. eWatson wrote: Anyone here going to the meeting,Subject? As far as I can tell, it meets from 7:30 to 9 pm. Their site shows no speaker yet, and there seems to be an informal group dinner at 6 pm at some place yet unknown. Comments? Subscribe t

Re: Bay Area PUG Meeting Thursday in Mountain View, CA

2010-02-23 Thread W. eWatson
On 2/23/2010 2:50 PM, Aahz wrote: In article, W. eWatson wrote: Anyone here going to the meeting,Subject? As far as I can tell, it meets from 7:30 to 9 pm. Their site shows no speaker yet, and there seems to be an informal group dinner at 6 pm at some place yet unknown. Comments? Subscribe t

Re: Creating variables from dicts

2010-02-23 Thread Steven D'Aprano
On Tue, 23 Feb 2010 19:47:22 -0800, Luis M. González wrote: > On Feb 23, 10:41 pm, Steven D'Aprano > wrote: >> On Tue, 23 Feb 2010 15:41:16 -0800, Luis M. González wrote: >> > By the way, if you want the variables inside myDict to be free >> > variables, you have to add them to the local namespac

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread Grant Edwards
On 2010-02-24, Robert Kern wrote: >> comp.lang.python.spam_prevention_discussion > > Which doesn't exist and never will. Sorry, but > meta-discussions about the group are typically on-topic for > all groups with some few exceptions (e.g. non-discussion, > binary-only groups with associated .d gr

Re: Is this secure?

2010-02-23 Thread Paul Rubin
Lie Ryan writes: > If an attacker knows the that the random number generator have an > extreme skew and he knows the distribution of the letters, how much > advantage would it give the attacker? My initial guess is that the more > skewed the letters are, the better the advantage, since an attacker

Re: Verifying My Troublesome Linkage Claim between Python and Win7

2010-02-23 Thread Rick Dooling
On Feb 23, 1:08 pm, Gib Bogle wrote: > It isn't useful to respond to a serious question with OS bigotry. Okay, I'll go with what Aahz said: > I've seen similar issues on Win7. > AFAIK, this has nothing to do with Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating variables from dicts

2010-02-23 Thread Luis M . González
On Feb 23, 10:41 pm, Steven D'Aprano wrote: > On Tue, 23 Feb 2010 15:41:16 -0800, Luis M. González wrote: > > By the way, if you want the variables inside myDict to be free > > variables, you have to add them to the local namespace. The local > > namespace is also a dictionary "locals()". So you c

Re: Is this secure?

2010-02-23 Thread Lie Ryan
On 02/24/10 14:09, Robert Kern wrote: > On 2010-02-23 20:43 , Steven D'Aprano wrote: >> On Wed, 24 Feb 2010 02:40:13 +, Steven D'Aprano wrote: >> >>> On Tue, 23 Feb 2010 15:36:02 +0100, mk wrote: >>> The question is: is this secure? That is, can the string generated this way be consid

Re: Is this secure?

2010-02-23 Thread Robert Kern
On 2010-02-23 20:43 , Steven D'Aprano wrote: On Wed, 24 Feb 2010 02:40:13 +, Steven D'Aprano wrote: On Tue, 23 Feb 2010 15:36:02 +0100, mk wrote: The question is: is this secure? That is, can the string generated this way be considered truly random? Putting aside the philosophical quest

Re: Is this secure?

2010-02-23 Thread Paul Rubin
mk writes: >> You might look at the sitewww.diceware.comfor an approach to this, >> which you can implement with a program.  The docs there are pretty >> thoughtful and may help you understand the relevant issues. > > Thanks. But I would also be grateful for indicating what is wrong/ugly > in my c

Re: Is this secure?

2010-02-23 Thread Paul Rubin
Steven D'Aprano writes: > Putting aside the philosophical question of what "truly random" means, I > presume you mean that the letters are uniformly distributed. The answer > to that is, they don't like uniformly distributed. That is a good point, the way those letters are generated (through th

Re: Is this secure?

2010-02-23 Thread Paul Rubin
Steven D'Aprano writes: > Paul, if you were anyone else, I'd be sneering uncontrollably about now, > but you're not clueless about cryptography, so what have I missed? Why is > reducing the number of distinct letters by more than 50% anything but a > disaster? This makes the task of brute-forci

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread Robert Kern
On 2010-02-23 20:22 , Lie Ryan wrote: On 02/24/10 12:38, Steven D'Aprano wrote: On Wed, 24 Feb 2010 00:06:09 +0100, Daniel Fetchinson wrote: Hmm. I wonder if all the spam is coming from the NG side. I'll have to look at that. One of the reasons that I stopped reading UseNet over ten years a

Re: Is this secure?

2010-02-23 Thread Steven D'Aprano
On Wed, 24 Feb 2010 02:40:13 +, Steven D'Aprano wrote: > On Tue, 23 Feb 2010 15:36:02 +0100, mk wrote: > >> The question is: is this secure? That is, can the string generated this >> way be considered truly random? > > Putting aside the philosophical question of what "truly random" means, I

Re: Is this secure?

2010-02-23 Thread Steven D'Aprano
On Tue, 23 Feb 2010 15:36:02 +0100, mk wrote: > The question is: is this secure? That is, can the string generated this > way be considered truly random? Putting aside the philosophical question of what "truly random" means, I presume you mean that the letters are uniformly distributed. The answ

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread Lie Ryan
On 02/24/10 12:38, Steven D'Aprano wrote: > On Wed, 24 Feb 2010 00:06:09 +0100, Daniel Fetchinson wrote: > >>> Hmm. I wonder if all the spam is coming from the NG side. I'll have >>> to look at that. One of the reasons that I stopped reading UseNet over >>> ten years ago was because of the dimi

Re: When will Python go mainstream like Java?

2010-02-23 Thread George Sakkis
On Feb 23, 3:49 pm, mk wrote: > Well I for one wouldn't want Python to go exactly Java way, see this: > > http://www.itjobswatch.co.uk/charts/permanent-demand-trend.aspx?s=jav... > > This is the percentage of job offers in UK where the keyword "Java" appears. > > Same for C#, it looks like C# is

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-23 Thread Steven D'Aprano
On Tue, 23 Feb 2010 20:53:37 -0500, sstein...@gmail.com wrote: >> Have you tried parallelpython? >> >> http://www.parallelpython.com/ > > I had not, have you used this successfully? Not personally, no. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this secure?

2010-02-23 Thread Steven D'Aprano
On Tue, 23 Feb 2010 11:19:59 -0800, Paul Rubin wrote: > mk writes: >> I need to generate passwords and I think that pseudo-random generator >> is not good enough, frankly. So I wrote this function:... The question >> is: is this secure? That is, can the string generated this way be >> considered

Re: Is this secure?

2010-02-23 Thread Steven D'Aprano
On Tue, 23 Feb 2010 15:36:02 +0100, mk wrote: > Hello, > > I need to generate passwords and I think that pseudo-random generator is > not good enough, frankly. So I wrote this function: [snip] > (yes I know that this way generated string will not contain 'z' because > 99/4 + 97 = 121 which is 'y'

Re: Verifying My Troublesome Linkage Claim between Python and Win7

2010-02-23 Thread Aahz
In article , W. eWatson wrote: > >My claim is that if one creates a program in a folder that reads a file >in the folder it and then copies it to another folder, it will read the >data file in the first folder, and not a changed file in the new folder. >I'd appreciate it if some w7 users could

Re: formatting a number as percentage

2010-02-23 Thread Lawrence D'Oliveiro
In message <6819f2f8-7a9e-4ea4-a936-c4e00394b...@g28g2000yqh.googlegroups.com>, vsoler wrote: > I'm trying to print .7 as 70% Just to be perverse: (lambda x : (lambda s : s[:s.index(".")] + s[s.index(".") + 1:] + "%")("%.2f" % x).lstrip("0"))(.7) :) -- http://mail.python.org/mailman/list

compiling python question

2010-02-23 Thread Mag Gam
I am trying to compile python with Tk bindings. Do I need to do anything special for python to detect and enable Tk? This is mainly for matplotlib's TkAgg. It seems my compiled version of python isn't finding the module _tkagg -- http://mail.python.org/mailman/listinfo/python-list

PAPER PRESENTATIONS AND SEMIMAR TOPICS.

2010-02-23 Thread all in one
PAPER PRESENTATIONS AND SEMIMAR TOPICS. CHECK OUR VAST PAPER PRESENTATIONS AND SEMIMAR TOPICS INCLUDING PROJECTS FOR FREE AT http://presentationsandseminars.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-23 Thread sstein...@gmail.com
On Feb 23, 2010, at 8:30 PM, Steven D'Aprano wrote: > On Tue, 23 Feb 2010 10:35:38 -0800, John Nagle wrote: > >> The issue being discussed was scaling Python for CPUs with many cores. >> With Intel shipping 4 cores/8 hyperthread CPUs, the 6/12 part working, >> and the 8/16 part coming along, thi

Re: Creating variables from dicts

2010-02-23 Thread Steven D'Aprano
On Tue, 23 Feb 2010 15:41:16 -0800, Luis M. González wrote: > By the way, if you want the variables inside myDict to be free > variables, you have to add them to the local namespace. The local > namespace is also a dictionary "locals()". So you can update locals as > follows: > > locals().upd

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread Steven D'Aprano
On Wed, 24 Feb 2010 00:06:09 +0100, Daniel Fetchinson wrote: >> Hmm. I wonder if all the spam is coming from the NG side. I'll have >> to look at that. One of the reasons that I stopped reading UseNet over >> ten years ago was because of the diminishinig S/N ratio. I have always >> felt that i

Re: When will Java go mainstream like Python?

2010-02-23 Thread Lie Ryan
On 02/24/10 12:08, Nobody wrote: > On Wed, 24 Feb 2010 12:22:05 +1300, Lawrence D'Oliveiro wrote: > >>> Java - The JVM code been hacked to death by Sun engineers (optimised) >>> Python - The PVM code has seen speed-ups in Unladen or via Pyrex.. >>> ad-infinitum but nowhere as near to JVM >> >> Pyt

Re: What's Going on between Python and win7?

2010-02-23 Thread Steven D'Aprano
On Tue, 23 Feb 2010 09:34:00 -0500, Jerry Hill wrote: > On Mon, Feb 22, 2010 at 8:25 PM, W. eWatson > wrote: >> So what's the bottom line? This link notion is completely at odds with >> XP, and produces what I would call something of a mess to the unwary >> Python/W7 user. Is there a simple solut

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-23 Thread Steven D'Aprano
On Tue, 23 Feb 2010 10:35:38 -0800, John Nagle wrote: > The issue being discussed was scaling Python for CPUs with many cores. > With Intel shipping 4 cores/8 hyperthread CPUs, the 6/12 part working, > and the 8/16 part coming along, this is more than a theoretical issue. Have you tried parallelp

Re: What's Going on between Python and win7?

2010-02-23 Thread Lie Ryan
On 02/23/10 05:30, W. eWatson wrote: > On 2/22/2010 8:29 AM, Grant Edwards wrote: >> On 2010-02-22, W. eWatson wrote: >> >>> Last night I copied a program from folder A to folder B. >> >> [tail of various windows breakages elided] >> >>> Comments? >> >> Switch to Linux? >> >> Or at least install C

Re: Bizarre arithmetic results

2010-02-23 Thread Steven D'Aprano
On Tue, 23 Feb 2010 05:48:09 -0800, Mark Dickinson wrote: > On Feb 23, 8:11 am, Steven D'Aprano > wrote: >> Making spaces significant in that fashion is mind-bogglingly awful. >> Let's look at a language that does this: >> >> [st...@sylar ~]$ cat ws-example.rb >> def a(x=4) >>     x+2 >> end >> >

Re: MODULE FOR I, P FRAME

2010-02-23 Thread Rhodri James
On Tue, 23 Feb 2010 10:39:21 -, DANNY wrote: @James I am thinkinhg about effect of errors that are within the sequence of P frames. Where the P frames have only the information about the changes in previous frames, so that errors are present until the next I frame. So I would like to see ho

Re: When will Java go mainstream like Python?

2010-02-23 Thread Nobody
On Wed, 24 Feb 2010 12:22:05 +1300, Lawrence D'Oliveiro wrote: >> Java - The JVM code been hacked to death by Sun engineers (optimised) >> Python - The PVM code has seen speed-ups in Unladen or via Pyrex.. >> ad-infinitum but nowhere as near to JVM > > Python is still faster, though. I think a ke

Re: python dowload

2010-02-23 Thread Ethan Furman
monkeys paw wrote: NEW QUESTION if y'all are still reading: Is there an integer increment operation in Python? I tried using i++ but had to revert to 'i = i + 1' Nope, but try i += 1. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: The future of "frozen" types as the number of CPU cores increases

2010-02-23 Thread Nobody
On Mon, 22 Feb 2010 22:27:54 -0800, sjdevn...@yahoo.com wrote: > Basically, multiprocessing is always hard--but it's less hard to start > without shared everything. Going with the special case (sharing > everything, aka threading) is by far the stupider and more complex way > to approach multipro

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread Lie Ryan
On 02/24/10 11:21, Aahz wrote: > In article , > D'Arcy J.M. Cain wrote: >> On Tue, 23 Feb 2010 02:54:25 -0800 (PST) >> Joan Miller wrote: >>> >>> *Sorry by this message off topic, but this is too important* >> >> Is it just me or has the spew from gmail on this list radically >> increased in the

Re: Spam from gmail

2010-02-23 Thread Ben Finney
a...@pythoncraft.com (Aahz) writes: > Joan Miller is a regular poster; this is off-topic, but it's not spam. Non sequitur. Spam is spam, not by who authors or posts it, but by its distribution (to many people, e.g. via a forum like this one) and its content (off-topic and unsolicited). The messa

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread Aahz
In article , D'Arcy J.M. Cain wrote: >On Tue, 23 Feb 2010 02:54:25 -0800 (PST) >Joan Miller wrote: >> >> *Sorry by this message off topic, but this is too important* > >Is it just me or has the spew from gmail on this list radically >increased in the last week? Anyone else considering blocking a

python shell crashing on paste

2010-02-23 Thread Leo
I just upgraded to Windows 7 (yes, I know) and I've been having a really strange problem with running python (2.6.4, installed from the python.org installer) from the command line. If I open the interpreter, and then paste in a long string, conhost.exe crashes. This doesn't happen when pasting the

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread Ned Deily
In article <20100223182923.4d259d12.da...@druid.net>, "D'Arcy J.M. Cain" wrote: > And just to bring this back on topic, I did do a test and found that > splitting my mailbox between Python mailing list messages and Python > newsgroup messages did not indicate that that was a good barometer of > s

Re: Creating variables from dicts

2010-02-23 Thread Luis M . González
On Feb 23, 7:56 pm, Luis M. González wrote: > On Feb 23, 5:53 pm, vsoler wrote: > > > > > > > Hi, > > > I have two dicts > > > n={'a', 'm', 'p'} > > v={1,3,7} > > > and I'd like to have > > > a=1 > > m=3 > > p=7 > > > that is, creating some variables. > > > How can I do this? > > You are probably

Re: Creating variables from dicts

2010-02-23 Thread Tim Chase
Luis M. González wrote: If you want a list of items, you use tuples or lists. Examples: ('a', 'm', 'p') ---> this is a tuple, and it's made with parenthesis () Actually, a tuple is made with commas...the parens are just there to clarify the order of operations and make it easier to read :

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread Chris Colbert
this image is appropriate: http://4.bp.blogspot.com/_pS7sKjlzwFg/SwhG1S901pI/Eiw/XSm93RIY2WE/s400/kelso-burn.jpg On Tue, Feb 23, 2010 at 6:06 PM, Daniel Fetchinson < fetchin...@googlemail.com> wrote: > >> >> Is it just me or has the spew from gmail on this list radically > >> >> increase

Re: look at the google code

2010-02-23 Thread Lawrence D'Oliveiro
In message <711cb713-4b4a-47f6-8922-ce1ada7d6...@e1g2000yqh.googlegroups.com>, lkcl wrote: > we couldn't get control of that site for quite some time so > started using sourceforget for svn, but the issue tracker on > sourceforget is truly dreadful. Damn. I’ve been working on my own fork

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread D'Arcy J.M. Cain
On Wed, 24 Feb 2010 00:06:09 +0100 Daniel Fetchinson wrote: > And this has to do with python programming in what way? Are you new? Meta discussions about lists are generally considered on-topic for the list. > You, sir, are incredibly funny :) Yes, I am. That however is NOT on topic. :-) An

Re: When will Java go mainstream like Python?

2010-02-23 Thread Lawrence D'Oliveiro
In message , Ishwor Gurung wrote: > Java - The JVM code been hacked to death by Sun engineers (optimised) > Python - The PVM code has seen speed-ups in Unladen or via Pyrex.. > ad-infinitum but nowhere as near to JVM Python is still faster, though. I think a key reason is that its VM supports r

Re: When will Java go mainstream like Python?

2010-02-23 Thread Lawrence D'Oliveiro
In message , Martin P. Hellwig wrote: > Actually I am still waiting for Java to be mainstream :-) Too late, I think. Sun dilly-dallied over making it open source for too long, until it practically didn’t matter any more. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this secure?

2010-02-23 Thread Lawrence D'Oliveiro
In message , mk wrote: > I need to generate passwords and I think that pseudo-random generator is > not good enough, frankly. So I wrote this function: Much simpler: import subprocess data, _ = subprocess.Popen \ ( args = ("pwgen", "-nc"), stdout = subprocess.PIPE ).communicate() pr

Re: python dowload

2010-02-23 Thread Wes James
> > > NEW QUESTION if y'all are still reading: > > Is there an integer increment operation in Python? I tried > using i++ but had to revert to 'i = i + 1' i+=1 -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing an assembler in Python

2010-02-23 Thread Lawrence D'Oliveiro
In message , Anh Hai Trinh wrote: > On Feb 23, 10:08 am, Lawrence D'Oliveiro > wrote: >> >> Let me suggest an alternative approach: use Python itself as the >> assembler. Call routines in your library to output the code. That way you >> have a language more powerful than any assembler. >> >> Se

Re: python dowload

2010-02-23 Thread monkeys paw
On 2/23/2010 3:17 PM, Tim Chase wrote: monkeys paw wrote: I used the following code to download a PDF file, but the file was invalid after running the code, is there problem with the write operation? import urllib2 url = 'http://www.whirlpoolwaterheaters.com/downloads/6510413.pdf' a = open('ado

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread Daniel Fetchinson
>> >> Is it just me or has the spew from gmail on this list radically >> >> increased in the last week? Anyone else considering blocking all gmail >> >> posts to this list? >> > >> > I did that a long time ago for all of the Usenet groups I read >> > and all but one of the mailing lists I read. >>

Re: Signature-based Function Overloading in Python

2010-02-23 Thread Lie Ryan
On 02/24/10 05:25, Michael Rudolf wrote: > Just a quick question about what would be the most pythonic approach in > this. > > In Java, Method Overloading is my best friend, but this won't work in > Python: > So - What would be the most pythonic way to emulate this? > Is there any better Idom tha

Re: Creating variables from dicts

2010-02-23 Thread Luis M . González
On Feb 23, 5:53 pm, vsoler wrote: > Hi, > > I have two dicts > > n={'a', 'm', 'p'} > v={1,3,7} > > and I'd like to have > > a=1 > m=3 > p=7 > > that is, creating some variables. > > How can I do this? You are probably coming from another language and you're not used to python's data structures. I

Re: [Python-Dev] Question for you

2010-02-23 Thread Daniel Fetchinson
>> Hello, Dave; >> >>My name is Craig Connor and I am a senior s/w developer at Northrop >> Grumman. >> >> I have a question for you. I have installed* Boost* (via the >> Installer), and stored it into my >> >> C Drive inside a dir called: >> >> * C:\boost_1_42* >> >> I also installed the* Boos

Re: Bay Area PUG Meeting Thursday in Mountain View, CA

2010-02-23 Thread Aahz
In article , W. eWatson wrote: > >Anyone here going to the meeting,Subject? As far as I can tell, it meets >from 7:30 to 9 pm. Their site shows no speaker yet, and there seems to >be an informal group dinner at 6 pm at some place yet unknown. Comments? Subscribe to http://mail.python.org/mailma

Re: Problem creating executable, with PyQwt

2010-02-23 Thread David Boddie
On Tuesday 23 February 2010 05:32, Gib Bogle wrote: > David Boddie wrote: > >> I have previously referred people with py2exe/PyQt issues to this page on >> the PyQt Wiki: >> >> http://www.py2exe.org/index.cgi/Py2exeAndPyQt >> >> If you can somehow convince py2exe to include the QtSvg module (

Re: When will Python go mainstream like Java?

2010-02-23 Thread Ben Finney
Stefan Behnel writes: > Chris Rebert, 23.02.2010 06:45: > > Indeed. Python is at position 7, just behind C#, in the TIOBE Index: > > http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html > > That index is clearly flawed. A language like PHP (whatever that is > supposed to be comparable

Re: How to transmit a crash report ?

2010-02-23 Thread Stef Mientki
On 23-02-2010 15:21, Thomas wrote: On Feb 22, 9:27 pm, MRAB wrote: Stef Mientki wrote: hello, in my python desktop applications, I'ld like to implement a crash reporter. By redirecting the sys.excepthook, I can detect a crash and collect the necessary data. Now I want

Re: What's Going on between Python and win7?

2010-02-23 Thread Benjamin Kaplan
On Tue, Feb 23, 2010 at 3:35 PM, Michel Claveau - MVP wrote: > Hi! > >> Symbolic links are available in NTFS starting with Windows Vista. > > No. > Hardlink come with NTFS, and already exists in W2K (and NT with specifics > utilities). > > @-salutations > -- > Michel Claveau > And there's a diff

Re: Creating variables from dicts

2010-02-23 Thread MRAB
vsoler wrote: Hi, I have two dicts n={'a', 'm', 'p'} v={1,3,7} Those aren't dicts, they're sets. and I'd like to have a=1 m=3 p=7 that is, creating some variables. How can I do this? The real question is not how, but why? Anyway, assuming you want them to be global variables: glo

Re: Verifying My Troublesome Linkage Claim between Python and Win7

2010-02-23 Thread Gib Bogle
W. eWatson wrote: On 2/23/2010 11:14 AM, Gib Bogle wrote: W. eWatson wrote: On 2/23/2010 8:26 AM, Rick Dooling wrote: No telling what Windows will do. :) I am a mere hobbyist programmer, but I think real programmers will tell you that it is a bad habit to use relative paths. Use absolute path

Re: Bay Area PUG Meeting [Speaker] Thursday in Mountain View, CA?

2010-02-23 Thread W. eWatson
On 2/23/2010 7:49 AM, W. eWatson wrote: Anyone here going to the meeting,Subject? As far as I can tell, it meets from 7:30 to 9 pm. Their site shows no speaker yet, and there seems to be an informal group dinner at 6 pm at some place yet unknown. Comments? -- http://mail.python.org/mailman/list

Re: Creating variables from dicts

2010-02-23 Thread Hai Vu
On Feb 23, 12:53 pm, vsoler wrote: > Hi, > > I have two dicts > > n={'a', 'm', 'p'} > v={1,3,7} > > and I'd like to have > > a=1 > m=3 > p=7 > > that is, creating some variables. > > How can I do this? I think you meant to use the square brackets [ ] instead of the curly ones { } to define the li

Re: What's Going on between Python and win7?

2010-02-23 Thread buggsy2
"W. eWatson" writes: > I noted that this search box has > some sort of filter associated with it. Possibly, in my early stages > of learning to navigate in Win7, I accidentally set the filter. > > Comments? FYI, the only truly reliable and powerful file search utility I've found for Windows is A

Re: Creating variables from dicts

2010-02-23 Thread Arnaud Delobelle
vsoler writes: > Hi, > > I have two dicts > > n={'a', 'm', 'p'} > v={1,3,7} These are sets, not dicts. > and I'd like to have > > a=1 > m=3 > p=7 As sets are unordered, you may as well have a = 3 m = 7 p = 1 or any other permutation. You need some sequences instead. E.g. n = [

Milenko Kindl and America's Worst French Fries

2010-02-23 Thread Milenko Kindl
Milenko Kindl In spite of the name, French fries are practically an American birthright. They’re offered as the first choice side dish with nearly every fast-food and sit-down chain meal available. But here’s the catch: In a recent study of 7,318 New York City patrons leaving fast food chains duri

Re: Verifying My Troublesome Linkage Claim between Python and Win7

2010-02-23 Thread W. eWatson
On 2/23/2010 11:14 AM, Gib Bogle wrote: W. eWatson wrote: On 2/23/2010 8:26 AM, Rick Dooling wrote: No telling what Windows will do. :) I am a mere hobbyist programmer, but I think real programmers will tell you that it is a bad habit to use relative paths. Use absolute paths instead and remov

Creating variables from dicts

2010-02-23 Thread vsoler
Hi, I have two dicts n={'a', 'm', 'p'} v={1,3,7} and I'd like to have a=1 m=3 p=7 that is, creating some variables. How can I do this? -- http://mail.python.org/mailman/listinfo/python-list

Re: SMTPServerDisconnected

2010-02-23 Thread Jonathan Gardner
On Tue, Feb 23, 2010 at 8:47 AM, Victor Subervi wrote: > Hi; > I think the last main thing I have to do on my server is get a running email > server up. Now that I've nuked sendmail and given up on postfix, I'm back to > trying to get qmail up and running again. Of course, there are no active > di

Re: Is this secure?

2010-02-23 Thread Robert Kern
On 2010-02-23 13:59 PM, mk wrote: On Feb 23, 7:19 pm, Paul Rubin wrote: The code is pretty ugly. The main problem is you end up with a password that's usually 5 letters but sometimes just 4 or fewer. Well I didn't write the whole thing here, in actual use I'd write a loop repeating the func

Re: What's Going on between Python and win7?

2010-02-23 Thread Michel Claveau - MVP
Hi! > Symbolic links are available in NTFS starting with Windows Vista. No. Hardlink come with NTFS, and already exists in W2K (and NT with specifics utilities). @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: Signature-based Function Overloading in Python

2010-02-23 Thread Arnaud Delobelle
Michael Rudolf writes: > Just a quick question about what would be the most pythonic approach > in this. > > In Java, Method Overloading is my best friend, but this won't work in > Python: > def a(): > pass def a(x): > pass a() > Traceback (most recent call last): > F

Re: python dowload

2010-02-23 Thread Shashwat Anand
PyPdf/pdfminer library will be of help On Wed, Feb 24, 2010 at 1:47 AM, Tim Chase wrote: > monkeys paw wrote: > >> I used the following code to download a PDF file, but the >> file was invalid after running the code, is there problem >> with the write operation? >> >> import urllib2 >> url = 'htt

Re: python dowload

2010-02-23 Thread sstein...@gmail.com
On Feb 23, 2010, at 2:42 PM, monkeys paw wrote: > I used the following code to download a PDF file, but the > file was invalid after running the code, is there problem > with the write operation? > > import urllib2 > url = 'http://www.whirlpoolwaterheaters.com/downloads/6510413.pdf' > a = open('

Re: python dowload

2010-02-23 Thread David Robinow
On Tue, Feb 23, 2010 at 2:42 PM, monkeys paw wrote: > I used the following code to download a PDF file, but the > file was invalid after running the code, is there problem > with the write operation? > > import urllib2 > url = 'http://www.whirlpoolwaterheaters.com/downloads/6510413.pdf' > a = open

Re: formatting a number as percentage

2010-02-23 Thread Günther Dietrich
Hans Mulder wrote: >> Did you try this: >> > print('%d%%' % (0.7 * 100)) >> 70% > >That method will always round down; TomF's method will round to >the nearest whole number: > > >>> print "%d%%" % (0.698 * 100) >69% > >>> print "{0:.0%}".format(.698) >70% It was intended as a hint to this w

Re: python dowload

2010-02-23 Thread Jerry Hill
On Tue, Feb 23, 2010 at 2:42 PM, monkeys paw wrote: > I used the following code to download a PDF file, but the > file was invalid after running the code, is there problem > with the write operation? > > import urllib2 > url = 'http://www.whirlpoolwaterheaters.com/downloads/6510413.pdf' > a = open

Re: python dowload

2010-02-23 Thread Tim Chase
monkeys paw wrote: I used the following code to download a PDF file, but the file was invalid after running the code, is there problem with the write operation? import urllib2 url = 'http://www.whirlpoolwaterheaters.com/downloads/6510413.pdf' a = open('adobe.pdf', 'w') Sure you don't need this

Re: Fascism is coming to Internet

2010-02-23 Thread D'Arcy J.M. Cain
On Tue, 23 Feb 2010 20:30:03 +0100 Olof Bjarnason wrote: > Even if this is "Off Topic" (which I think it really isn't in any open > source / free software-oriented mailing list), I want to agree with > Joan. It isn't about the Python programming language so it is off topic. So what if some membe

Re: python dowload

2010-02-23 Thread John Bokma
monkeys paw writes: > I used the following code to download a PDF file, but the > file was invalid after running the code, is there problem > with the write operation? > > import urllib2 > url = 'http://www.whirlpoolwaterheaters.com/downloads/6510413.pdf' > a = open('adobe.pdf', 'w') > for line i

Re: Is this secure?

2010-02-23 Thread Robert Kern
On 2010-02-23 13:19 PM, Paul Rubin wrote: I find it's most practical to use a few random words (chosen from a word list like /usr/dict/words) rather than random letters. Words are easier to remember and type. You might look at the site www.diceware.com for an approach to this, which you can im

Re: Is this secure?

2010-02-23 Thread mk
On Feb 23, 7:19 pm, Paul Rubin wrote: > The code is pretty ugly.  The main problem is you end up with a password > that's usually 5 letters but sometimes just 4 or fewer.   Well I didn't write the whole thing here, in actual use I'd write a loop repeating the function until I have enough charact

python dowload

2010-02-23 Thread monkeys paw
I used the following code to download a PDF file, but the file was invalid after running the code, is there problem with the write operation? import urllib2 url = 'http://www.whirlpoolwaterheaters.com/downloads/6510413.pdf' a = open('adobe.pdf', 'w') for line in urllib2.urlopen(url): a.write(

Re: formatting a number as percentage

2010-02-23 Thread vsoler
On Feb 22, 8:32 pm, Hans Mulder wrote: > Günther Dietrich wrote: > > vsoler wrote: > > >> I'm trying to print .7 as 70% > >> I've tried: > > >> print format(.7,'%%') > >> .7.format('%%') > > >> but neither works. I don't know what the syntax is... > > > Did you try this: > > print('%d%%' % (

Re: Is this secure?

2010-02-23 Thread Paul Rubin
mk writes: > I need to generate passwords and I think that pseudo-random generator > is not good enough, frankly. So I wrote this function:... > The question is: is this secure? That is, can the string generated > this way be considered truly random? (I abstract from > not-quite-perfect nature of

Re: Fascism is coming to Internet

2010-02-23 Thread Olof Bjarnason
2010/2/23 Joan Miller : > On 23 feb, 10:54, Joan Miller wrote: >> *Sorry by this message off topic, but this is too important* >> >> Fascism is coming fastly to Internet because is the only communication >> way that governements (managed by the bank and multinationals) cann't >> control >> >> http

RE: Python won't run

2010-02-23 Thread Nardin, Cory L.
Thanks so much for that suggestion. I used the tool and found two missing libraries: MSVCR90.DLL and DWMAPI.DLL. I located and copied the first library to my python directory (and resolved that dependency), but I am still missing the other. I have done a Google search and found that DWMAPI is a

Re: Verifying My Troublesome Linkage Claim between Python and Win7

2010-02-23 Thread Gib Bogle
W. eWatson wrote: On 2/23/2010 8:26 AM, Rick Dooling wrote: No telling what Windows will do. :) I am a mere hobbyist programmer, but I think real programmers will tell you that it is a bad habit to use relative paths. Use absolute paths instead and remove all doubt. http://docs.python.org/libr

Re: Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.

2010-02-23 Thread Timothy N. Tsvetkov
On Feb 16, 10:41 pm, Andrej Mitrovic wrote: > On Feb 16, 7:38 pm, Casey Hawthorne > wrote: > > > Interesting talk on Python vs. Ruby and how he would like Python to > > have just a bit more syntactic flexibility. > > >http://blog.extracheese.org/2010/02/python-vs-ruby-a-battle-to-the-de... > > --

Re: Verifying My Troublesome Linkage Claim between Python and Win7

2010-02-23 Thread Gib Bogle
Rick Dooling wrote: No telling what Windows will do. :) It isn't useful to respond to a serious question with OS bigotry. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >