Re: Python-list Digest, Vol 92, Issue 40

2011-05-05 Thread Nico Grubert
PIL will compile and install if you don't have some development libraries and then simply not work or not work up to full steam when used. To avoid this, you need to install the appropriate libraries, among which are: libjpeg-devel freetype-devel libpng-devel Dear Albert Thank you for your

checking if a list is empty

2011-05-05 Thread Jabba Laci
Hi, If I want to check if a list is empty, which is the more pythonic way? li = [] (1) if len(li) == 0: ... or (2) if not li: ... Thanks, Laszlo -- http://mail.python.org/mailman/listinfo/python-list

Re: 回复: Re: BeautifulSoup import error

2011-05-05 Thread James Mills
On Fri, May 6, 2011 at 3:57 PM, Stefan Behnel wrote: > No. While this has been suggested, it will not become part of the stdlib in > the foreseeable future. It's readily available as a separate package on > PyPI, though. Opps I meant xml.etree :/ My bad! cheers James -- -- James Mills -- -- "P

Re: 回复: Re: BeautifulSoup import error

2011-05-05 Thread Stefan Behnel
1011_wxy, 06.05.2011 04:29: 发件人: James Mills On Fri, May 6, 2011 at 11:37 AM, 1011_wxy wrote: I got a import error when I use Python 3.2 to import BeautifulSoup 3.2.0 . Is there any differences between Python 3.2 and other version? This is my first time to use Python3.2 . And the error message

Re: Python IDE/text-editor

2011-05-05 Thread JussiJ
On Apr 16, 1:20 pm, Alec Taylor wrote: > I'm looking for an IDE which offers syntax-highlighting, > code-completion, tabs, The Zeus editor does offers all these features: http://www.zeusedit.com/ Zeus is also scriptable and Zeus scripts can be written in Python. Zeus also does Python smar

Re: Embedding Python's library as zip file

2011-05-05 Thread Miki Tebeka
I used py2exe in the past for that, see http://www.py2exe.org/index.cgi/ShippingEmbedded -- http://mail.python.org/mailman/listinfo/python-list

回复: Re: BeautifulSoup import error

2011-05-05 Thread 1011_wxy
Dear JM: Thank you very much. BeautifulSoup does not work well with Python3.2 . 2011-05-06 Kerry 发件人: James Mills 发送时间: 2011-05-06 09:47 主 题: Re: BeautifulSoup import error 收件人: python list On Fri, May 6, 2011 at 11:37 AM, 1011_wxy <1011_...@163.com> wrote: > I got a import error wh

Re: PIL: The _imaging C module is not installed

2011-05-05 Thread Albert Hopkins
On Fri, 2011-05-06 at 01:45 +0200, Michel Claveau - MVP wrote: > Hi! > > > you need to install the appropriate libraries, among which are: > > libjpeg-devel > > freetype-devel > > libpng-devel > > OK, but where can I find it? I want use PIL with Python under Windows, > and I can't compile C's so

Re: BeautifulSoup import error

2011-05-05 Thread James Mills
On Fri, May 6, 2011 at 11:37 AM, 1011_wxy <1011_...@163.com> wrote: > I got a import error when I use Python 3.2 to import BeautifulSoup 3.2.0 . > Is there any differences between Python 3.2 and other version? This is my > first time to use Python3.2 . > And the error message will be as below. Jud

BeautifulSoup import error

