Re: List of All Error Menssages

2020-10-02 Thread Luis Gustavo Araujo
nt=webmail>. <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> Em sex., 2 de out. de 2020 às 18:03, Kyle Stanley escreveu: > Hi Luis, > > There is not a maintained list of every possible combination of exception > type and message because they're continuously being added withi

Re: List of All Error Menssages

2020-10-01 Thread Luis Gustavo Araujo
cs.python.org/3/library/exceptions.html) I only can check the type error. []s Em qui., 1 de out. de 2020 às 15:59, Luis Gustavo Araujo < luisaraujo.i...@gmail.com> escreveu: > Hi, > Is it possible to get the list of all error messages that display in > Python? I want th

Style().configure don't works for all widgets

2016-11-18 Thread Luis Marzulli
Hi Why ttk.Style().configure(".", font=('Courier New', 30, "bold")) works for Button and Label widgets (and maybe others) and don't works for Entry widget? Example in Python 3: from tkinter import * from tkinter import ttk from tkinter import font root = Tk() ttk.Style().configure(".", font=(

IDLEX association

2016-11-18 Thread Luis Marzulli
Hi When I double click a .py file, a windows appears and immediately disappears. How can I associate the .py file extension to the IDLEX EDITOR? Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: Python Events Calendar - Please submit your 2015 events

2015-01-23 Thread Luis Miguel Morillas
Hi all I wrote this script that can read the Python Calendars and shows the geolocated info on a map and on a timeline. http://lmorillas.github.io/python_events/ Enjoy Saludos, -- luismiguel (@lmorillas) 2015-01-13 22:18 GMT+01:00 M.-A. Lemburg : > [Please help spread the word by forwardin

Problem with autopy and a specific app

2014-11-11 Thread Luis Roberto Romano
th some app? Thanks -- ------ Luis R. Romano PS: here is my code: http://pastebin.com/g6fqHsxS -- https://mail.python.org/mailman/listinfo/python-list

Numpy Array of Sets

2014-05-24 Thread Luis José Novoa
Hi All, Hope you're doing great. One quick question. I am defining an array of sets using numpy as: a=array([set([])]*3) Now, if I want to add an element to the set in, lets say, a[0], and I use the .add(4) operation, which results in: array([set([4]), set([4]), set([4])], dtype=object) whi

urllib with x509 certs

2014-05-16 Thread Luis Miguel Rojas Aguilera
Hi, i tried what you suggest but still asking me for the password, this time twice. Please i need help so this is for my thesis. VII Escuela Internacional de Verano en la UCI del 30 de junio al 11 de julio de 2014. Ver www.uci.cu -- https://mail.python.org/mailman/listinfo/python-list

Help: python 3.3.3 (AMD64) scripts fail as non-admin user on Windows Server 2012 R2

2014-01-26 Thread Luis Marsano
I've installed python for all users with full permissions to all users (see picture). Python runs for all users. However, scripts only work when I run as Administrator. Running a script always results in an "ImportError: cannot import name" error. Here, for example, is the output of "pip -h" run as

About executable

2013-08-25 Thread Luis José Novoa
Hi All. I am trying to create an executable file containing an optimization code using the pyomo package for optimization modeling along with ither packages like Numpy. When using py2exe to perform the task it generates the executable file, but when I try to run it it reports: Import Error: No m

Re: Imaging libraries in active development?

2012-12-02 Thread Luis Pedro Coelho
mailing list pythonvision at https://groups.google.com/forum/#!forum/pythonvision is a good forum. Plenty of people from different projects lurk there. HTH, Luis -- http://mail.python.org/mailman/listinfo/python-list

Expert Advice

2012-01-04 Thread Luis Perez
hattan "loft" Lots of fun with Apple products and ereaders luis perez | principal winter wyman companies - technology staffing tel: 212.616.3582| fax: 212.616.3592 | aim: lpcnn23 I Please consider the environment before printing this email

Re: pairwise combination of two lists

