Re: unziping a file in python..

2009-03-02 Thread Luis Zarrabeitia
u also need to create all the intermediate folders from "output_folder" to "output_folder/name" (assuming that 'name' has several path parts in it)? Is there any elegant way to do it? (is there any way to make os.mkdir behave like mkdir -p?) -- Luis Zarrabeitia Fa

Re: Can Python do shopping cart?

2009-03-05 Thread Luis Gonzalez
Python can do. On 5 mar, 19:30, Muddy Coder wrote: > Hi Folks, > > I know PHP can do shopping cart, such as Zen Cart. I wonder can Python > do such a thing? Thanks! > > Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

Re: Ban Xah Lee

2009-03-09 Thread Luis Gonzalez
> Grant Why ban anyone here? C'mon guys, Xha Lee always wins, because fools like you get mad at him instead of ignoring him. If you don't like Xha's posts, just don't read them. It's as simple as that. By the way: «I disapprove of what you say, but I will defend to the death your right to say it» Voltaire. Baning is not useful nor intelligent. Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: Invalid syntax with print "Hello World"

2009-03-12 Thread Luis Zarrabeitia
ial written for Python > 3 however there are enough to get going: most of the Python 2 > tutorials are redundant. Sticking to Python 3 tutorials will give him > a higher signal-to-noise ratio in the tutorials that he finds. That is true. We need python tutorials aimed at python2.6 :D --

Re: array next pointer

2009-03-17 Thread Luis Zarrabeitia
cial_methods__ should be avoided. That one is a better idiom. Works for python2.4 and 2.5 also. In python3, this should be used instead: >>> b = iter(a) >>> c = next(b) (btw, I love the new sentinel argument for the next function in python3!) -- Luis Zarrabeitia Facult

Re: array next pointer

2009-03-17 Thread Luis Zarrabeitia
> > But it does have a 'default' argument, and you can pass that > a sentinel, so it amounts to the same thing ;) Yep, that's what I meant, I forgot the parameter name. -- 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 do this in Python?

2009-03-17 Thread Luis Zarrabeitia
iter(lambda: f.read(1000),''): do_something(buff) but I don't really like a lambda in there. I guess one could use functools.partial instead, but it still looks ugly to me. Oh, well, I guess I also want to see the canonical way of doing it. -- Luis

Re: How to do this in Python? - A "gotcha"

2009-03-18 Thread Luis Zarrabeitia
Quoting Jim Garrison : > Jim Garrison wrote: > > Luis Zarrabeitia wrote: > >> On Tuesday 17 March 2009 06:04:36 pm Jim Garrison wrote: > >> with open(filename, "rb") as f: > >> for buf in iter(lambda: f.read(1000),''): > >

Preferred syntax for the docstrings

2009-03-19 Thread Luis Zarrabeitia
syntax? (the one that python documentation viewers understand better? the one used by the stdlib?) How should/in what order should I write the docs? (brief description, argument types, return type, followed perhaps by some doctests). -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http

Re: Preferred syntax for the docstrings

2009-03-19 Thread Luis Zarrabeitia
#x27;re used for the std lib's very > spiffy new docs. See the Sphinx homepage for how to learn the syntax. > > Cheers, > Chris That was quick! Thanks! Opening the page now. -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie Participe

Re: dict view to list

2009-03-27 Thread Luis Gonzalez
ssion made when designing an imperative language. Luis On 27 mar, 09:14, alex23 wrote: > On Mar 27, 3:44 pm, Aaron Brady wrote: > > > Is there a possibility of the dict_values, dict_items, and dict_keys > > objects growing a 'tolist' method?  It's one of those

Re: Testing dynamic languages

2009-04-04 Thread Luis Gonzalez
On Apr 4, 11:17 am, Emmanuel Surleau wrote: > On Saturday 04 April 2009 15:37:44 [email protected] wrote: > > > I am a Java developer. There, I said it :-). Don't worry. I also do terrible things to support my family... -- http://mail.python.org/mailman/listinfo/python-list