2011-05-05 Thread 1011_wxy
Dear friends: I got a import error when I use Python 3.2 to import BeautifulSoup 3.2.0 . Is there any differences between Python 3.2 and other version? This is my first time to use Python3.2 . And the error message will be as below. >>> from BeautifulSoup import BeautifulSoup Traceback (most re

Re: Py_XDECREF/Py_DECREF evaluating its argument more than once

2011-05-05 Thread Chris Rebert
On Thu, May 5, 2011 at 5:59 PM, Chris Angelico wrote: > Since inline functions are a part of C99 as well as C++, would it be > possible to have configure.sh detect its availability and optionally > use that instead of preprocessor macros, or would this run the risk of > encouraging trickily unpor

Re: Py_XDECREF/Py_DECREF evaluating its argument more than once

2011-05-05 Thread Chris Angelico
Clarification: This IS stated in the source - in object.h are the following sage words: --- *** WARNING*** The Py_DECREF macro must have a side-effect-free argument since it may evaluate its argument multiple times. (The alternative would be to mace it a proper function or assign it to a global t

Py_XDECREF/Py_DECREF evaluating its argument more than once

2011-05-05 Thread Chris Angelico
Okay, this is mainly a tale of a stupid C++ programmer who forgot the rules of C... I simplified a whole lot of code recently, cut out some temporary variables, did some general tidying-up, and then found that my program was segfaulting occasionally. Sure that I hadn't made any substantive changes

Re: PIL: The _imaging C module is not installed

2011-05-05 Thread Michel Claveau - MVP
Re! And why the problem no exist with PIL 1.1.6? (only 1.1.7) Is that the version 1.1.6 does not use these libraries? @+ -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: PIL: The _imaging C module is not installed

2011-05-05 Thread Michel Claveau - MVP
Hi! > you need to install the appropriate libraries, among which are: > libjpeg-devel > freetype-devel > libpng-devel OK, but where can I find it? I want use PIL with Python under Windows, and I can't compile C's sources. Should I replace PIL by ImageMagick? @-salutations -- Michel Claveau -

Re: avro slow?

2011-05-05 Thread Stefan Behnel
Dan Stromberg, 06.05.2011 00:36: Python is often more about programmer efficiency than machine efficiency. With cost per MIPS going down and the price of programmer time going up, it seems a good idea. Especially when you also count the MIPS improvement during the time it takes to write the c

Re: avro slow?

2011-05-05 Thread Dan Stromberg
On Thu, May 5, 2011 at 2:12 PM, Miki Tebeka wrote: > Greetings, > > I'm reading some data from avro file using the avro library. It takes about > a minute to load 33K objects from the file. This seem very slow to me, > specially with the Java version reading the same file in about 1sec. > You mi

Re: access to some text string in PDFs

2011-05-05 Thread Chris Rebert
On Thu, May 5, 2011 at 2:26 PM, Robert Pazur wrote: > Dear all, > i would like to access some text and count the occurrence as follows > > I got a lots of pdf with some scientific articles and i want to preview >  which words are usually related with for example "determinants" > as an example in t

Re: What other languages use the same data model as Python?

2011-05-05 Thread Chris Angelico
On Fri, May 6, 2011 at 1:29 AM, Roy Smith wrote: > "Hey, let's override operator,() and have some fun" Destroying sanity, for fun and profit. Chris Angelico -- http://mail.python.org/mailman/listinfo/python-list

Re: What other languages use the same data model as Python?

2011-05-05 Thread Chris Angelico
On Fri, May 6, 2011 at 2:27 AM, Andreas Tawn wrote: > If True and False: >    waveFunction.collapse(cat) > > > That's going to be fun ;o) If a process crashes and init isn't there to hear it, does it produce a core dump? Chris Angelico -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python's library as zip file

2011-05-05 Thread Ian Kelly
On Thu, May 5, 2011 at 2:34 PM, Wojtek Mamrak wrote: > Maybe I am missing the point, but I think I am not able to do this. > When I remove the "Lib" folder and try to run Python.exe, the python > console window closes rapidly, so that it is hard to read any message > displayed in it and obvioulsy

access to some text string in PDFs

2011-05-05 Thread Robert Pazur
Dear all, i would like to access some text and count the occurrence as follows > I got a lots of pdf with some scientific articles and i want to preview which words are usually related with for example "determinants" as an example in the article is a sentence > elevation is the most important

avro slow?

2011-05-05 Thread Miki Tebeka
Greetings, I'm reading some data from avro file using the avro library. It takes about a minute to load 33K objects from the file. This seem very slow to me, specially with the Java version reading the same file in about 1sec. Here is the code, am I doing something wrong? import avro.dataf

Re: Embedding Python's library as zip file

2011-05-05 Thread Wojtek Mamrak
> That means it's not finding it. After startup, try adding the zip > file to your sys.path and then do "import site" at the command line, > and it should work. Maybe I am missing the point, but I think I am not able to do this. When I remove the "Lib" folder and try to run Python.exe, the python

Re: What other languages use the same data model as Python?

2011-05-05 Thread harrismh777
Ian Kelly wrote: On the other hand, the @ syntax is analogous to declaring reference types in C++ (e.g. "int&" as opposed to "int *"). In both cases you have to tell the interpreter / compiler that you want to use the decoration / pass-by-reference feature, and the actual work is done for you au

Re: What other languages use the same data model as Python?

2011-05-05 Thread Ian Kelly
On Thu, May 5, 2011 at 10:58 AM, harrismh777 wrote: > Grant Edwards wrote: >> >> That's what I was trying to say, but probably not as clearly.  The "&" >> operatore returnas a_value_  that the OP passes_by_value_  to a >> function.  That function then uses the "*" operator to use that value >> to

Employment Opportunity in Chicago

2011-05-05 Thread Wok-Thee-Recruiter
Python Developer Looking for a candidate with hands on Python development experience to work for a fast growing company that provides in-flight broadband services. • This person will be working on portal development and optimizing plane systems. • Help integrate third party products s

Re: What other languages use the same data model as Python?

2011-05-05 Thread Terry Reedy
On 5/5/2011 9:19 AM, Neil Cerutti wrote: On 2011-05-04, John Nagle wrote: That's a quirk of CPython's boxed number implementation. All integers are boxed, but there's a set of canned objects for small integers. CPython's range for this is -5 to +256, incidentally. That's visible through the

Re: What other languages use the same data model as Python?

2011-05-05 Thread Neil Cerutti
On 2011-05-05, harrismh777 wrote: > ... saying that 'C' does not support pass-by-reference because > you have to direct the compiler with the '&' and '*' characters > is a little like saying that > > Python does not support decorations ! ... > > > ... because you have to direct the interpre

Re: What other languages use the same data model as Python?

2011-05-05 Thread harrismh777
Ethan Furman wrote: PS My thanks to those who kept explaining in various ways about the difference between language supported features and programmer constructs -- I hadn't realized before this thread that call-by-reference was not a language feature of C, but rather a programmer-implemented feat

Re: What other languages use the same data model as Python?

2011-05-05 Thread Ethan Furman
harrismh777 wrote: Grant Edwards wrote: I give up. You don't seem to understand the C language defintion or what is commonly meant by "pass by reference". ah, don't give up... here is a link that might help to clarify some of these semantics... me thinks: http://en.wikipedia.org/wiki/Pa

Re: Need to solve the "Stateless HTTP" problem

2011-05-05 Thread Ian Kelly
On Thu, May 5, 2011 at 8:22 AM, Gnarlodious wrote: > My scripting has grown to the point where the Apache server is a > problem. My Python websites run and quit, which means I need to save > data and recreate everything next page load. Bulky and slow. What is > the simplest solution? > > I am runn

Re: What other languages use the same data model as Python?

2011-05-05 Thread harrismh777
Grant Edwards wrote: No, that's_not_ automatic if you have to do it yourself. It's automatic when it happens without user-intervention. Now I think you're trolling... ... no, I was only kidding... :) -- http://mail.python.org/mailman/listinfo/python-list

Re: What other languages use the same data model as Python?

2011-05-05 Thread harrismh777
Grant Edwards wrote: That's what I was trying to say, but probably not as clearly. The "&" operatore returnas a_value_ that the OP passes_by_value_ to a function. That function then uses the "*" operator to use that value to access some data. I'm gonna try a D'Aprano-style bogus argument fo

Re: What other languages use the same data model as Python?

2011-05-05 Thread Grant Edwards
On 2011-05-05, Neil Cerutti wrote: > On 2011-05-05, Roy Smith wrote: >> Of course, C++ lets you go off the deep end with abominations >> like references to pointers. Come to think of it, C++ let's >> you go off the deep end in so many ways... > > But you can do some really cool stuff in the deep

Re: What other languages use the same data model as Python?

2011-05-05 Thread Grant Edwards
On 2011-05-05, Roy Smith wrote: > In article , > Grant Edwards wrote: > >> That's what I was trying to say, but probably not as clearly. The "&" >> operatore returnas a _value_ that the OP passes _by_value_ to a >> function. That function then uses the "*" operator to use that value >> to acce

Re: What other languages use the same data model as Python?

2011-05-05 Thread Grant Edwards
On 2011-05-05, harrismh777 wrote: > Steven D'Aprano wrote: >> In fairness, he's not the only one. M Harris has twice now linked to an >> IBM site that describes pass-by-reference in C in terms of passing a >> pointer to the argument you want as the argument. Admittedly, doing so >> gives you almos

Re: What other languages use the same data model as Python?

2011-05-05 Thread Grant Edwards
On 2011-05-05, Steven D'Aprano wrote: > On Thu, 05 May 2011 14:14:22 +, Grant Edwards wrote: > >> On 2011-05-05, harrismh777 wrote: >>> Grant Edwards wrote: The "pass by value" and "pass by reference" parameter passing mechanisms are pretty well defined, and C uses "pass by value".

Re: What other languages use the same data model as Python?

2011-05-05 Thread Ian Kelly
On Thu, May 5, 2011 at 9:41 AM, John Nagle wrote: > On 5/5/2011 3:06 AM, Gregory Ewing wrote: >> >> John Nagle wrote: >> >>> A reasonable compromise would be that "is" is treated as "==" on >>> immutable objects. >> >> That wouldn't work for tuples, which can contain references >> to other objects

RE: What other languages use the same data model as Python?

2011-05-05 Thread Andreas Tawn
> Steven D'Aprano wrote: > > > Some day, we'll be using quantum computers without memory addresses, > [ ... > ] it will still be possible to > > represent data indirectly via *some* mechanism. > > :) Cool! Pass-by-coincidence! And Python 3 already has dibs on the > 'nonlocal' keyword! > >

Re: Need to solve the "Stateless HTTP" problem

2011-05-05 Thread Miki Tebeka
> Essentially I want > certain objects to be a "constantly running process" that may timeout > after some disuse. memcached? -- http://mail.python.org/mailman/listinfo/python-list

Re: What other languages use the same data model as Python?

2011-05-05 Thread harrismh777
Grant Edwards wrote: I give up. You don't seem to understand the C language defintion or what is commonly meant by "pass by reference". ah, don't give up... here is a link that might help to clarify some of these semantics... me thinks: http://en.wikipedia.org/wiki/Pass_by_reference#Call

Re: [OT] From svn to something else?

2011-05-05 Thread buck
This is what made me choose Mercurial in my recent search. http://www.python.org/dev/peps/pep-0374/ There is a tremendous amount of detail there. In summary, hg and git are both very good, and essentially equal in features. The only salient difference is that hg is implemented in python, so th

Re: What other languages use the same data model as Python?

2011-05-05 Thread harrismh777
Steven D'Aprano wrote: In fairness, he's not the only one. M Harris has twice now linked to an IBM site that describes pass-by-reference in C in terms of passing a pointer to the argument you want as the argument. Admittedly, doing so gives you almost the same behaviour, except that you have to d

Re: Development tools and practices for Pythonistas

2011-05-05 Thread buck
I use hg for even 50-line standalone python scripts. It's very well suited to these small environments, and scales up nicely. cd /my/working/dir hg init hg add myscript.py hg ci -m 'added myscript' It's that simple, and now hyou can go back if you make a terrible mistake, and you can post it t

Re: What other languages use the same data model as Python?

2011-05-05 Thread John Nagle
On 5/5/2011 6:59 AM, Steven D'Aprano wrote: On Thu, 05 May 2011 21:48:20 +1000, Chris Angelico wrote: On Thu, May 5, 2011 at 9:44 PM, Mel wrote: John Nagle wrote: On 5/4/2011 5:46 PM, harrismh777 wrote: Or, as stated earlier, Python should not allow 'is' on immutable objects. A reaso

Re: What other languages use the same data model as Python?

2011-05-05 Thread harrismh777
Mel wrote: represent data indirectly via*some* mechanism. :) Cool! Pass-by-coincidence! And Python 3 already has dibs on the 'nonlocal' keyword! I was thinking pass-by-osmosis :) -- http://mail.python.org/mailman/listinfo/python-list