2011-08-17 Thread Luis M . González
This is the easiest and most pythonic way (IMHO): >>>> l3 = [i+e for i in li1 for e in li2] >>>> l3 ['a1', 'a2', 'b1', 'b2'] Regards, Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Anyone here can do a comparation between Djang and RoR

2011-08-16 Thread Luis M . González
On Aug 16, 2:11 pm, Seebs wrote: > On 2011-08-16, smith jack wrote: > > > what is the advantage of Django over RoR:) > > This question is pretty much... I mean, you're not gonna get useful > answers.  They're based on such different languages that I think any > comparison past that is likely goin

Re: Python Card alternatives?

2011-06-11 Thread Luis M . González
python implementation in javascript. regards, Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Would like to add an "upload" facility to my web site

2011-01-31 Thread Luis M . González
On Jan 31, 1:50 pm, Ramon F Herrera wrote: > On Jan 31, 10:49 am, Ramon F Herrera wrote: > > > > > > > > > > > (newbie alert) > > > This is what I have so far: > > >http://patriot.net/~ramon/upload_facility.html > > > The code is shown below. It seems I need that actual script that > > performs t

Re: Which is the best book to learn python

2011-01-27 Thread Luis M . González
.htm > > and stop when they start to talk about VBscript :) > > JM I strongly second this suggestion. Alan Gauld's example of a banking application was just what I needed to finally understand object oriented programming. This is how my head made the "click". Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Which is the best book to learn python

2011-01-25 Thread Luis M . González
ce, you may look to something more advanced, such as "Dive into Python". All these resources are available online for free. If you want to but a book, I like "Beginning Python: From Novice to Professional". Hope this helps... Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.2 beta 2

2010-12-21 Thread Luis M . González
I wonder if Unladen Swallow is still being considered for merger with Python 3.3. Is it? On Dec 21, 4:18 pm, Georg Brandl wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On behalf of the Python development team, I'm happy to announce the > second beta preview release of Python 3.2.

Re: Lua is faster than Fortran???

2010-07-13 Thread Luis M . González
ing with Lua, you wish you had all the missing python features. I see Lua as a some sort of minimal Python. It looks like a simplified subset of python. Being simpler, it's also easier to implement efficiently. Note that Lua was created a simple language to be embedded into larger applications written in c or c++. So it doesn't need a standard library, since you would be using libraries built for the main aplication, written in c or c++. However it worth noting that, according to Mike Pall (the creator of Luajit), there's no reason to believe Python could not be as fast a Luajit. It has no show stoppers. It would simply require much more work around its corner cases, being the main difficulties in python's own environment, not in the core language. This is all explained in the above mentioned thread on tracing jits... Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: How is Unladen Swallow coming along?

2010-07-08 Thread Luis M . González
On Jul 8, 5:44 pm, John Nagle wrote: > On 7/8/2010 12:19 PM, Luis M. González wrote: > > > On Jul 8, 1:42 pm, John Nagle  wrote: > >>      How is Unladen Swallow coming along?  Looking at the site, code is > >> being checked in and issues are being reported, but t

Re: How is Unladen Swallow coming along?

2010-07-08 Thread Luis M . González
're now about 6 months behind their project > plan. > > ("http://code.google.com/p/unladen-swallow/wiki/ProjectPlan";) > >                                         John Nagle Don't be shy. Ask this question in Unladen Swallow's google group. They don't bite! Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Lua is faster than Fortran???

2010-07-08 Thread Luis M . González
On Jul 4, 5:58 pm, John Nagle wrote: >     TheUnladenSwallowpeople should in theory be able to reach > that level of performance.  (Both groups are employed at Google. > So their effectiveness will be compared.) > >                                 John Nagle No. Collin Winter said that they will

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-06 Thread Luis M . González
On Jul 2, 4:07 pm, John Nagle wrote: > David Cournapeau wrote: > > I think one point which needs to be emphasized more is what does > > python 3 bring to people. The" what's new in python 3 page" gives > > the impression that python 3 is about removing cruft. That's a very > > poor argument to pu