Re: any(), all() and empty iterable

2009-04-16 Thread Luis Zarrabeitia
confusion. /me wonders how no one on this thread suggested that before. That seems like a pretty simple and clear fix to all this thread. +100^2 -- 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: unpythonic use of property()?

2009-04-22 Thread Luis Zarrabeitia
lain as loudly as possible if they want to break encapsulation. -- 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: unpythonic use of property()?

2009-04-22 Thread Luis Zarrabeitia
that's unfortunate. Btw, when I re-read my phrase by itself, it seemed hostile... My apologies. I'm still not very good at expressing my thoughts in english. Then, I guess, you have little choice. Mangle the name, hope that the server will get fixed. -- Luis Zarrabeitia (aka Kyrie) F

Re: Best Python Web Framework ?

2009-04-22 Thread Luis Gonzalez
On Apr 21, 11:46 am, SKYLAB wrote: > Greetings.. > > First , my english is not good . > > I heard that was written in python ( Youtube Programming Language : > PYTHON :S ) Correct ? > > That's not correct ? Then youtube is PHP application ? > > That's correct ; Which python web framework in friend

Multiprocessing.Queue - I want to end.

2009-04-30 Thread Luis Zarrabeitia
for this? (raise the exception when the queue is exhausted, not when it is closed by the producer). -- 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: Multiprocessing.Queue - I want to end.

2009-05-04 Thread Luis Zarrabeitia
ould be still cheaper to scp the files. Now, if I only had a third core available to consume a bit faster ... Regards, -- 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-05 Thread Luis Zarrabeitia
advantage on having it as a keyword, though: it would make static analisis easier) -- 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-05 Thread Luis Zarrabeitia
ucks. [I'm not a lisp user, but I tend to think recursively anyway...] -- 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-05 Thread Luis Zarrabeitia
t allow that easier implementation to be efficient enough. Programming languages suck, but that shouldn't mean that we can't hope to improve them. -- 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 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: 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: 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
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

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

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: 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: 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: 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: Python and Flaming Thunder

2008-05-14 Thread Luis Zarrabeitia
your frontpage than with the extra few milisenconds achieved by switching the programming language or throwing another server in the cluster. -- 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: send yield

2008-05-15 Thread Luis Zarrabeitia
On Thursday 15 May 2008 09:32:37 am castironpi wrote: > Why can't I write this? > -- > http://mail.python.org/mailman/listinfo/python-list yield recieved. Thanks. -- Luis Zarrabeitia (aka Kyrie) Fac. de Matemática y Computación, UH. http://profesores.matcom.uh.cu/

encoding problem

2008-05-16 Thread Luis Zarrabeitia
uot;b" mode. Worst thing is... I don't really need that character, just a general idea of how the document looks like. -- 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: conventions/requirements for 'is' vs '==', 'not vs '!=', etc

2008-05-19 Thread Luis Zarrabeitia
like it is working with 'is' at first, but it really isn't: In: a="hi" In: b="hi" In: a is b Out: True<-- dark magic here, python optimized the string storage, In: a is "h"+"i" <-- by using the same object instead of creating

Re: Python and Flaming Thunder

2008-05-28 Thread Luis Zarrabeitia
he features we've always wanted, to the next major version of Python. -- 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: Python and Flaming Thunder

2008-05-29 Thread Luis Zarrabeitia
ut "the next mayor version of python". With a clean, well documented, upgrade path. Unlike "next month's Flaming Thunder". (Unless you are producing a new major version every week, in which case I shut up, and may think about buying several versions only so you must keep

Re: Why does python not have a mechanism for data hiding?

2008-06-08 Thread Luis Zarrabeitia
at home] version of 'factorial'. So, you understood well. As I haven't been following this thread, I won't go offtopic talking about functional languages. But yes, on functional (and declarative?) languages, it makes a lot of sense to have a 'symbol' that represents a new

Re: PEP on breaking outer loops with StopIteration

2008-06-09 Thread Luis Zarrabeitia
> raise letters.StopIteration() > I must say, I don't even like the idea of having a 'break', but I kind of like this proposal. However, it may be ambiguous [is that a word?] if the outer and inner for loop over the same object. Weird/unlikely situation, I kn

Re: Why does python not have a mechanism for data hiding?

2008-06-12 Thread Luis Zarrabeitia
; > meaning of "tried and tested on the field" when applied to a > > person. > > > > > Fascinating Spanish also. I translate "experimentado" to "experienced", perhaps because I had seen it before, but I never imagined that "experi

Re: Do I need "self" and "other"?

2008-06-27 Thread Luis Zarrabeitia
x27;s why your editor highlights it. So, code will not break if you use any other valid name instead of self. But you shouldn't. Everything will work perfectly - except the readability. Cheers, -- 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: Why is recursion so slow?

2008-06-28 Thread Luis Zarrabeitia
list "fib" as "the list that starts with 0,1, and from there, each element is the sum of the element on 'fib' plus the element on 'tail fib'). The lazy evaluation there means that you can define a list based on itself, but there is no recursive function call. Cheer

Re: Returning the positions of a list that are non-zero

2008-07-09 Thread Luis Zarrabeitia
readable way would be: indexes = [index for index,value in enumerate(l) if value != 0] values = [value for value in l if value != 0] Cheers. -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie Quoting Benjamin Goudey <[EMAIL PROTECTED]>: >

Re: Goodbying Spaces

2008-04-25 Thread Luis Zarrabeitia
7;: > > id = id[0:len(id) - 1] > > except: > > pass > which is a nuisance. Is there a better way to do this? I have tried > id.strip() with no luck. What do? > TIA, > Victor -- 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: Am I missing something with Python not having interfaces?

2008-05-07 Thread Luis Zarrabeitia
;t have .NET anymore, but I consider that an example of why the static typing are... overrated) -- 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: Mathematics in Python are not correct

