Re: When will Python go mainstream like Java?

2010-02-23 Thread Krister Svanlund
On Tue, Feb 23, 2010 at 1:01 AM, Edward A. Falk wrote: > You mean it's not? > > -- >        -Ed Falk, f...@despams.r.us.com >        http://thespamdiaries.blogspot.com/ Javas popularity was very much a product of its time. It was something new and exciting and people got a bit too excited maybe,

Re: Bizarre arithmetic results

2010-02-23 Thread Steven D'Aprano
On Mon, 22 Feb 2010 18:01:44 +, Albert van der Horst wrote: > In article , > Terrence Cole wrote: >>Can someone explain to me what python is doing here? >> >>Python 3.1.1 (r311:74480, Feb 3 2010, 13:36:47) [GCC 4.3.4] on linux2 >>Type "help", "copyright", "credits" or "license" for more inf

wgv berufsunfähigkeitsversicherung, berufsunfähigk eitsversicherung testsieger, berufsunfähigkeitsversicherung mlp, berufsunfähigkeitsversicherung preis, hdi gerling ber ufsunfähigkeitsversicherung,

2010-02-23 Thread gabi meier
wgv berufsunfähigkeitsversicherung, berufsunfähigkeitsversicherung testsieger, berufsunfähigkeitsversicherung mlp, berufsunfähigkeitsversicherung preis, hdi gerling berufsunfähigkeitsversicherung, + + + HAUSRAT VERSICHERUNG +++ HAUSRATVERSICHERUNG BILLIG +++ BILLIGE HAUSRATSVERSICHERUNG + http://W

Re: When will Python go mainstream like Java?

2010-02-23 Thread Ishwor Gurung
On 23 February 2010 08:56, AON LAZIO wrote: > That will be superb Yes it would - but I'll just add in few words. Java - Monstrous language that was Sun's flagship language. Now, it's Oracles. Python - Hobby-ish hacking language that we all love so much (that we wish everything was written using P

Re: DreamPie - The Python shell you've always dreamed about!

2010-02-23 Thread Processor-Dev1l
On Feb 21, 10:42 am, Noam Yorav-Raphael wrote: > I'm pleased to announce DreamPie 1.0 - a new graphical interactive > Python shell! > > Some highlights: > > * Has whatever you would expect from a graphical Python shell - > attribute completion, tooltips which show how to call functions, > highligh

Re: os.pipe() + os.fork()

2010-02-23 Thread sebastian.no...@googlemail.com
On Feb 20, 8:13 pm, Gary Herron wrote: > Here's a thought:  Consider the subprocess module.   It can do thefork > and any necessary pipes and can do so in an OS independent way.   It > might make you life much easier. As far as i know the subprocess module provides only functionality for running

Re: When will Python go mainstream like Java?

2010-02-23 Thread Richard Lamboj
Am Tuesday 23 February 2010 09:07:43 schrieb Krister Svanlund: > On Tue, Feb 23, 2010 at 1:01 AM, Edward A. Falk wrote: > > You mean it's not? > > > > -- > >        -Ed Falk, f...@despams.r.us.com > >        http://thespamdiaries.blogspot.com/ > > Javas popularity was very much a product of its

Re: MODULE FOR I, P FRAME

2010-02-23 Thread DANNY
@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 how is this seen in different GoP sized clips. @Tim Th

Re: When will Python go mainstream like Java?

2010-02-23 Thread hackingKK
On Tuesday 23 February 2010 03:10 PM, Richard Lamboj wrote: Am Tuesday 23 February 2010 09:07:43 schrieb Krister Svanlund: On Tue, Feb 23, 2010 at 1:01 AM, Edward A. Falk wrote: You mean it's not? -- -Ed Falk, f...@despams.r.us.com http://thespamdiaries.blogspot.

Re: When will Python go mainstream like Java?

2010-02-23 Thread Stefan Behnel
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 with) can't possibly be on the ris

Fascism is coming to Internet

2010-02-23 Thread Joan Miller
*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://www.boingboing.net/2010/02/21/acta-internet-enforc.html -- http://mail.python.o

Spam from gmail (Was: fascism)

2010-02-23 Thread D'Arcy J.M. Cain
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 all gmail posts to this list? -- D'Arcy J.M. C