Re: What other languages use the same data model as Python?

2011-05-05 Thread Steven D'Aprano
On Thu, 05 May 2011 07:43:59 +1000, Ben Finney wrote: > Steven D'Aprano writes: > >> Given the following statement of Python code: >> >> >>> x = "spam" >> >> what is the value of the variable x? > > Mu (無). > > ‘x’ is a name. Names are bound to values. Talk of “variable” only > confuses the is

Re: What other languages use the same data model as Python?

2011-05-05 Thread John Nagle
On 5/5/2011 3:06 AM, Gregory Ewing wrote: John Nagle wrote: A reasonable compromise would be that "is" is treated as "==" on immutable objects. That wouldn't work for tuples, which can contain references to other objects that are not immutable. Such tuples are still identical, even if t

Re: Embedding Python's library as zip file

2011-05-05 Thread Ian Kelly
On Thu, May 5, 2011 at 4:55 AM, Wojtek Mamrak wrote: > Thanks for the reply! > >> Can you import from zip files when running the Python.exe interpreter? > When I zip the folder "Lib" into Python27.zip and later rename it and > try to run the python.exe, I receive an error: > "Import error: no modu

Re: What other languages use the same data model as Python?

2011-05-05 Thread Mel
Steven D'Aprano wrote: > Some day, we'll be using quantum computers without memory addresses, [ ... ] it will still be possible to > represent data indirectly via *some* mechanism. :) Cool! Pass-by-coincidence! And Python 3 already has dibs on the 'nonlocal' keyword! Mel. -- http:

Re: What other languages use the same data model as Python?

2011-05-05 Thread Roy Smith
In article <92fsvjfkg...@mid.individual.net>, Neil Cerutti wrote: > On 2011-05-05, Roy Smith wrote: > > Of course, C++ lets you go off the deep end with abominations > > like references to pointers. Come to think of it, C++ let's > > you go off the deep end in so many ways... > > But you can

Re: What other languages use the same data model as Python?

2011-05-05 Thread Steven D'Aprano
On Wed, 04 May 2011 09:18:56 -0700, Devin Jeanpierre wrote: > On May 4, 9:44 am, Hans Georg Schaathun wrote: >> : The only twist is that you never get to dereference : >> pointers in Python, but you can in C. Not much of a twist if you ask : >> me, but then again, I've been thinki

Re: What other languages use the same data model as Python?

2011-05-05 Thread Steven D'Aprano
On Thu, 05 May 2011 14:14:22 +, Grant Edwards wrote: > On 2011-05-05, harrismh777 wrote: >> Grant Edwards wrote: >>> The "pass by value" and "pass by reference" parameter passing >>> mechanisms are pretty well defined, and C uses "pass by value". >> >> Yeah, that's kind-a funny, cause I'm one

Re: What other languages use the same data model as Python?

2011-05-05 Thread Neil Cerutti
On 2011-05-05, Roy Smith wrote: > Of course, C++ lets you go off the deep end with abominations > like references to pointers. Come to think of it, C++ let's > you go off the deep end in so many ways... But you can do some really cool stuff in the deep end. -- Neil Cerutti -- http://mail.pyth