Re: Lua is faster than Fortran???

2010-07-04 Thread Luis M . González
On Jul 4, 4:51 pm, Luis M. González wrote: > On Jul 4, 12:30 am, sturlamolden wrote: > > > > > > > I was just looking at Debian's benchmarks. It seems LuaJIT is now (on > > median) beating Intel Fortran! > > > C (gcc) is running the benchmarks faste

Re: Lua is faster than Fortran???

2010-07-04 Thread Luis M . González
at length. Pay special attention to Mike Pall's comments (he is the creator of Luajit) and his opinion about python and pypy. You will read also about other projects, specially new javascript engines such as Mozila's Tracemonkey (the authors participate in this thread) and the pypy folks. It is a very good read for anyone interested in the subject. Very recommended! Good luck! Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Python a functional programming language?

2010-05-10 Thread Luis M . González
nLisp.html That doesn't mean python can compete with other purely functional languages, but it's probably as functional as it can be for a more conventional, multiparadigm language. Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a standalone application

2010-04-14 Thread Luis Quesada
On Apr 14, 11:06 am, "Gabriel Genellina" wrote: > En Wed, 14 Apr 2010 06:10:59 -0300, Luis Quesada   > escribió: > > > > > On Apr 14, 6:31 am, "Gabriel Genellina" > > wrote: > >> En Tue, 13 Apr 2010 18:02:07 -0300, Luis Quesada   > >

Re: Creating a standalone application

2010-04-14 Thread Luis Quesada
On Apr 14, 6:31 am, "Gabriel Genellina" wrote: > En Tue, 13 Apr 2010 18:02:07 -0300, Luis Quesada   > escribi : > > > I am getting an "expected string without null bytes" error when using   > > cxfreeze for creating a standalone application (in Linux

Re: Creating a standalone application

2010-04-13 Thread Luis Quesada
Lawrence D'Oliveiro wrote: In message , Luis Quesada wrote: I am getting an "expected string without null bytes" error when using cxfreeze for creating a standalone application (in Linux-Ubuntu). Why bother? Every decent Linux system will have Python available. Why not just d

Creating a standalone application

2010-04-13 Thread Luis Quesada
om eclipse. What is the easiest way of creating a standalone application? Is there a way of creating the executable file from eclipse/pydev? Cheers, Luis cxfreeze's output lques...@lquesada-laptop:~/workspace/MetroNode/src/models$ cxfreeze uncovered.py --target-dir dist copying /us

Re: gps coordinate identification

2010-04-12 Thread Luis Quesada
Luis Quesada wrote: Dear all, Given a gps coordinate, I would like to find out the country the coordinate belongs to. I wonder whether there is a python library that offers this capability... (In case somebody here is looking for the same thing) Somebody in sci.geo.satellite-nav suggested

Re: Write web apps in Python?

2010-04-12 Thread Luis M . González
ed quotas on bandwith and data used (which are quite generous). You don't need to set up anything. All you need is a google account to get started. Luis -- http://mail.python.org/mailman/listinfo/python-list

bps coordinate identification

2010-04-10 Thread Luis Quesada
Dear all, Given a gps coordinate, I would like to find out the country the coordinate belongs to. I wonder whether there is a python library that offers this capability... Thanks in advance for any pointer. Cheers, Luis PS: I am already aware of basemap but it seems we cannot answer this type

Re: per-function jit compiler

2010-04-06 Thread Luis M . González
On 6 abr, 03:40, Chris Rebert wrote: > 2010/4/5 Luis M. González : > > > > > > > This post gave me an > > idea:http://groups.google.com/group/comp.lang.python/msg/5d75080707104b76 > > > What if I write a simple decorator to figure out the types of every >

per-function jit compiler

2010-04-05 Thread Luis M . González
back to the interpreter. He! I have no idea how to implement it... Any guru out there? Luis -- http://mail.python.org/mailman/listinfo/python-list

per-method jit compiler

2010-04-05 Thread Luis M . González
y using this information, we record all the argument types used the first time each function/method is executed, and then we generate optimized code for them. >From this point on, a guard should check if all arguments remain the same and, if so, the optimized code is run. Otherwise, just fall back to the interpreter. He! I have no idea how to implement it... Any guru out there? Luis -- http://mail.python.org/mailman/listinfo/python-list

per-method jit compiler

2010-04-05 Thread Luis M . González
;: , 'b': , 'd': } So by using this information, we record all the argument types used the first time each function/method is executed, and then we generate optimized code for them. >From this point on, a guard should check if all arguments remain the same and, if so, the optimized code is run. Otherwise, just fall back to the interpreter. He! I have no idea how to implement it... Any guru out there? Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: map, index