Re: Combining C and Python programs

2010-02-23 Thread General Cody
Well... This is really a RTFM question. It's all in the Python docs... And it's really simple. -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: DreamPie - The Python shell you've always dreamed about!

2010-02-23 Thread Alan Harris-Reid
gorauskas wrote: I installed it on a Windows 7 machine with CPython 2.6.4 and I get the following error: Traceback (most recent call last): File "dreampie.py", line 3, in File "dreampielib\gui\__init__.pyc", line 73, in File "dreampielib\gui\load_pygtk.pyc", line 49, in load_pygtk Import

Re: DreamPie - The Python shell you've always dreamed about!

2010-02-23 Thread Noam Yorav-Raphael
‎Thanks! I'm happy you like it! Thanks for the feedback too. Here are my replies. On Sun, Feb 21, 2010 at 7:13 PM, Chris Colbert wrote: > This is bloody fantastic! I must say, this fixes everything I hate about > Ipython and gives me the feature I wished it had (with a few minor > exceptions). >

Re: When will Python go mainstream like Java?

2010-02-23 Thread Roald de Vries
On Feb 22, 2010, at 10:56 PM, AON LAZIO wrote: That will be superb I guess static typing will have to be added, so that tools like eclipse can inspect (and autocomplete) your programs [better]. -- http://mail.python.org/mailman/listinfo/python-list

Re: Avoid converting functions to methods in a class

2010-02-23 Thread Jean-Michel Pichavant
Steven D'Aprano wrote: I have a convention when writing unit tests to put the target of the test into a class attribute, as follows: class MyTest(unittest.TestCase): target = mymodule.someclass def test_spam(self): """Test that someclass has a spam attribute.""" self.fa

Verifying My Troublesome Linkage Claim between Python and Win7

2010-02-23 Thread W. eWatson
In the last day, I posted a message titled "What's Going on between Python and win7?" I'd appreciate it if someone could verify my claim. A sample program to do this is below. I'm using IDLE in Win7 with Py 2.5. My claim is that if one creates a program in a folder that reads a file in the fol

Re: DreamPie - The Python shell you've always dreamed about!

2010-02-23 Thread Olof Bjarnason
2010/2/23 Noam Yorav-Raphael : > ‎Thanks! I'm happy you like it! > Thanks for the feedback too. Here are my replies. > > On Sun, Feb 21, 2010 at 7:13 PM, Chris Colbert wrote: >> This is bloody fantastic! I must say, this fixes everything I hate about >> Ipython and gives me the feature I wished it

Re: When will Python go mainstream like Java?

2010-02-23 Thread Bruno Desthuilliers
hackingKK a écrit : (snip) I don't care how many apps are developed using java as long as they remain heavy and slw. google runs on python Please get your facts right. Python is one of the languages used internally at Google, true, but so is Java. And google-the-search-engine does

Re: When will Python go mainstream like Java?

2010-02-23 Thread Bruno Desthuilliers
Roald de Vries a écrit : On Feb 22, 2010, at 10:56 PM, AON LAZIO wrote: That will be superb I guess static typing will have to be added, so that tools like eclipse can inspect (and autocomplete) your programs [better]. Yet another troll... -- http://mail.python.org/mailman/listinfo/python-

Re: Bizarre arithmetic results

2010-02-23 Thread Mark Dickinson
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 > > b = 1 > print (a + b), (a+b), (a+ b), (a +b), "\n" > > [st...@sylar ~]

ANN: Leo 4.7 final released

2010-02-23 Thread Edward K Ream
Leo 4.7 finalFebruary 23, 2009 Leo 4.7 final is now available at: http://sourceforge.net/project/showfiles.php?group_id=3458&package_id=29106 Leo 4.7 final fixes all known bugs in Leo. Leo is a text editor, data organizer, project manager and much more. See: http://webpages.

Re: How to transmit a crash report ?

2010-02-23 Thread Thomas
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 that my users sends this information

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

2010-02-23 Thread Jerry Hill
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 solution? I know people went off on a tangent talking about symbol

Is this secure?

