On 27 mar, 13:14, king kikapu <[EMAIL PROTECTED]> wrote:
> > One reason attention is going to PyPy instead of Psyco...
>
> > Jean-Paul
>
> I had a look at PyPy, it, indeed, have a very long way to go so we can
> consider it an alternative.
To see how it´s going, you can check this out: http://more
also resort to plain sql as follows: db.query('select *
from customers where name = "John"').
Simple, effective and doesn't get in your way.
Luis
--
http://mail.python.org/mailman/listinfo/python-list
asy to do, without
having to mess with objects.
I think this sticks strictly to the KISS principle, keeping it simple,
with less overhead, less layers of abstraction and therefore, less
bugs and complications.
And it matchs perfectly webpy's philosofy for creating web apps.
Luis
On 3 abr, 11
On 3 abr, 11:06, Bruno Desthuilliers wrote:
> Luis M. González a écrit :
>
> > I have come to the same conclusion.
> > ORMs make easy things easier, but difficult things impossible...
>
> Not my experience with SQLAlchemy. Ok, I still not had an occasion to
> test i
om/weblogs/viewpost.jsp?thread=98196
Luis
On Aug 25, 7:08 pm, ssecorp <[EMAIL PROTECTED]> wrote:
> GvR wants to eliminate all the functional stuff (lambda map reduce
> filter) which kind of makes sense for Python, listcomprehensions are
> more efficient(at least as implemented i
Don't use
these with a lambda though; then a list comprehension is clearer and
faster.)
So it seems only reduce will be eliminated.
Luis
--
http://mail.python.org/mailman/listinfo/python-list
It's worth noting that Ubuntu's creator is a fan of python.
So it comes as no surprise that the distribution has a lot of
components written in this language.
Also, and as far as I know, the use of python is encouraged for making
contributions.
On Aug 29, 11:57 am, azrael <[EMAIL PROTECTED]> wrot
I wouldn't want to sound like I'm criticizing other people's work.
To those who offered their time to create this site, which is quite an
improvement over the old one, thank you!
However, I like the idea of a contest. Both for the site and for the
logo.
Perhaps something cool could come up from th
This is strange... I've been trying to access this site since
yesterday, but I couldn't (Firefox can't stabilish connection with
server www.doxdesk.com).
However, I seem to be the only one with this problem...
--
http://mail.python.org/mailman/listinfo/python-list
"PyPy is now able to compile efficient extension modules!".
This was recently announced by Christian Tismer on Pypy's mailing list.
To learn more:
http://codespeak.net/pipermail/pypy-dev/2006q1/002911.html
--
http://mail.python.org/mailman/listinfo/python-list
For those interested in the simplest, easiest and most pythonic web
framework out there, there's a new page in Wikipedia:
http://en.wikipedia.org/wiki/Karrigell
--
http://mail.python.org/mailman/listinfo/python-list
You should check Shed Skin (Python-to-C++ Compiler):
http://shed-skin.blogspot.com/
--
http://mail.python.org/mailman/listinfo/python-list
When you talk about the "Karrigell folks" it looks like there's a bunch
of guys out there ploting to rule the world. It's nothing like that.
I just read Pierre's comments about this article, and decided to post a
message in comp.lang.python to let everybody know about it.
Perhaps my post looked li
First of all, let me tell you that you can now write apps for .NET with
Python.
There's a python implementation for the .NET framework called
Ironpython (in beta 5 now).
Regarding XML, I can't tell you much but in general, python is much
easier, cleaner, concise and intuitive than all the other al
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
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
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
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
> 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
On Feb 18, 5:21 pm, Daniele Gondoni wrote:
> On 18 Feb, 19:58, "[email protected]" 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
).
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
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
>
>
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
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
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,
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:
> >
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
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
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
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
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
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
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.
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
.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
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
;: , '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
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
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
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
>
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
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
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
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
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
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 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
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
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
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
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
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
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
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
I have the next piece of code:
if re.search('^(taskid|bugid):\\d+',logMessage):
return 0
else:
sys.stderr.write("El comentario tiene que contener el taskid: o el
bugid:")
return
.py", line 405, in import_module
m = self.load_tail(q, tail)
File "/usr/lib/python2.5/ihooks.py", line 458, in load_tail
raise ImportError, "No module named " + mname
ImportError: No module named numpy.distutils.fcompiler.conv_template
--
Luis Zarr
iving as the current .writelines().
BTW, check out the print statement from python2, and the print function in
python3:
>>> print >>fileobj, "this will print with an eol" # python2
>>> print("this will print with an eol", file=fileobj)
--
a list instead of creating an empty one, its likely
that someone is facing one of those problems (i.e: clearing a list that you got
as a function argument, or playing with os.walk).
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
Participe en
n alist if not any(alpha + xy in checklist for xy in
xlist)]
(remember, all of this is untested)
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
Participe en Universidad 2010, del 8 al 12 de febrero de 2010
La Habana, Cuba
http://www.universidad2010.cu
--
http://mail.python.org/mailman/listinfo/python-list
if not element:
return False
return True
You may also want to look at [3]
K.
P.S: Forgive my english. I'm falling asleep... I hope I made sense.
[1] http://en.wikipedia.org/wiki/Existential_quantification
[2] http://en.wikipedia.org/wiki/Universal_quantification
[3
t 10
May I ask, why is it problematic? You should be avoiding the use of global
variables anyway.
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
Participe en Universidad 2010, del 8 al 12 de febrero de 2010
La Habana, Cuba
http://www.univ
's possible people out there depend on the present behaviour.
It's more than that. Python's following the rules here. Maybe it could be
documented better, for those without a background in logic/discrete mathematics,
but not changed.
--
Luis Zarrabeitia
Facultad de Matemática y Com
s[:] = " instead of "values = " on the first option to simulate a
sort_in_place.
I usually prefer the first form.
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
htt
Quoting Hendrik van Rooyen :
> "Luis Zarrabeitia" wrote:
>
> 8< ---explanation and example of one producer,
> 8< ---more consumers and one queue
>
> >As you can see, I'm sending one 'None' per consumer,
queue itself... Well, Cameron Simpson did :D. It's working nicely
now.
--
Luis Zarrabeitia
Facultad de Matemática y Computación, UH
http://profesores.matcom.uh.cu/~kyrie
--
Participe en Universidad 2010, del 8 al 12 de febrero de 2010
La Habana, Cuba
http://www.universidad2010.cu
--
http://mail.python.org/mailman/listinfo/python-list
for item in iterq:
> | ...
> | The producer calls iterq.close() when it's done.
>
> Someone asked, so code appended below.
> [...]
Thank you!. I tested it, and it seems to work... and having the queue be an
iterable is a plus. Thank you, Cameron & MRAB!
--
Luis Zarrabeitia
F
just because there are ways to do more
work and hopefully avoid the problems. I'd say that the "problem" is even
aggravated in python, where the dynamic nature of the language makes it near to
impossible to build good refactoring tools)
--
Luis Zarrabeitia
Facultad de Matemática y
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
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
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
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
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
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
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
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
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'
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
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
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
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
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
501 - 581 of 581 matches
Mail list logo