Re: Custom string joining

2011-05-09 Thread Claudiu Popa
Hello Terry, Thanks, I understand now. Tuesday, May 10, 2011, 2:16:24 AM, you wrote: > On 5/9/2011 4:25 PM, Claudiu Popa wrote: >> I already told in the first post that I've implemented __str__ function, >> but it doesn't seems to be automatically called. > No, Python does not auto-coerce to

Re: Testing tools classification

2011-05-09 Thread Gabriel Genellina
En Sat, 07 May 2011 02:21:02 -0300, rusi escribió: There is this nice page of testing tools taxonomy: http://pycheesecake.org/wiki/PythonTestingToolsTaxonomy But it does not list staf: http://staf.sourceforge.net/index.php. The good thing about wikis is, you can add it yourself. -- Gabriel

Re: input() or raw_input() in Console module.

2011-05-09 Thread alex23
On May 9, 10:13 pm, ander2_1...@hotmail.com wrote: > I'm using Console module (doc:http://effbot.org/zone/console-handbook.htm, > like nCurses) on Windows, but I don't know how to call a keyboard > input like input() or raw_input(). > What to do? Maybe read the docs, specifically the section title

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

2011-05-09 Thread Steven D'Aprano
On Tue, 10 May 2011 13:49:04 +1200, Gregory Ewing wrote: > Steven D'Aprano wrote: > >> It's just that the term "variable" is so useful and so familiar that >> it's easy to use it even for languages that don't have variables in the >> C/ Pascal/Fortran/etc sense. > > Who says it has to have the P

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

2011-05-09 Thread MRAB
On 10/05/2011 02:51, Gregory Ewing wrote: Steven D'Aprano wrote: Or Chinese Gooseberries, better known by the name thought up by a marketing firm, "kiwi fruit". And I'm told that there is a language (one of the Nordic ones, IIRC) where "kiwi" means "stone". So in that country they wonder why

codecs.open() doesn't handle platform-specific line terminator