2010-03-28 Thread Luis Quesada
Paul Rubin wrote: Luis Quesada writes: [ id*v for id,v in enumerate(L) ] Cool! Thanks! If you really want to write that in pointfree style (untested): import itertools, operator ... itertools.starmap(operator.mul, enumerate(L)) For your other question, you could probably do

Re: map, index

2010-03-28 Thread Luis Quesada
Duncan Booth wrote: Luis Quesada wrote: Is there a way of writing the following without using zip: map(lambda (id,v):id*v,zip(range(len(L)),L)) [ id*v for id,v in enumerate(L) ] Cool! Thanks! Cheers, Luis -- http://mail.python.org/mailman/listinfo/python-list

map, index

2010-03-28 Thread Luis Quesada
f(x):return x return default Thanks in advance for your answer! Cheers, Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Classes as namespaces?

2010-03-26 Thread Luis M . González
On 26 mar, 11:49, kj wrote: > What's the word on using "classes as namespaces"?  E.g. > > class _cfg(object): >     spam = 1 >     jambon = 3 >     huevos = 2 > > breakfast = (_cfg.spam, _cfg.jambon, _cfg.huevos) I see no problem. I wouldn't mix English, French and Spanish in the same recipe thou

OT: Meaning of "monkey"

2010-03-26 Thread Luis M . González
Webmonkey, Greasemonkey, monkey-patching, Tracemonkey, Jägermonkey, Spidermonkey, Mono (monkey in spanish), codemonkey, etc, etc, etc... Monkeys everywhere. Sorry for the off topic question, but what does "monkey" mean in a nerdy-geek context?? Luis -- http://mail.python.org/mailma

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

2010-03-22 Thread Luis M . González
On Feb 21, 6:40 pm, Mensanator wrote: > On Feb 21, 12:14 pm, Paul Boddie wrote: > > > > > > > On 21 Feb, 17:32, Mensanator wrote: > > > > On Feb 21, 10:30 am, Mensanator wrote: > > > > > What versions of Python does it suuport? > > > > What OS are supported? > > > From the Web site referenced i

Re: Best Way to extract Numbers from String

2010-03-20 Thread Luis M . González
On Mar 20, 12:04 am, Jimbo wrote: > Hello > > I am trying to grab some numbers from a string containing HTML text. > Can you suggest any good functions that I could use to do this? What > would be the easiest way to extract the following numbers from this > string... > > My String has this layout

Re: to create variable from dict

2010-03-12 Thread Luis M . González
ue be '1' etc. > > Pl. suggest. > > Thank you. Check out this thread (very recent): http://groups.google.com/group/comp.lang.python/browse_thread/thread/bb1797ffb6fc3bd7/25fe94103c7a231f?lnk=gst&q=luis+variables#25fe94103c7a231f Short answer: you can update globals() wit

Re: Dictionary or Database—Please advise

2010-02-26 Thread Luis M . González
ything, since it's not a database server. You simply save your databases as files. If you don't know sql (the standard language used to query databases), I recomend this online tutorial: http://www.sqlcourse.com/ Good luck! Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating variables from dicts