2008-05-08 Thread Luis Zarrabeitia
0^0 should be a nan or exception, I guess, but not 1. [just found out while trying the poster's example] -- 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: Mathematics in Python are not correct

2008-05-08 Thread Luis Zarrabeitia
Quoting Christian Heimes <[EMAIL PROTECTED]>: > Luis Zarrabeitia schrieb: > >>>> 0**0 > > 1 > > > > That 0^0 should be a nan or exception, I guess, but not 1. > > No, that's correct for floats. Read the wikipedia article or the C99 > sta

Re: Mathematics in Python are not correct

2008-05-08 Thread Luis Zarrabeitia
Quoting Ian Kelly <[EMAIL PROTECTED]>: > On Thu, May 8, 2008 at 10:15 PM, Luis Zarrabeitia <[EMAIL PROTECTED]> wrote: > > Weird, I can't find neither... (which wikipedia article? Couldn't find one > about > > C99.) > > Try http://en.wikipedia.

Newbie needs help with his blood pressure...

2008-08-21 Thread Luis Speciale
apxs -q [-S =] ... apxs -c [-S =] [-o ] [-D [=]] [-I ] [-L ] [-l ] [-Wc,] [-Wl,] [-p] ... apxs -i [-S =] [-a] [-A] [-n ] ... apxs -e [-S =] [-a] [-A] [-n ] ... make[1]: *** [mod_python.so] Error 1 make: *** [do_dso] Error 2 I'm dead ? Thanks Do

Newbie needs help with... his blood pressure ;-)

2008-08-21 Thread Luis Speciale
apxs -q [-S =] ... apxs -c [-S =] [-o ] [-D [=]] [-I ] [-L ] [-l ] [-Wc,] [-Wl,] [-p] ... apxs -i [-S =] [-a] [-A] [-n ] ... apxs -e [-S =] [-a] [-A] [-n ] ... make[1]: *** [mod_python.so] Error 1 make: *** [do_dso] Error 2 Am I already dead ?