Re: What other languages use the same data model as Python?

2011-05-05 Thread Steven D'Aprano
On Wed, 04 May 2011 16:22:42 -0600, Ian Kelly wrote: > However, I hope we can all agree that pass-by-pointer shares certain > features with both pass-by-value and pass-by-reference, and there are > perfectly reasonable arguments for lumping it in either category, yes? *cries* Please don't invent

Re: What other languages use the same data model as Python?

2011-05-05 Thread Steven D'Aprano
On Wed, 04 May 2011 14:58:38 -0500, harrismh777 wrote: > Benjamin Kaplan wrote: >> CPython is implemented in C because that's the language chosen. Python >> is also implemented in Java, C#, Python, and several other languages. > > True enough. If I used Jython, I would want to take a look at

Re: What other languages use the same data model as Python?

2011-05-05 Thread Roy Smith
In article <4dc29cdd$0$29991$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > C is better described as a high-level assembler, or a low-level language. > It is too close to the hardware to describe it as high-level, it has no > memory management, few data abstractions, and little

Re: Need to solve the "Stateless HTTP" problem

2011-05-05 Thread Chris Angelico
On Fri, May 6, 2011 at 12:22 AM, Gnarlodious wrote: > My scripting has grown to the point where the Apache server is a > problem. My Python websites run and quit, which means I need to save > data and recreate everything next page load. Bulky and slow. What is > the simplest solution? > > I am run

Re: What other languages use the same data model as Python?

2011-05-05 Thread harrismh777
Steven D'Aprano wrote: You should read Paul Graham on the Blub Paradox: http://www.paulgraham.com/avg.html Excellent-! ... thanks, fun article. ... where is that lisp manual anyway? ... oh, yeah, emacs! :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Need to solve the "Stateless HTTP" problem

2011-05-05 Thread garabik-news-2005-05
Gnarlodious wrote: > My scripting has grown to the point where the Apache server is a > problem. My Python websites run and quit, which means I need to save > data and recreate everything next page load. Bulky and slow. What is > the simplest solution? Karrigell? --

Re: Today's fun and educational Python recipe