2010-02-24 Thread Luis M . González
On Feb 24, 8:48 am, Bruno Desthuilliers wrote: > Luis M. Gonz lez a crit : > (snip) > > > Alright, this is what the docs say about locals: > > "Note > > The built-in functions globals() and locals() return the current > > global and local dictionary, res

Re: Creating variables from dicts

2010-02-24 Thread Luis M . González
On Feb 24, 7:44 am, Luis M. González wrote: > On Feb 24, 4:08 am, Steven D'Aprano > > > > > > wrote: > > On Tue, 23 Feb 2010 20:44:10 -0800, Luis M. González wrote: > > > On Feb 24, 1:15 am, Steven D'Aprano > > > wrote: > >

Re: Creating variables from dicts

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

Re: Creating variables from dicts

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

Re: Creating variables from dicts

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

Re: Creating variables from dicts

2010-02-23 Thread Luis M . González
On Feb 23, 7:56 pm, Luis M. González wrote: > On Feb 23, 5:53 pm, vsoler wrote: > > > > > > > Hi, > > > I have two dicts > > > n={'a', 'm', 'p'} > > v={1,3,7} > > > and I'd like to have > >

Re: Creating variables from dicts

2010-02-23 Thread Luis M . González
). So going back to your question, you should have two lists, as follows: n = ['a', 'm', 'p'] v = [1,3,7] --> note that I used brackets [], not curly braces {}. And now you can build a dict formed by the keys in "n" and the values in "v": myDict = {} --> this is an new empty dictionary for k,v in zip(n,v): myDict[k] = v This results in this dictionary: {'a': 1, 'p': 7, 'm': 3}. Hope this helps... Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: What happened to pyjamas?

2010-02-19 Thread Luis M . González
On Feb 18, 5:21 pm, Daniele Gondoni wrote: > On 18 Feb, 19:58, "sstein...@gmail.com" wrote: > > > Down from here (NH, US). > > > S > > > On Feb 18, 2010, at 1:44 PM, Chris Colbert wrote: > > Unreacheable from Italy as well... Same here (Buenos Aires, Argentina). -- http://mail.python.org/mailma

Re: python 3's adoption

2010-01-28 Thread Luis M . González
> Please don't post more noise and ad hominem attacks to the group, Steve. "Ad hominem"? Please, operor non utor lingua non notus per vulgaris populus. Gratias ago vos... -- http://mail.python.org/mailman/listinfo/python-list

Re: What is a list compression in Python?

2010-01-20 Thread Luis M . González
On Jan 18, 1:07 pm, Kit wrote: > Hello Everyone, I am not sure if I have posted this question in a > correct board. Can anyone please teach me: > > What is a list compression in Python? > > Would you mind give me some list compression examples? > > Thanks & really appreciate that. > Kit It's also

maintain 2 versions of python on my computer

2010-01-14 Thread luis
Hi I am not an expert in programming and using Python for its simplicity I have 2 versions of python installed on my computer (windos xp) to begin the transition from version 2.4 to 2.6 or 3. maintaining the operability of my old scripts Is there any way to indicate the version of the python in

Re: Java-to-Python?

2009-12-18 Thread Luis M . González
On Dec 18, 11:44 am, Virgil Stokes wrote: > I have a rather large Java package for the analysis of networks that I > would like to convert to Python. Many of the classes in the Java package > are "Serializable". > > Any recommendations on Java-to-Python (2.6) would be appreciated. > > --V Have yo

Re: When will Python 3 be fully deployed

2009-12-06 Thread Luis M . González
On Dec 6, 3:21 pm, vsoler wrote: > I recently read that many libraries, including Numpy have not been > ported to Python 3. > > When do you think that Python 3 will be fully deployed? > > Should I stick, so far, to Python 2.6? > > Regards > > Vicente Soler You'll have some answers here: http://j

Re: Questions about list-creation