Re: Newbie needs help with... his blood pressure ;-)

2008-08-21 Thread Luis Speciale
Oups. Bad beginning. Sorry for the double post. Thunderbird has mental problems Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: iterating over two arrays in parallel?

2008-08-28 Thread Luis Zarrabeitia
xar Animation Studios Are you really from Pixar? Cool Cheers, -- Luis Zarrabeitia Facultad de Matemática y Computación, UH http://profesores.matcom.uh.cu/~kyrie -- http://mail.python.org/mailman/listinfo/python-list

Re: max(), sum(), next()

2008-09-03 Thread Luis Zarrabeitia
mpty, returns start. === so the fact that sum([]) returns zero is just because the start value is zero... sum([],object()) would return an object(). BTW, the original code: >>> sum(s for s in ["a", "b"] if len(s) > 2) wouldn't work anyway... it seems t

Re: max(), sum(), next()

2008-09-10 Thread Luis Zarrabeitia
e process fail if the list is empty? If you don't add anything to the start value, you should get back the start value. Python's sum is defined as sum(sequence, start=0). If sum were to throw an exception with sum([]), it should also throw it with sum([], start=0), wich makes no sense.

Peek inside iterator (is there a PEP about this?)

2008-10-01 Thread Luis Zarrabeitia
2 = tee(iterator) if any(i1): # do something with i2 Question/Proposal: Has there been any PEP regarding the problem of 'peeking' inside an iterator? Knowing if the iteration will end or not, and/or accessing the next value, without consuming it? Is there any (simple, elegant)

Re: Peek inside iterator (is there a PEP about this?)

2008-10-01 Thread Luis Zarrabeitia
On Wednesday 01 October 2008 01:14:14 pm Peter Otten wrote: > Luis Zarrabeitia wrote: > > a = iter([1,2,3,4,5]) # assume you got the iterator from a function and > > b = iter([1,2,3]) # these two are just examples. > > Can you provide a concrete use case? I'd like

Re: ping

2006-04-14 Thread Luis Armendariz
C4650> > http://www.espn.com/> > ', mode 'r' at 0x009C4650> > http://www.redsox.com/> > ', mode 'r' at 0x009C4650> > > instead of giving me the ping stats "pinging etc etc, packets sent 4 > recienved 4 etc) > > Any idea aro

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

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

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

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

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

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

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

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

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: 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: 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: 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 < [email protected]> escreveu: > Hi, > Is it possible to get the list of all error messages that display in > Python? I want th

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: Django Vs Rails

2005-09-25 Thread Luis M. Gonzalez
If you are looking for something pythonic, full featured and very easy to use, you should check this out: http://karrigell.sourceforge.net Give it a try and let me know how it goes... Cheers, Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: New project coming up...stay with Python, or go with a dot net language??? Your thoughts please!

2005-10-04 Thread Luis M. Gonzalez
> Boa Constructor, Iron Python etc... it seems all these projects get started, > but never finished. I don't know Boa (never liked it, never used it), but you could try PythonCard: much higher level, easier and more productive. As for Ironpython seems to be moving full steam towards a stable relea

Re: New project coming up...stay with Python, or go with a dot net language??? Your thoughts please!

2005-10-04 Thread Luis M. Gonzalez
If you read again my comment, I said "almost" an static version of Python for .NET. That means that it's not a Python implementation, but another language. It takes a lot from python though, and it is aknowledeged by its creator in the first paragraph of its homepage. And if you still feel the nee

Re: New project coming up...stay with Python, or go with a dot net language??? Your thoughts please!

2005-10-04 Thread Luis M. Gonzalez
> that Boo isn't enough like Python to > be a kind of Python - not necessarily a criticism, though, but an > observation. This is correct. I completely agree with you and I'm not saying that boo is python. Again, I just said that it could be considered "almost" a static python implementation for .

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Luis M. Gonzalez
Grant Edwards ha escrito: > While we're off this topic again topic, I was watching a BBC > series "Space Race" the other night. The British actors did a > passable job with the American accents in the scenes at Fort > Bliss in Texas, but the writers wrote British English lines for > them to speak