2011-05-05 Thread nn
On May 4, 2:17 pm, Raymond Hettinger wrote: > Here's a 22-line beauty for a classic and amazing > algorithm:http://bit.ly/bloom_filter > > The wiki article on the algorithm is brief and > well-written:http://en.wikipedia.org/wiki/Bloom_filter > > It turns out that people in the 1970's were prett

Re: What other languages use the same data model as Python?

2011-05-05 Thread Grant Edwards
On 2011-05-05, Steven D'Aprano wrote: > On Wed, 04 May 2011 14:22:38 -0500, harrismh777 wrote: > >> Here is the thing that everyone forgets... all we have to work with >> is a von Neumann processor. (same as EDVAC, ENIAC, the VIC20, etc). > > Actually, this is incorrect. Most processors these

Re: What other languages use the same data model as Python?

2011-05-05 Thread Roy Smith
In article , Grant Edwards wrote: > That's what I was trying to say, but probably not as clearly. The "&" > operatore returnas a _value_ that the OP passes _by_value_ to a > function. That function then uses the "*" operator to use that value > to access some data. Then, of course, there's re

Re: What other languages use the same data model as Python?

2011-05-05 Thread Grant Edwards
On 2011-05-05, Gregory Ewing wrote: > harrismh777 wrote: >> 'C' is still the best high-level language on that processor. > > Some would argue that C is actually better than assembler these > days, because modern architectures are so freaking complicated > that it takes a computer to figure out th

Re: What other languages use the same data model as Python?

2011-05-05 Thread Grant Edwards
On 2011-05-05, harrismh777 wrote: > Dennis Lee Bieber wrote: >>> > We do not consider passing a pointer as*by value* because its an >>> > address; by definition, that is pass-by-reference. We are not passing >> To most of the world, pass-by-reference means the COMPILER, not the >> PROGRAMM

Re: What other languages use the same data model as Python?

2011-05-05 Thread Grant Edwards
On 2011-05-05, Gregory Ewing wrote: > Hans Georg Schaathun wrote: >> Is transmission by name the same as call by object? > > No, it's not. With call-by-name, the caller passes a > small function (known as a "thunk") that calculates the > address of the parameter. Every time the callee needs to > r

Need to solve the "Stateless HTTP" problem

2011-05-05 Thread Gnarlodious
My scripting has grown to the point where the Apache server is a problem. My Python websites run and quit, which means I need to save data and recreate everything next page load. Bulky and slow. What is the simplest solution? I am running Py3 on OSX Server with Apache 2. Essentially I want certain

Re: What other languages use the same data model as Python?

2011-05-05 Thread Grant Edwards
On 2011-05-05, harrismh777 wrote: > Tim Roberts wrote: >> The fact that the parameter "a" >> in BumpMe happens to be an address is completely irrelevent to the >> definition of the parameter passing mechanism. >> >> C has pass-by-value, exclusively. End of story. > > Yeah, Tim, I know... but that

Re: PIL: The _imaging C module is not installed

2011-05-05 Thread Albert Hopkins
Oh I forgot to say, after installing these libraries, you will need to re-compile (install) PIL. -a -- http://mail.python.org/mailman/listinfo/python-list

Re: What other languages use the same data model as Python?

2011-05-05 Thread Grant Edwards
On 2011-05-05, Gregory Ewing wrote: > harrismh777 wrote: >> 'C' does provide for pointers which are used by all 'C' >> programmers to firmly provide pass-by-reference in their coding > > Yes, but when they do that, they're building an abstraction > of their own on top of the facilities provided b

Re: PIL: The _imaging C module is not installed

2011-05-05 Thread Albert Hopkins
On Thu, 2011-05-05 at 15:35 +0200, Nico Grubert wrote: > Hi there > > I am having trouble to install PIL 1.1.7 on CentOS. > > I read and followed the instructions from > http://effbot.org/zone/pil-imaging-not-installed.htm > > However, I still get the "The _imaging C module is not installed" err

Re: What other languages use the same data model as Python?

2011-05-05 Thread Grant Edwards
On 2011-05-05, harrismh777 wrote: > Grant Edwards wrote: >> The "pass by value" and "pass by reference" parameter passing >> mechanisms are pretty well defined, and C uses "pass by value". > > Yeah, that's kind-a funny, cause I'm one of the guys (old farts) that > helped define them I give u

Re: What other languages use the same data model as Python?