2009-11-30 Thread Luis Zarrabeitia
"function" with a single argument, an iterable that contains all the elements of xrange(10). You could be calling foobar(j for j in xrange(10)) instead. And I think I lost my way... I'm sleepy. If I confused you, sorry... and if I'm helped you, thank you for letting me :D.

Re: High-performance Python websites

2009-11-26 Thread Luis M . González
nds without having to change anyting from your part. Simply code correctly your site in python or java, using Django or any other wsgi compliant framework, and you are set to go. Check it out: http://code.google.com/appengine/docs/whatisgoogleappengine.html Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: semantics of [:]

2009-11-20 Thread Luis Zarrabeitia
need to discard de old list, and get a new one. (1) would be the way to go. Note that (2) and (1) are the same, in both you discard the old value, if it exists, but in (2) you are creating a new list only to discard it right away - you shouldn't do that. > Am I correct wi

Re: Most efficient way to "pre-grow" a list?

2009-11-07 Thread Luis Alberto Zarrabeitia Gomez
Quoting Andre Engels : > On Sat, Nov 7, 2009 at 8:25 PM, Luis Alberto Zarrabeitia Gomez > wrote: > > > > Ok, he has a dict. > > > > Now what? He needs a non-sparse array. > > Let d be your dict. > > Call the zeroeth place in your array d[0], the first

Re: Most efficient way to "pre-grow" a list?

2009-11-07 Thread Luis Alberto Zarrabeitia Gomez
Quoting Bruno Desthuilliers : > > Another situation where one may want to do this is if one needs to > > initialize a non-sparse array in a non-sequential order, > > Then use a dict. Ok, he has a dict. Now what? He needs a non-sparse array. -- Luis Zarrabeitia Facult

Re: restriction on sum: intentional bug?

2009-10-27 Thread Luis Zarrabeitia
the argument is a string before, it should do the "".join instead of returning an error. Also, why is there a special case for the strings, but not for the tuples? Doesn't sum(((1,) for _ in xrange(100)),()) also have quadratic behaviour, creating and destroying intermediate tu

Re: id( ) function question

2009-10-14 Thread Luis Alberto Zarrabeitia Gomez
he first one (now dereferenced and deallocated) used, so > CPython gives it the same id value. Wow, I never thought about it, but at least in my system, it seems to work like that: In [6]: id({1:2}) == id({3:4}) Out[6]: True Interesting... (only as a curiosity, though... One shouldn't re

Re: The rap against "while True:" loops

2009-10-12 Thread Luis Zarrabeitia
On Monday 12 October 2009 09:47:23 am Xavier Ho wrote: > On Mon, Oct 12, 2009 at 11:32 PM, Luis Zarrabeitia wrote: > > Actually, in python, this works even better: > > > > for lin in iter(file_object.readline, ""): > >... do something with lin > > Wh

Re: The rap against "while True:" loops

2009-10-12 Thread Luis Zarrabeitia
ng with lin Actually, in python, this works even better: for lin in iter(file_object.readline, ""): ... do something with lin -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Q: sort's key and cmp parameters

2009-10-07 Thread Luis Zarrabeitia
justification", of course that argument (and the one about the "gaps" themselves) will of course seem singularly unpersuasive. But if you see them as a "feature" (that may sometimes, albeit rarely, missfire), then you would have no problem with /either/ argument. --

list as an instance attribute

2009-09-12 Thread Daniel Luis dos Santos
Hello, I have an object definition : class primitive: def __init__(self) self.name = "" self.transforms = [] def copy(self, copyName) copy = self.copyInternalState(copyName) # method defined elsewhere in derived class if se

Re: Confessions of a Python fanboy

2009-08-26 Thread Luis Zarrabeitia
On Friday 31 July 2009 04:08:33 am Masklinn wrote: > On 30 Jul 2009, at 23:57 , Luis Zarrabeitia wrote: > > I'd like to ask, what "container.each" is, exactly? It looks like a > > function > > call (as I've learned a few posts ago), but, what are its

Re: Subclass dynamically