2011-05-09 Thread John Machin
According to the 3.2 docs (http://docs.python.org/py3k/library/codecs.html#codecs.open), """Files are always opened in binary mode, even if no binary mode was specified. This is done to avoid data loss due to encodings using 8-bit values. This means that no automatic conversion of b'\n' is done on

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

2011-05-09 Thread Gregory Ewing
Steven D'Aprano wrote: Or Chinese Gooseberries, better known by the name thought up by a marketing firm, "kiwi fruit". And I'm told that there is a language (one of the Nordic ones, IIRC) where "kiwi" means "stone". So in that country they wonder why they should be getting so excited about som

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

2011-05-09 Thread Gregory Ewing
Steven D'Aprano wrote: It's just that the term "variable" is so useful and so familiar that it's easy to use it even for languages that don't have variables in the C/ Pascal/Fortran/etc sense. Who says it has to have the Pascal/Fortran/etc sense? Why should static languages have a monopoly on

Re: Dictionary from String?

2011-05-09 Thread python
On May 9, 9:33 pm, python wrote: > On May 8, 12:43 pm, Benjamin Kaplan wrote: > > > > > > > > > > > On Sun, May 8, 2011 at 8:20 AM, Greg Lindstrom > > wrote: > > > Is it possible to create a dictionary from a string value?  Something > > > along > > > these lines (but that works): > > > m

Re: Dictionary from String?

2011-05-09 Thread python
On May 8, 12:43 pm, Benjamin Kaplan wrote: > On Sun, May 8, 2011 at 8:20 AM, Greg Lindstrom wrote: > > Is it possible to create a dictionary from a string value?  Something along > > these lines (but that works): > > mystring = "{'name':'greg','hatsize':'7 5/8'}" > mystring > > "{'name'

Re: How to access elemenst in a list of lists?

2011-05-09 Thread Terry Reedy
On 5/9/2011 8:44 PM, Algis Kabaila wrote: The method of double indexing in the manner a[i][j] for the (i, j) -th element of multi-dimensional array is well known and widely used. But how to enable the "standard" matrix notation a[i, j] in Python 3.2 in the manner of numpy (and other matrix packa

Re: Overuse of try/except/else?

2011-05-09 Thread James Mills
On Tue, May 10, 2011 at 10:40 AM, Kyle T. Jones wrote: > It has been hard for me to determine what would constitute overuse. A rule of thumb I always follow and practice is: "Let the error lie where it occurred." or "Don't hide errors.". It's good practice to follow IHMO as it makes it easier

Re: How to access elemenst in a list of lists?

2011-05-09 Thread Algis Kabaila
On Tuesday 10 May 2011 05:24:16 Terry Reedy wrote: > On 5/9/2011 4:25 AM, Antonio CHESSA wrote: > > apple = > > [["a","b","c"],[1,2,3,4,5,6],["antony","max","sandra","seb > > astian"]] > >for j in range (len(apple[i])): > > print apple[i][j] > > While this illustrate double indexing, it

Overuse of try/except/else?

2011-05-09 Thread Kyle T. Jones
It has been hard for me to determine what would constitute overuse. Cheers. -- http://mail.python.org/mailman/listinfo/python-list

Re: scipy

2011-05-09 Thread Algis Kabaila
On Tuesday 10 May 2011 04:13:55 pb wrote: > On May 9, 3:34 pm, Robert Kern wrote: > > On 5/9/11 3:35 AM, pb wrote: > > > On May 9, 12:29 am, Terry Reedy wrote: > > >> On 5/8/2011 6:44 AM, pb wrote: > > >>> Hi, > > >>> I', having trouble with scipy. > > >> > > >> If you do not get an answer here,

Re: checking if a list is empty

2011-05-09 Thread harrismh777
Steven D'Aprano wrote: If I were talking to a programming n00b, I would have been more careful, but you've made numerous references to your long, long programming experience and I thought you would be able to draw the obvious connection without me insulting you by stating the obvious. Pedantics

Re: checking if a list is empty

2011-05-09 Thread harrismh777
Steven D'Aprano wrote: Python uses a boolean algebra where there are many ways of spelling the true and false values. The "not" operator returns the canonical bool values: Take note of the distinction between lower-case true/false, which are adjectives, and True/False,

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Steven D'Aprano
On Mon, 09 May 2011 15:09:32 -0400, James Wright wrote: > Thank you Steven, > > I will take your advice :) In this particular case though, I do not > think a lack of underscore is the issue, at least as far as I can > understand the issue. Please see my reply to Ethan. In your reply to Ethan,

Re: checking if a list is empty

2011-05-09 Thread Ben Finney
Steven D'Aprano writes: > I'm sorry that I failed to make that more explicit. If I were talking > to a programming n00b, I would have been more careful, but you've made > numerous references to your long, long programming experience and I > thought you would be able to draw the obvious connection

Re: checking if a list is empty

2011-05-09 Thread Steven D'Aprano
On Mon, 09 May 2011 16:58:14 -0500, harrismh777 wrote: > Ian Kelly wrote: >> "bool(list)" describes whether the list contains something. "Not" >> being a logical operator, it stands to reason that "not list" should >> mean the same thing as "not bool(list)". > > Ian, James, > > Agreed, and

Re: Custom string joining

2011-05-09 Thread Terry Reedy
On 5/9/2011 4:25 PM, Claudiu Popa wrote: I already told in the first post that I've implemented __str__ function, > but it doesn't seems to be automatically called. No, Python does not auto-coerce to strings (only between numbers). You have to be explicit by calling str. Karim's statement "Yo

Re: checking if a list is empty

2011-05-09 Thread harrismh777
Ian Kelly wrote: "bool(list)" describes whether the list contains something. "Not" being a logical operator, it stands to reason that "not list" should mean the same thing as "not bool(list)". Ian, James, Agreed, and thank you. This *is* the explanation I was trying to prompt D'Aprano fo

Re: Finding the bitness of an arbitrary executable with Python

2011-05-09 Thread Andrew Berg
On 2011.05.09 04:10 PM, Irmen de Jong wrote: > http://stackoverflow.com/questions/1345632/determine-if-an-executable-or-library-is-32-or-64-bits-on-windows The code using struct doesn't look terribly complicated, so that could work. I might need to inspect other executable types, but I don't see it

Re: Custom string joining

2011-05-09 Thread Martineau
On May 9, 1:25 pm, Claudiu Popa wrote: > Hello Karim, > > > You just have to implement __str__() python special method for your > > "custom_objects". > > Regards > > Karim > >> Cheers, > >> Chris > >> -- > >>http://rebertia.com > > I  already told in the first post that I've implemented __str__ fu

Re: checking if a list is empty

2011-05-09 Thread Terry Reedy
On 5/8/2011 7:36 PM, Dan Stromberg wrote: On Sun, May 8, 2011 at 3:41 PM, Terry Reedy mailto:tjre...@udel.edu>> wrote: Because inductive algorithms commonly branch on 'input is something' (not done, change args toward 'nothing'and recurse or iterate) versus 'input is nothing (done

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

2011-05-09 Thread harrismh777
Gregory Ewing wrote: +-+ +---+ | | a | --+>| | +---+ | | +-+ ^ +---+

Re: Finding the bitness of an arbitrary executable with Python

2011-05-09 Thread Robert Kern
On 5/9/11 3:52 PM, Andrew Berg wrote: I need to find whether a given file is 32-bit or 64-bit (and raise an exception if the file doesn't exist or isn't an executable file). I thought platform.architecture() would do this, but it returns ('64bit', '') no matter what value I assign to the executab

Re: Coolest Python recipe of all time

2011-05-09 Thread Raymond Hettinger
On May 9, 2:31 am, Trent Nelson wrote: > > What are your favorites? > > I think I've posted this before, but I love my > 3-lines-if-you-ignore-the-scaffolding language translator.  Not because it's > clever code -- quite the opposite, the code is dead simple -- but because it > encompasses one

Re: Finding the bitness of an arbitrary executable with Python

2011-05-09 Thread Irmen de Jong
On 9-5-2011 22:52, Andrew Berg wrote: > I need to find whether a given file is 32-bit or 64-bit (and raise an > exception if the file doesn't exist or isn't an executable file). I > thought platform.architecture() would do this, but it returns ('64bit', > '') no matter what value I assign to the ex

Re: Finding the bitness of an arbitrary executable with Python

2011-05-09 Thread Richard Thomas
On May 9, 9:52 pm, Andrew Berg wrote: > I need to find whether a given file is 32-bit or 64-bit (and raise an > exception if the file doesn't exist or isn't an executable file). I > thought platform.architecture() would do this, but it returns ('64bit', > '') no matter what value I assign to the e

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

2011-05-09 Thread Hans Georg Schaathun
On Mon, 9 May 2011 21:18:29 +1000, Chris Angelico wrote: : Analogies are like diagrams. Not all of them are perfect or useful. : : The boxes are different sizes. If you really want them to look : different, do one as squares and one as circles, but don't try that in : plain text. Analogies

Finding the bitness of an arbitrary executable with Python

2011-05-09 Thread Andrew Berg
I need to find whether a given file is 32-bit or 64-bit (and raise an exception if the file doesn't exist or isn't an executable file). I thought platform.architecture() would do this, but it returns ('64bit', '') no matter what value I assign to the executable parameter (looks like it uses the giv

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Terry Reedy
On 5/9/2011 2:10 PM, James Wright wrote: Hello, I have been using a script on several boxes that have been around for a while, and everything works just fine. I am finding though, that on some new OS installs the script fails with: Traceback (most recent call last): File "render4.py", line

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ethan Furman
James Wright wrote: On Mon, May 9, 2011 at 4:04 PM, Ethan Furman wrote: James Wright wrote: On Mon, May 9, 2011 at 3:36 PM, Ethan Furman wrote: Change your print line to: print("D4[%s] = %s" % (report, each_value)) After that, you'll have to track down how D4 is being created to see

Re: Custom string joining

2011-05-09 Thread Claudiu Popa
Hello Karim, > You just have to implement __str__() python special method for your > "custom_objects". > Regards > Karim >> Cheers, >> Chris >> -- >> http://rebertia.com I already told in the first post that I've implemented __str__ function, but it doesn't seems to be automatically called.

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

2011-05-09 Thread Terry Reedy
On 5/9/2011 10:29 AM, Steven D'Aprano wrote: If people then ask, how does the interpreter know the names?, I can add more detail: names are actually strings in a namespace, which is usually nothing more than a dict. Oh, and inside functions, it's a bit more complicated still. And so on. Which

Re: Custom string joining

2011-05-09 Thread Karim
On 05/07/11 16:25, Chris Rebert wrote: On Sat, May 7, 2011 at 5:31 AM, Claudiu Popa wrote: Hello Python-list, I have an object which defines some methods. I want to join a list or an iterable of those objects like this: new_string = "|".join(iterable_of_custom_objects) What is the __

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Sorry Alex, and thank you. On Mon, May 9, 2011 at 4:02 PM, Alex Willmer wrote: > (Direct reply to me, reposted on Jame's behalf) > > > > Hi Alex, > > On Mon, May 9, 2011 at 3:21 PM, Alex Willmer > wrote: >> On May 9, 8:10 pm, James Wright wrote: >>> Hello Ian, >>> >>> It does indeed to seem tha

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Hello Ethan, On Mon, May 9, 2011 at 4:04 PM, Ethan Furman wrote: > James Wright wrote: >> >> On Mon, May 9, 2011 at 3:36 PM, Ethan Furman wrote: >>> >>> Change your print line to: >>> >>>   print("D4[%s] = %s" % (report, each_value)) >>> >>> After that, you'll have to track down how D4 is being

Re: Custom string joining

2011-05-09 Thread Ian Kelly
On Mon, May 9, 2011 at 1:26 PM, Martineau wrote: > Instead of join() here's a function that does something similar to > what the string join() method does. The first argument can be a list > of any type of objects and the second separator argument can likewise > be any type. The result is list of

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Alex Willmer
(Direct reply to me, reposted on Jame's behalf) Hi Alex, On Mon, May 9, 2011 at 3:21 PM, Alex Willmer wrote: > On May 9, 8:10 pm, James Wright wrote: >> Hello Ian, >> >> It does indeed to seem that way. However the script works just fine >> on other machines, with the same input file. > > Ho

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ethan Furman
James Wright wrote: On Mon, May 9, 2011 at 3:36 PM, Ethan Furman wrote: Change your print line to: print("D4[%s] = %s" % (report, each_value)) After that, you'll have to track down how D4 is being created to see where 'vsr' is coming from. It does not appear to show a key: D4[] = vsr

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ian Kelly
On Mon, May 9, 2011 at 1:29 PM, James Wright wrote: > It does not appear to show a key: > > D4[] = vsr > Traceback (most recent call last): >  File "render4.py", line 115, in >    create_report_index(each_item) >  File "render4.py", line 26, in create_report_index >    [clean_name, _] = each_valu

Re: Custom string joining

2011-05-09 Thread Martineau
On May 7, 5:31 am, Claudiu Popa wrote: > Hello Python-list, > > I  have  an object which defines some methods. I want to join a list or > an iterable of those objects like this: > > new_string = "|".join(iterable_of_custom_objects) > > What   is   the   __magic__  function that needs to be impleme

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
On Mon, May 9, 2011 at 3:36 PM, Ethan Furman wrote: > James Wright wrote: >> >> Thank you Ethan, >> >> This is what I see now: >> >> # python render4.py >> current each_value is: vsr >> Traceback (most recent call last): >>  File "render4.py", line 115, in >>    create_report_index(each_item) >>

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread MRAB
On 09/05/2011 20:10, James Wright wrote: On Mon, May 9, 2011 at 2:41 PM, Ian Kelly wrote: On Mon, May 9, 2011 at 12:10 PM, James Wright wrote: Hello, I have been using a script on several boxes that have been around for a while, and everything works just fine. I am finding though, that on s

Re: How to access elemenst in a list of lists?

2011-05-09 Thread Terry Reedy
On 5/9/2011 4:25 AM, Antonio CHESSA wrote: apple = [["a","b","c"],[1,2,3,4,5,6],["antony","max","sandra","sebastian"]] apple[0] = ["a","b","c"] apple[1] = [1,2,3,4,5,6] apple[2] = ["antony","max","sandra","sebastian"] apple[0][1] = "b" apple[2][3] = "sebastian" to view all videos in a loop so

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ethan Furman
James Wright wrote: Thank you Ethan, This is what I see now: # python render4.py current each_value is: vsr Traceback (most recent call last): File "render4.py", line 115, in create_report_index(each_item) File "render4.py", line 26, in create_report_index [clean_name, _] = each_va

Missing 'line' event when writing to frame.f_lineno in trace function

2011-05-09 Thread CTS
Hello all, I've been playing with sys.settrace() in an attempt to better understand how trace functions (and debugging) work. I'm running Python3.2 on Windows, which I installed by running the installer package (i.e. I did not compile from source code). Here's my code, some of which I borrowed fr

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Hello Ian, It does indeed to seem that way. However the script works just fine on other machines, with the same input file. Thanks, James On Mon, May 9, 2011 at 2:41 PM, Ian Kelly wrote: > On Mon, May 9, 2011 at 12:10 PM, James Wright wrote: >> Hello, >> >> I have been using a script on sev

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Thank you Steven, I will take your advice :) In this particular case though, I do not think a lack of underscore is the issue, at least as far as I can understand the issue. Please see my reply to Ethan. Thanks, James On Mon, May 9, 2011 at 2:43 PM, Steven D'Aprano wrote: > On Mon, 09 May 2

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Thank you Ethan, This is what I see now: # python render4.py current each_value is: vsr Traceback (most recent call last): File "render4.py", line 115, in create_report_index(each_item) File "render4.py", line 26, in create_report_index [clean_name, _] = each_value.split('_', 1) Valu

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Steven D'Aprano
On Mon, 09 May 2011 14:10:21 -0400, James Wright wrote: > Hello, > > I have been using a script on several boxes that have been around for a > while, and everything works just fine. I am finding though, that on > some new OS installs the script fails with: > > Traceback (most recent call last):

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ethan Furman
James Wright wrote: Hello, Howdy! def create_report_index(report): #Here we are creating a simple index.html file from data in a text file newfile = open(report + '.html', 'w') #Create the index file using report name for each_value in D4[report]: [clean_name, _] = each_value

Re: Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread Ian Kelly
On Mon, May 9, 2011 at 12:10 PM, James Wright wrote: > Hello, > > I have been using a script on several boxes that have been around for > a while, and everything works just fine.  I am finding though, that on > some new OS installs the script fails with: > > Traceback (most recent call last): >  F

can't get urllib2 or httplib to work with tor & privoxy

2011-05-09 Thread Bob Fnord
Here's my python code: import httplib, urllib2 proxy_handler = {'http' : 'localhost:8118', 'https' : 'localhost:8118'} def connect_u2(url = 'http://ipid.shat.net/iponly/'):, proxied = urllib2.ProxyHandler(proxy_handler) opnr = urllib2.build_opener(proxied) opnr.addhe

Re: PIL: The _imaging C module is not installed

2011-05-09 Thread Irmen de Jong
On 9-5-2011 8:22, Nico Grubert wrote: >> I had this happening to me as well someday. >> I recall that first installing it (python setup.py install), and then >> rerunning selftest, solved that error. > > I tried that as well. > Here is the summary of the install process: > > build/temp.linux-x86_

Re: scipy

2011-05-09 Thread pb
On May 9, 3:34 pm, Robert Kern wrote: > On 5/9/11 3:35 AM, pb wrote: > > > On May 9, 12:29 am, Terry Reedy  wrote: > >> On 5/8/2011 6:44 AM, pb wrote: > > >>> Hi, > >>> I', having trouble with scipy. > > >> If you do not get an answer here, try the scipy list where scipy experts > >> hang out. You

Inconsistency with split() - Script, OS, or Package Problem?

2011-05-09 Thread James Wright
Hello, I have been using a script on several boxes that have been around for a while, and everything works just fine. I am finding though, that on some new OS installs the script fails with: Traceback (most recent call last): File "render4.py", line 114, in create_report_index(each_item)

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

2011-05-09 Thread Mel
Steven D'Aprano wrote: > It's not an awful model for Python: a name binding a = obj is equivalent > to sticking a reference (a pointer?) in box a that points to obj. > Certainly there are advantages to it. > > But one problem is, the model is ambiguous with b = a. You've drawn > little boxes a an

Re: Zope with mySQL

2011-05-09 Thread Chris Withers
Hi Harry, You'd be better off asking this on the z...@zope.org mailing list... cheers, Chris On 28/04/2011 20:19, harryjatt wrote: Hi, i am doing web development with Zope. My connected database is mySQL. I am new to this combination.I have to upload the files to mySQL with programming in zo

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

2011-05-09 Thread Ethan Furman
Steven D'Aprano wrote: But that's wrong! Names (little boxes) can't point to *slots in a list*, any more than they can point to other names! This doesn't work: --> L = [None, 42, None] --> a = L[0] --> L[0] = 23 --> print(a) # This doesn't work! 23 Minor nitpick -- having a comment saying

Re: A suggestion for an easy logger

2011-05-09 Thread Vinay Sajip
On May 9, 3:53 pm, TheSaint wrote: > Vinay Sajip wrote: > >logging.basicConfig(level=logging.DEBUG, format='%(message)s') > > logging.basicConfig(format='%(message)s', level=logging.DEBUG) > > I formulated in the reverse order of arguments, may that cause an > unpredicted result? No, you can pass

RE: setuptools for 64-bit 2.7.1 on 64-bit Windows 7?

2011-05-09 Thread Dick Bridges
David, Thanks for the link. I'd scanned but skipped it because it was "third-party". This time I started following some of the links and finally found the link for distutils: http://pypi.python.org/pypi/distribute#installation-instructions. Works like a charm. Thanks for pointing me back to that

Re: A suggestion for an easy logger

2011-05-09 Thread TheSaint
Vinay Sajip wrote: > logging.basicConfig(level=logging.DEBUG, format='%(message)s') logging.basicConfig(format='%(message)s', level=logging.DEBUG) I formulated in the reverse order of arguments, may that cause an unpredicted result? The other points became clearer.. Once again Thank You --

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

2011-05-09 Thread Tim Golden
On 09/05/2011 15:29, Steven D'Aprano wrote: [... snippage galore ...] Slightly abstract comment: while I don't usually get much enjoyment out of the regular "Python is call-by-value; no it isn't; yes it is" debates, I always enjoy reading Steven D'Aprano's responses. Thanks, Mr D'A. :) TJG --

Re: scipy

2011-05-09 Thread Robert Kern
On 5/9/11 3:35 AM, pb wrote: On May 9, 12:29 am, Terry Reedy wrote: On 5/8/2011 6:44 AM, pb wrote: Hi, I', having trouble with scipy. If you do not get an answer here, try the scipy list where scipy experts hang out. You might also try searching the archives of that list or the scipy bug tr

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

2011-05-09 Thread Steven D'Aprano
On Mon, 09 May 2011 12:52:27 +1200, Gregory Ewing wrote: > Steven D'Aprano wrote: > >> Since you haven't explained what you think is happening, I can only >> guess. > > Let me save you from guessing. I'm thinking of a piece of paper with a > little box on it and the name 'a' written beside it. T

input() or raw_input() in Console module.

2011-05-09 Thread ander2_1434
I'm using Console module (doc: http://effbot.org/zone/console-handbook.htm, like nCurses) on Windows, but I don't know how to call a keyboard input like input() or raw_input(). What to do? -- http://mail.python.org/mailman/listinfo/python-list

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

2011-05-09 Thread Chris Angelico
On Mon, May 9, 2011 at 8:38 PM, Hans Georg Schaathun wrote: > The flaw of this model, and I am not discounting its merits, just > pointing out that it isn't perfect, is that it creates the illusion > that references are boxes (objects) just like data objects, leading > the reader to think that we

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

2011-05-09 Thread Hans Georg Schaathun
On Mon, 09 May 2011 12:52:27 +1200, Gregory Ewing wrote: : Let me save you from guessing. I'm thinking of a piece of paper with : a little box on it and the name 'a' written beside it. There is an : arrow from that box to a bigger box. : : +-+ :

Re: FW: AYUDA PORFAVOR. HELP ME, PLEASE. SCRIP EXPORT TO .TM

2011-05-09 Thread Felipe Vinturini
On Mon, May 9, 2011 at 6:05 AM, EnyGmA Más Pro wrote: > aYudenme porfavor. Gracias. > > -- > From: jean_p...@hotmail.es > To: python-list@python.org; h...@python.org; > pycolom...@listas.el-directorio.org > Subject: HELP ME, PLEASE. SCRIP EXPORT TO .TM > Date: Mon, 9

Re: PIL: The _imaging C module is not installed

2011-05-09 Thread Christian Heimes
Am 09.05.2011 08:22, schrieb Nico Grubert: > $ python selftest.py > *** The _imaging C module is not installed It works for me after an inplace installation of the C extensions with "python setup.py build_ext -i". With build_ext -i the C extension is installed inside the source tree so selftest ca

RE: Coolest Python recipe of all time

2011-05-09 Thread Trent Nelson
> What are your favorites? I think I've posted this before, but I love my 3-lines-if-you-ignore-the-scaffolding language translator. Not because it's clever code -- quite the opposite, the code is dead simple -- but because it encompasses one of the things I love about Python the most: it gets

FW: AYUDA PORFAVOR. HELP ME, PLEASE. SCRIP EXPORT TO .TM

2011-05-09 Thread EnyGmA Más Pro
aYudenme porfavor. Gracias. From: jean_p...@hotmail.es To: python-list@python.org; h...@python.org; pycolom...@listas.el-directorio.org Subject: HELP ME, PLEASE. SCRIP EXPORT TO .TM Date: Mon, 9 May 2011 03:56:40 -0500 Good morning Python community, I need help to develop or create a scri

HELP ME, PLEASE. SCRIP EXPORT TO .TM

2011-05-09 Thread EnyGmA Más Pro
Good morning Python community, I need help to develop or create a script to export to. tmb but blender, there is to import. tmb in blender (look here: http://www.mediafire.com/?2g20yymmxam) this and I have, but need one to export in a blender. tmb. Windows platform (XP, Windows 7 and Windows Se

Re: scipy

2011-05-09 Thread pb
On May 9, 12:29 am, Terry Reedy wrote: > On 5/8/2011 6:44 AM, pb wrote: > > > Hi, > > I', having trouble with scipy. > > If you do not get an answer here, try the scipy list where scipy experts > hang out. You might also try searching the archives of that list or the > scipy bug tracker. > > -- >

Re: How to access elemenst in a list of lists?

2011-05-09 Thread Antonio CHESSA
Just learning python. I can see that I can address an individual element of a list of lists by doing something like: row = list[5] element = row[3] But is there a way to directly address an entry in a single statement? Thanks for any help. Regards Chris Roy-Smith suppose you have a list like th