2010-02-23 Thread mk
Hello, I need to generate passwords and I think that pseudo-random generator is not good enough, frankly. So I wrote this function: import struct def gen_rand_string(): fileobj = open('/dev/urandom','rb') rstr = fileobj.read(4) rnum = struct.unpack('L',rstr)[0] rstr = '%i' % r

Re: When will Python go mainstream like Java?

2010-02-23 Thread mk
AON LAZIO wrote: That will be superb 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=java&l=uk This is the percentage of job offers in UK where the keyword "Java" appears. Same for C#, it looks like C# i

Re: When will Python go mainstream like Java?

2010-02-23 Thread mk
Stefan Behnel wrote: 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 with) can't p

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 Anh Hai Trinh
On Feb 23, 1:03 pm, "Alf P. Steinbach" wrote: > > Uhm, Paganini... > > As I understand it he invented the "destroy your instruments on stage". :-) > > Cheers, > > - Alf (off-topic) You probably meant Franz Liszt, who regularly broke piano strings. Paganini was also a "rock-star" virtuoso but he d

Re: Writing an assembler in Python

2010-02-23 Thread mk
Giorgos Tzampanakis wrote: I'm implementing a CPU that will run on an FPGA. I want to have a (dead) simple assembler that will generate the machine code for me. I want to use Python for that. Are there any libraries that can help me with the parsing of the assembly code? I'm not sure about y

Re: Re: DreamPie - The Python shell you've always dreamed about!

2010-02-23 Thread Chris Colbert
Do you have gtk and PyGTK installed? Sounds like a missing dependency to me. On Tue, Feb 23, 2010 at 6:56 AM, Alan Harris-Reid < aharrisr...@googlemail.com> wrote: > gorauskas wrote: > >> I installed it on a Windows 7 machine with CPython 2.6.4 and I get the >> following error: >> >> Traceback (m

Re: When will Python go mainstream like Java?

2010-02-23 Thread Martin P. Hellwig
Actually I am still waiting for Java to be mainstream :-) You could say it is popular, which it is without doubt but in my opinion after C handed over it's pseudo de facto standard (mostly because a lot of OS'es are written in it) nobody else has had enough momenta to reach for that crown. Ac

Re: Writing an assembler in Python

2010-02-23 Thread Anh Hai Trinh
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. > > See for an exa

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread Grant Edwards
On 2010-02-23, 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 blockin

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread Grant Edwards
On 2010-02-23, Grant Edwards wrote: > On 2010-02-23, 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 th

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

2010-02-23 Thread mk
sjdevn...@yahoo.com wrote: On Feb 20, 9:58 pm, John Nagle wrote: sjdevn...@yahoo.com wrote: On Feb 18, 2:58 pm, John Nagle wrote: Multiple processes are not the answer. That means loading multiple copies of the same code into different areas of memory. The cache miss rate goes up accor

Re: Avoid converting functions to methods in a class

2010-02-23 Thread Daniel Fetchinson
> I have a convention when writing unit tests to put the target of the test > into a class attribute, as follows: > > class MyTest(unittest.TestCase): > target = mymodule.someclass > > def test_spam(self): > """Test that someclass has a spam attribute.""" > self.failUnless(h

Re: DreamPie - The Python shell you've always dreamed about!

2010-02-23 Thread Alan Harris-Reid
Chris Colbert wrote: Do you have gtk and PyGTK installed? Sounds like a missing dependency to me. On Tue, Feb 23, 2010 at 6:56 AM, Alan Harris-Reid mailto:aharrisr...@googlemail.com>> wrote: gorauskas wrote: I installed it on a Windows 7 machine with CPython 2.6.4 and I

Bay Area PUG Meeting Thursday in Mountain View, CA

2010-02-23 Thread W. eWatson
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/listinfo/python-list

AKKA vs Python

2010-02-23 Thread mk
Hello everyone, Is there smth like AKKA in Python? http://akkasource.org/ Regards, mk -- http://mail.python.org/mailman/listinfo/python-list

Re: Spam from gmail (Was: fascism)

2010-02-23 Thread D'Arcy J.M. Cain
On Tue, 23 Feb 2010 15:31:12 + (UTC) Grant Edwards wrote: > >> 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

Re: AKKA vs Python

2010-02-23 Thread Chris Rebert
On Tue, Feb 23, 2010 at 7:59 AM, mk wrote: > Hello everyone, > > Is there smth like AKKA in Python? > > http://akkasource.org/ Minus the "distributed" part, yes; there are a few implementations of actors for Python: http://www.doc.ic.ac.uk/~jwa/stage/ http://osl.cs.uiuc.edu/parley/ http://candygr

Re: Writing an assembler in Python

2010-02-23 Thread Robert Kern
On 2010-02-22 21:47 PM, Ed Keith wrote: Subject: Re: Writing an assembler in Python Giorgos Tzampanakis wrote: I'm implementing a CPU that will run on an FPGA. I want to have a (dead) simple assembler that will generate the machine code for me. Let me suggest an alternative approach: use

Re: Verifying My Troublesome Linkage Claim between Python and Win7

2010-02-23 Thread Rick Dooling
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/library/os.path.html RD -- http://mail.python.org/mailman/listinf

Re: When will Python go mainstream like Java?

2010-02-23 Thread sstein...@gmail.com
On Feb 23, 2010, at 10:10 AM, Martin P. Hellwig wrote: > Actually I am still waiting for Java to be mainstream :-) > You could say it is popular, which it is without doubt but in my opinion > after C handed over it's pseudo de facto standard (mostly because a lot of > OS'es are written in it) n