2009-08-08 Thread Luis Alberto Zarrabeitia Gomez
and return the instance). 3- You may want to take a look at metaclasses. But without more details about why you want it, I can't give you more precise answers. Regards, -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- Participe en U

Re: Confessions of a Python fanboy

2009-07-30 Thread Luis Zarrabeitia
nction call (as I've learned a few posts ago), but, what are its arguments? How the looping "works"? Does it receive a "code" object that it has to execute? Is .each some kind of magic keyword? (This has little to do with python or the current thread, so feel free t

Re: initializing with empty list as default causes freaky problems

2009-07-28 Thread Luis Alberto Zarrabeitia Gomez
uages do it? I've spent so much time with python that reevaluating the default argument on invocation feels clumsy, but I'm obviously tainted now...] Regards, -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- Partici

Re: Help understanding the decisions *behind* python?

2009-07-28 Thread Luis Zarrabeitia
id them, unless you have a /reason/ to do it. Btw, def get_color(point): return screen[point] is way more readable (and less obscure) than def get_color(point): return rows_of_pixels[point[0]][point[1]] Regards, -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computa

Re: len() should always return something

2009-07-28 Thread Luis Zarrabeitia
r any object, not only int and floats. === def size(x): try: return len(x) except TypeError: return 1,1 === -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Convert points to polygon shapefile

2009-07-24 Thread Luis Pedro Almeida
Dear all, I would like to know how to convert a list of points into a polygon shapefile (esri). Thanks! Best regards, Luis Pedro Almeida -- http://mail.python.org/mailman/listinfo/python-list

Re: Help understanding the decisions *behind* python?

2009-07-22 Thread Luis Alberto Zarrabeitia Gomez
ack on this thread and look at them. heights = {} heights[1,2] = 5 heights[1,3] = 7 heights[3,5] = 1 addresses[lastname, firstname] = my_home_address census[location, age] = census.get((location, age), 0) + 1 All those are using tuples as dict keys. Regards, -- Luis Zarrabeiti

Re: missing 'xor' Boolean operator