2011-05-05 Thread Steven D'Aprano
On Wed, 04 May 2011 20:11:02 -0500, harrismh777 wrote: > These definitions go all the way back before the 8080, or the 6502, 8 > bit processors. Pass by reference has 'always' meant pass by using a > memory address (indirect addressing); a reference has always been a > memory pointer. That's

Re: Embedding Python's library as zip file

2011-05-05 Thread Alec Taylor
ZIP is the wrong format. Use UPX with LZMA On Thu, May 5, 2011 at 8:55 PM, Wojtek Mamrak wrote: > Thanks for the reply! > >> Can you import from zip files when running the Python.exe interpreter? > When I zip the folder "Lib" into Python27.zip and later rename it and > try to run the python.exe,

Re: What other languages use the same data model as Python?

2011-05-05 Thread Steven D'Aprano
On Thu, 05 May 2011 21:48:20 +1000, Chris Angelico wrote: > On Thu, May 5, 2011 at 9:44 PM, Mel wrote: >> John Nagle wrote: >>> On 5/4/2011 5:46 PM, harrismh777 wrote: Or, as stated earlier, Python should not allow 'is' on immutable objects. >>> >>>     A reasonable compromise would be

PIL: The _imaging C module is not installed

2011-05-05 Thread Nico Grubert
Hi there I am having trouble to install PIL 1.1.7 on CentOS. I read and followed the instructions from http://effbot.org/zone/pil-imaging-not-installed.htm However, I still get the "The _imaging C module is not installed" error if I run the selftest: $ python selftest.py *** The _imaging C m

Re: What other languages use the same data model as Python?

2011-05-05 Thread Neil Cerutti
On 2011-05-04, John Nagle wrote: > That's a quirk of CPython's boxed number implementation. All > integers are boxed, but there's a set of canned objects for > small integers. CPython's range for this is -5 to +256, > incidentally. That's visible through the "is" operator. > Arguably, it shoul

Re: : PiCloud - really cool!

2011-05-05 Thread Asdrúbal Iván Suárez Rivera
On May 4, 8:13 pm, James Mills wrote: > If anyone hasn't seen this yet, I encourage you to! > (I stumbled upon it with some random thoughts and Gooogling) > > http://www.picloud.com/ > > Here's a quick test I wrote up that works locally using the simulator > and live (I did run it live): > > #!/us

Re: What other languages use the same data model as Python?

2011-05-05 Thread Steven D'Aprano
On Wed, 04 May 2011 14:22:38 -0500, harrismh777 wrote: > Here is the thing that everyone forgets... all we have to work with > is a von Neumann processor. (same as EDVAC, ENIAC, the VIC20, etc). Actually, this is incorrect. Most processors these days are hybrids between that and either the H

Re: What other languages use the same data model as Python?

2011-05-05 Thread Chris Angelico
On Thu, May 5, 2011 at 10:14 PM, Steven D'Aprano wrote: > More importantly, Python need not be implemented at all. If you're stuck > on a desert island without electricity, you could simulate the effect of > running any arbitrary Python code merely by understanding the semantics > of high-level Py

Re: What other languages use the same data model as Python?

2011-05-05 Thread Steven D'Aprano
On Wed, 04 May 2011 15:46:07 -0400, Benjamin Kaplan wrote: > On Wed, May 4, 2011 at 3:22 PM, harrismh777 > wrote: [...] >>> Digging down into C should be unnecessary to explain Python. >> >> >>   huh?   You have to be kidding. Why do you suppose we want it to be >> open-sourced?   Use the force

Re: What other languages use the same data model as Python?

2011-05-05 Thread Mel
Tim Roberts wrote: > That is not an instance of passing an "int" by reference. That is an > instance of passing an "int *" by value. The fact that the parameter "a" > in BumpMe happens to be an address is completely irrelevent to the > definition of the parameter passing mechanism. > > C has pas

Re: What other languages use the same data model as Python?

2011-05-05 Thread Chris Angelico
On Thu, May 5, 2011 at 9:44 PM, Mel wrote: > John Nagle wrote: >> On 5/4/2011 5:46 PM, harrismh777 wrote: >>> Or, as stated earlier, Python should not allow 'is' on immutable objects. >> >>     A reasonable compromise would be that "is" is treated as "==" on >> immutable objects. > > I foresee tro

Re: What other languages use the same data model as Python?