SMTPServerDisconnected

2010-02-23 Thread Victor Subervi
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 discussion lists for *any* email server, so I have to turn here for

Free check of $253 with your name.

2010-02-23 Thread ranga...............
Just open below site and select any one of the four red color links present below sponsors and enter your payename and address where to get your check. The secret link is http://highpayingkeywordsofadsense.blogspot.com/2010/01/google-yahoo-msn-adsense-high-paying_29.html -- http://mail.python.or

Re: Verifying My Troublesome Linkage Claim between Python and Win7

2010-02-23 Thread W. eWatson
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/library/os.path.html R

Re: Fascism is coming to Internet

2010-02-23 Thread 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://www.boingboing.net/2010/02/21/

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

2010-02-23 Thread John Nagle
mk wrote: sjdevn...@yahoo.com wrote: On Feb 20, 9:58 pm, John Nagle wrote: sjdevn...@yahoo.com wrote: On Feb 18, 2:58 pm, John Nagle wrote: Multiple processes are not the answer. That means loading multiple copies of the same code into different areas of memory. The cache miss rate g

Re: Modifying Class Object

2010-02-23 Thread NevilleDNZ
Hi Groetjes Albert, I spotted your comment - re: pointers http://groups.google.com/group/comp.lang.python/msg/5c1e25919b6a74bf On Feb 22, 11:44 pm, Albert van der Horst wrote: (I once studied algol 68, and never got confused about these > subjects anymore, recommended.) Having used Algol68, the

Signature-based Function Overloading in Python

2010-02-23 Thread Michael Rudolf
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): File "", line 1, in a() TypeError:

Re: Signature-based Function Overloading in Python

2010-02-23 Thread Daniel Fetchinson
> 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): >File "", line 1, in > a() > TypeError: a() takes exactly 1 argument (0 given) > > So - What would

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

2010-02-23 Thread chris grebeldinger
Have you tried opening file explorer in administrative mode before performing the copy? I think if there isn't sufficient permissions, it does something weird like that. -- http://mail.python.org/mailman/listinfo/python-list

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

2010-02-23 Thread Gib Bogle
chris grebeldinger wrote: Have you tried opening file explorer in administrative mode before performing the copy? I think if there isn't sufficient permissions, it does something weird like that. No -- http://mail.python.org/mailman/listinfo/python-list

Re: Signature-based Function Overloading in Python

2010-02-23 Thread John Posner
On 2/23/2010 1:25 PM, 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: >>> def a(): pass >>> def a(x): pass >>> a() Traceback (most recent call last): File "", lin

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

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
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: 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: 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: 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: 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%%' % (

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: 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

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: 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: 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 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: 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: 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 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: 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 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: 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: 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: 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: 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

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: 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

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: 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 = [

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 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: 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: 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: 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: 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: 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: 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: 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: 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: [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: 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: 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: 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: 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: 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 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: 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

  1   2   >