2009-07-17 Thread Luis Zarrabeitia
t;, but with the programmer. The exact same behaviour could be obtained with if int(inputValue) == 0: inputValue = 25 and no "or" involved. However, using only inputValue = inputValue or 25 could have been an error if you only wanted 25 in case inputValue is None. (the "or tr

Re: missing 'xor' Boolean operator

2009-07-16 Thread Luis Alberto Zarrabeitia Gomez
boolean - if you don't need anything else, treat it as such -, but it will be, whenever is possible, one of the objects in the sequence, in case you need more info. > without > trying to find any intuitive/natural/obvious logic in it, knowing that > sometimes the Truth lies far

Psyco 64 bits

2009-07-09 Thread Luis P. Mendes
PyPy. But I don't know how to use it. With psyco, I used to include two statements roughly at the beginning of the script: import psyco psyco.full() With PyPy, is there a similar way to try to speed up my script? Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: MemoryError c/vcompiler.h:745: Fatal Python error (Psycopg2)

2009-06-21 Thread Luis P. Mendes
Sun, 21 Jun 2009 13:04:59 +, Lie Ryan escreveu: > Luis P. Mendes wrote: >> Hi, >> >> I have a program that uses a lot of resources: memory and cpu but it >> never returned this error before with other loads: >> >> """ >> Memory

MemoryError c/vcompiler.h:745: Fatal Python error (Psycopg2)

2009-06-21 Thread Luis P. Mendes
M I could not find this error. What does this mean? Is this a bug of Python? of Psycopg2? Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Exotic Logics

2009-06-17 Thread Luis Alberto Zarrabeitia Gomez
floor, but that doesn't matter. From the user's perspective, there would be only functions: no strings, no objects, no numbers. That reminds me of my last class (disclaimer: I teach discrete math). I told my students "well, let's assume that numbers exist", and I wasn'

unladen swallow: python and llvm

2009-06-04 Thread Luis M . González
Well, these are a lot of questions and they only show my confussion... I would highly appreciate if someone knowledgeable sheds some light on this for me... Thanks in advance! Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: 4 hundred quadrillonth?

2009-05-27 Thread Luis Zarrabeitia
On Wednesday 27 May 2009 04:26:57 pm Mark Dickinson wrote: > Luis Zarrabeitia wrote: > > On Thursday 21 May 2009 08:50:48 pm R. David Murray wrote: > >> In py3k Eric Smith and Mark Dickinson have implemented Gay's floating > >> point algorithm for Python so that t

Re: 4 hundred quadrillonth?

2009-05-27 Thread Luis Zarrabeitia
e.gmane.org/gmane.comp.python.devel/103191/ Thank you. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create a list of functions depending on a parameter?

2009-05-27 Thread Luis Zarrabeitia
In [1]: def get_incrementor(n): ...: def inc(x): ...: return x+n ...: return inc ...: In [3]: fs = [get_incrementor(n) for n in xrange(10)] In [4]: fs[2](1) Out[4]: 3 -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~ky

Re: Python Socket Issues with VirtualBox

2009-05-27 Thread Luis Zarrabeitia
n a listening socket in the "router"'s IP. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: 4 hundred quadrillonth?

2009-05-27 Thread Luis Zarrabeitia
6 without showing them what 0.2 /really/ means. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

How do I install these C modules in python? The tale of the C programming snake.

2009-05-21 Thread Luis Zarrabeitia
y. If you need to correct yourself, reply to your own message instead of opening a new thread.] -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding a Par construct to Python?

2009-05-21 Thread Luis Alberto Zarrabeitia Gomez
Quoting Carl Banks : > I don't have any reply to this post except for the following excerpts: > > On May 20, 8:10 pm, Luis Alberto Zarrabeitia Gomez > wrote: > > 2- in [almost] every other language, _you_ have to be aware of the > critical > > sections when mul

Re: Adding a Par construct to Python?

2009-05-20 Thread Luis Alberto Zarrabeitia Gomez
Quoting Carl Banks : > On May 20, 4:07 pm, Luis Zarrabeitia wrote: > > On Wednesday 20 May 2009 06:16:39 pm Aahz wrote: > > The designers of Python made a design decision(**) that extension > writers would not have to take care of locking. They could have made > a dif

Re: Adding a Par construct to Python?

2009-05-20 Thread Luis Zarrabeitia
only reason for a GIL. After all, one could argue for that goal in almost all languages. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding a Par construct to Python?

2009-05-20 Thread Luis Zarrabeitia
s an argument against removing the GIL.  I > want to remove the GIL.  I'm only pointing out that removing the GIL > is not easy, and once it's removed there is a cost. Ah, allright then. Thanks for the clarification. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computac

Re: Adding a Par construct to Python?

2009-05-20 Thread Luis Zarrabeitia
an't be different from what Java, C# or any other languages do, including C++. Why is that so expensive in python extensions, that it is used as an argument against removing the GIL? -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~

Re: pushback iterator

2009-05-17 Thread Luis Alberto Zarrabeitia Gomez
on't mind doing instead: f = file(something) rest = parse_headers(f) rest = parse_body(rest) rest = parse_footer(rest) you could return itertools.chain([pushed_back], iterator) from your parsing functions. Unfortunately, this way will add another layer of itertools.chain on top of the iterator

Re: How to replace constructor with factory method

2009-05-11 Thread Luis Zarrabeitia
without having to change the user's code. [1] http://trucosos.crv.matcom.uh.cu/snippets/95/ -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: Self function

2009-05-06 Thread Luis Alberto Zarrabeitia Gomez
luding the still unexistent but already know function name, would guarantee that at least recursion calls the same function instead of "whatever happens to be bound to their name at runtime". If it wasn't a hack, anyway. -- Luis Zarrabeitia Facultad de Matemática y Computación, UH

  1   2   3   4   5   6   >