2011-05-05 Thread Mel
John Nagle wrote: > On 5/4/2011 5:46 PM, harrismh777 wrote: >> Or, as stated earlier, Python should not allow 'is' on immutable objects. > > A reasonable compromise would be that "is" is treated as "==" on > immutable objects. I foresee trouble testing among float(5), int(5), Decimal(5) ...

Re: Embedding Python's library as zip file

2011-05-05 Thread Wojtek Mamrak
Thanks for the reply! > Can you import from zip files when running the Python.exe interpreter? When I zip the folder "Lib" into Python27.zip and later rename it and try to run the python.exe, I receive an error: "Import error: no module named site" > Is the zip file included in sys.path? You mig

Re: What other languages use the same data model as Python?

2011-05-05 Thread Hans Georg Schaathun
On Thu, 05 May 2011 20:55:36 +1200, Gregory Ewing wrote: : It's not clear to me that references are any more abstract : than objects, or to put it another way, that objects are : any less abstract than references. : : After all, in normal Python usage you never actually : *see* an object

Re: What other languages use the same data model as Python?

2011-05-05 Thread Gregory Ewing
harrismh777 wrote: 'C' does provide for pointers which are used by all 'C' programmers to firmly provide pass-by-reference in their coding Yes, but when they do that, they're building an abstraction of their own on top of the facilities provided by the C language. C itself has no notion of pass

Re: What other languages use the same data model as Python?

2011-05-05 Thread Gregory Ewing
John Nagle wrote: A reasonable compromise would be that "is" is treated as "==" on immutable objects. That wouldn't work for tuples, which can contain references to other objects that are not immutable. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Python competitions and learnings

2011-05-05 Thread Alexander Lyabah
On May 1, 12:29 am, Terry Reedy wrote: > On 4/30/2011 3:22 PM, Alexander Lyabah wrote: > > > I spend a lot of time in writing a new service checkio.org > > > It's all about python, learn python, find the best solution in > > python. > > > And Im looking for feedback from peoples who best in python

Re: What other languages use the same data model as Python?

2011-05-05 Thread Gregory Ewing
harrismh777 wrote: That is the $10,000,000 dollar problem... how to extricate ourselves from the von Neumann processor. *Everthing* comes down to that... its hilarious to hear folks talk about lambda the ultimate (especially those guys on Lambda the Ultimate) when there is no such thing until

Re: What other languages use the same data model as Python?

2011-05-05 Thread Chris Angelico
On Thu, May 5, 2011 at 7:08 PM, Gregory Ewing wrote: > harrismh777 wrote: >> >> 'C'  is still the best high-level language on that processor. > > Some would argue that C is actually better than assembler these > days, because modern architectures are so freaking complicated > that it takes a compu

Re: What other languages use the same data model as Python?

2011-05-05 Thread Gregory Ewing
harrismh777 wrote: 'C' is still the best high-level language on that processor. Some would argue that C is actually better than assembler these days, because modern architectures are so freaking complicated that it takes a computer to figure out the best instruction sequence. :-( -- Greg -- h

Re: What other languages use the same data model as Python?

2011-05-05 Thread Gregory Ewing
Hans Georg Schaathun wrote: With the references being purely abstract entities and not data objects, It's not clear to me that references are any more abstract than objects, or to put it another way, that objects are any less abstract than references. After all, in normal Python usage you neve

Re: python on iPad (PyPad)

2011-05-05 Thread Drew
On Apr 10, 1:48 am, Matt Schinckel wrote: > On Apr 9, 2:13 pm, Jon Dowdall wrote: > > > Hi All, > > > Sorry for the blatant advertising but hope some of you may be interested > > to know that I've created an iPad application containing the python > > interpreter and a simple execution environment

Re: What other languages use the same data model as Python?

2011-05-05 Thread Hans Georg Schaathun
On Wed, 04 May 2011 20:11:02 -0500, harrismh777 wrote: : A reference is a pointer (an address). : : A value is memory (not an address). Sure, and pointers (from a hardware or C perspective) are memory, hence pointers are values. -- :-- Hans Georg -- http://mail.python.org/mailman/listi

Re: What other languages use the same data model as Python?

2011-05-05 Thread Hans Georg Schaathun
On Wed, 04 May 2011 16:49:25 -0500, harrismh777 wrote: : Folks seem to think that because they are doing abstraction at a : high-level (well, they never maybe programmed at a lower level) that : abstraction somehow 'requires' a high level language. (not true) I never said 'requires', but