Re: Python for .NET and IronPython

2005-11-03 Thread Luis M. Gonzalez
: http://lists.ironpython.com/pipermail/users-ironpython.com/ By the way, the current version is 0.9.3 and it's advancing at a pretty fast pace towards version 1.0. Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: which feature of python do you like most?

2005-11-08 Thread Luis M. Gonzalez
I've never used Perl, but I know other c-like laguages, and I can tell you what I like about python: - It is concise, clear and to the point. - No useless characters like curly braces and semicolons cluttering it syntax,. - Very readable and elegant. - One obvious way to do each task, not thousand

Re: Is Python worth it??

2005-11-15 Thread Luis M. Gonzalez
real eye opener for me. Of course, It won't hurt if you check regularly the official tutorial by Guido Van Rossum, but I wouldn't use it as a step to step introduction, because it seems more like an overview of the language. More indicated for someone who's looking for somethi

Re: HTML generation vs PSP vs Templating Engines

2005-11-17 Thread Luis M. Gonzalez
With Karrigell (http://karrigell.sf.net/), all you need to know is Python and HTML. No templates, no python-like or special languages, only pure and simple python. You can embedd python into html or, if it better suits your programming tyle, you can embed html into python. Why don't you give it a

Re: HTML generation vs PSP vs Templating Engines

2005-11-19 Thread Luis M. Gonzalez
I meant that it is not strictly necessary to use templates in Karrigell, although you can use Cheetah if you want. I'm not used to templates mainly because I'm familiar with the way PHP works and, for simple dynamic sites like those I work on, this is the simpliest approach. Another reason is that

Re: the PHP ternary operator equivalent on Python

2005-11-23 Thread Luis M. Gonzalez
This could be done easier this way: L = [('odd','even')[n%2] for i in range(8)] -- http://mail.python.org/mailman/listinfo/python-list

Re: the PHP ternary operator equivalent on Python

2005-11-23 Thread Luis M. Gonzalez
This could be done easier this way: L = [('even','odd')[n%2] for n in range(8)] -- http://mail.python.org/mailman/listinfo/python-list

Re: Python book for a non-programmer

2005-11-25 Thread Luis M. Gonzalez
Read my reply here from another thread: http://groups.google.com/group/comp.lang.python/browse_thread/thread/25aada3c22ce6e66/cc69fd0c78384e5b?q=luis+cogliati's&rnum=1#cc69fd0c78384e5b -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get started in GUI Programming?

2005-11-25 Thread Luis M. Gonzalez
/ Another alternative, also based in wxWindows, is Boa Constructor, but I wouldn't recomend it over Pythoncard. Good luck! Luis -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get started in GUI Programming?

2005-11-26 Thread Luis M. Gonzalez
Try PythonCard (http://pythoncard.sf.net). Like VB or Delphi (drag and drop widgets), but much simpler, easy and fun. It's based on wxWidgets, and it gives your apps a native look, no matter your platform (much nicer than Tkinter, which looks uglier and dated). -- http://mail.python.org/mailman/l

Re: python speed

2005-12-01 Thread Luis M. Gonzalez
Pypy is not the only promisory project we have for seeing Python running like compiled languages. Shed Skin is already a quite usable Python-to-C++ compiler which, in version 0.5.1, can actually compile many python scripts to fully optimized stand-alone executables. Next version will probably supp

Re: Favorite flavor of Linux? (for python or anything else)

2005-12-04 Thread Luis M. Gonzalez
> Looking to replace my older flavor of linux with something new. . .What > are some of your favorites for python programming and anything else? Ubuntu is developed by Canonical, a company owned by Mark Shuttleworth. This guy is a fan of both linux and python, so if you want a linux distro that ge

<    1   2   3   4   5   6   >