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
As you said, desktop apps are losing appeal. I suggest looking for a web based solution. Perhaps python + silverlight? (I haven't tried it though). Unfortunately, the client-side (browser) is the domain of javascript. What I'm doing is polishing my html/css skills coupled with jquery. I have lost

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
On Jan 27, 3:43 pm, Jean-Michel Pichavant wrote: > santosh hs wrote: > > I am very new to object oriented concept,  so I need to learn > > everything frm basic, Will the above books fulfill > >  My need > > read thishttp://www.freenetpages.co.uk/hp/alan.gauld/tutclass.htm > > and stop when they st

Re: Which is the best book to learn python

2011-01-25 Thread Luis M . González
On Jan 24, 2:09 pm, santosh hs wrote: > Hi All, > i am beginner to python please tell me which is the best available > reference for beginner to start from novice If you are a complete beginner to programming, I suggest start with a tutorial such as "A Byte of Python" (google this). I learned my

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
On Jul 4, 6:09 pm, Stephen Hansen wrote: > On 7/4/10 9:21 AM, sturlamolden wrote: > > > On 4 Jul, 14:29, David Cournapeau wrote: > > >> Actually, I think the main reason why Lua is much faster than other > >> dynamic languages is its size. The language is small. You don't list, > >> dict, tuples,

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
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 the last quarterly > release was 2009 Q3.  They missed their January 2010 release date > for "2009 Q4", so they're now about 6 months

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
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 faster by less than a factor of two. > Consider that Lua is a dynamically typed scripting language very > similar t

Re: Is Python a functional programming language?

2010-05-10 Thread Luis M . González
On 10 mayo, 09:24, Samuel Williams wrote: > Dear Friends, > > Is Python a functional programming language? > > Is this a paradigm that is well supported by both the language syntax and the > general programming APIs? > > I heard that lambdas were limited to a single expression, and that other >

Re: Write web apps in Python?

2010-04-12 Thread Luis M . González
On 12 abr, 06:57, Gilles Ganault wrote: > Hello > > I'd like to make sure I understand what the options are to write web > applications in Python: > > - à la PHP, using Apache's mod_python > > - using eg. Lighttpd and configuring it to load the Python interpreter > every time a Python script is ca

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
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 function, and then we use it as a base for a simple method-jit compiler for python? example: def typer(f): def wrap(*args):

per-method jit compiler

2010-04-05 Thread Luis M . González
On 4 abr, 00:09, Steven D'Aprano wrote: > On Sat, 03 Apr 2010 22:58:43 +, kj wrote: > > Suppose I have a function with the following signature: > > def spam(x, y, z): > > # etc. > > Is there a way to refer, within the function, to all its arguments as a > > single list? (I.e. I'm looking

per-method jit compiler

2010-04-05 Thread Luis M . González
On 4 abr, 00:09, Steven D'Aprano wrote: > On Sat, 03 Apr 2010 22:58:43 +, kj wrote: > > Suppose I have a function with the following signature: > > > def spam(x, y, z): > >     # etc. > > > Is there a way to refer, within the function, to all its arguments as a > > single list?  (I.e. I'm look

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/mailman/listinfo/pyt

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
On Mar 12, 10:59 am, hiral wrote: > Hi, > > Is there any way to create variables which name matches with dict key? > > For example: > dict1 = {"abc":'1", "def":"2"} > > Now I am looking to have variable name abc and it's value be '1' etc. > > Pl. suggest. > > Thank you. Check out this thread (ver

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, respectively, which may be useful to pass > > a

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
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 > > a=1 > m=3 > p=7 > > that is, creating some variables. > > How can I do this? You are probably coming from another language and you're not used to python's data structures. I

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

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: High-performance Python websites

2009-11-26 Thread Luis M . González
On Nov 25, 4:24 pm, Nick Mellor wrote: > Hi all, > > I'm contemplating setting up a Python-powered website for the tourist > industry, which will involve a web service, a good deal of XML > processing, and a Django-powered front-end. If the project works, it > could get a lot of traffic. I'm sure

unladen swallow: python and llvm

2009-06-04 Thread Luis M . González
I am very excited by this project (as well as by pypy) and I read all their plan, which looks quite practical and impressive. But I must confess that I can't understand why LLVM is so great for python and why it will make a difference. AFAIK, LLVM is alot of things at the same time (a compiler inf

Unladen-Swallow: A faster python

2009-03-27 Thread Luis M . González
This is a new project started by two Google engineers to speed up python: http://code.google.com/p/unladen-swallow/ -- http://mail.python.org/mailman/listinfo/python-list

Re: is python Object oriented??

2009-01-29 Thread Luis M . González
On Jan 29, 7:21 am, Gary Herron wrote: > Python *is* object-oriented, but it is not (as your definition suggests) > object-fascist.   I'm a python-nazi. No python for you! -- http://mail.python.org/mailman/listinfo/python-list

Re: what's the point of rpython?

2009-01-18 Thread Luis M . González
On Jan 18, 8:56 am, andrew cooke wrote: > Since this is a PyPy bashing thread, maybe it's an appropriate place > to suggest that the project has got a little bit waylaid by exploring > cool things instead of releasing a useful final result? > > I am not questioning rpython directly - the case for

Re: *Advanced* Python book?

2009-01-17 Thread Luis M . González
On Jan 16, 5:27 pm, mk wrote: > Hello everyone, > > I looked for it I swear, but just can't find it. > > Most Python books seem to focus on examples of how to call functions > from standard library. I don't need that, I have online Python > documentation for that. > > I mean really advanced mental

Re: optimizing large dictionaries

2009-01-16 Thread Luis M . González
On Jan 15, 6:39 pm, Per Freem wrote: > hello > > i have an optimization questions about python. i am iterating through > a file and counting the number of repeated elements. the file has on > the order > of tens of millions elements... > > i create a dictionary that maps elements of the file that

Re: what's the point of rpython?

2009-01-16 Thread Luis M . González
On Jan 16, 9:37 pm, "Brendan Miller" wrote: > So I kind of wanted to ask this question on the pypy mailing list.. > but there's only a pypy-dev list, and I don't want to put noise on the > dev list. > > What's the point of RPython? By this, I don't mean "What is RPython"? > I get that. I mean, why

Re: New Python 3.0 string formatting - really necessary?

2008-12-29 Thread Luis M . González
On Dec 29, 9:44 pm, Steven D'Aprano wrote: > How do you lose backward compatibility by *adding* new functionality? The > old functionality will continue to work as normal. > > -- > Steven AFAIK it still works the old way, but it will be deprecated soon. -- http://mail.python.org/mailman/listinfo/

Re: New Python 3.0 string formatting - really necessary?

2008-12-29 Thread Luis M . González
On 19 dic, 13:01, walterbyrd wrote: > I have not worked with Python enough to really know. But, it seems to > me that more I look at python 3.0, the more I wonder if it isn't a > step backwards. > > To me, it seems that this: > > print "%s=%d" % ('this',99) > > Is much easier, and faster, to type,

Re: Python is slow

2008-12-22 Thread Luis M . González
On Dec 22, 3:42 pm, cm_gui wrote: > Python is slow. Haven't you said that already? Well, you did it so many times that you convinced me... I'll tell the Google folks that they are a bunch of ignorant fools for choosing python. That's why their business is doing that bad. They will surely go to h

Re: Python's popularity

2008-12-22 Thread Luis M . González
On Dec 22, 3:44 pm, r wrote: > Steve Holden > > > What makes you assume this is a zero-sum game, and that Python won't > > survive if any other language becomes popular. Every language borrows > > from those that came before it. Terms like "outright plagiarism" don't > > encourage rational debate,

Re: Python's popularity

2008-12-22 Thread Luis M . González
On Dec 22, 12:11 pm, walterbyrd wrote: > I have read that python is the world's 3rd most popular language, and > that python has surpassed perl in popularity, but I am not seeing it. > > From what I have seen: > > - in unix/linux sysadmin, perl is far more popular than python, > windows sysadmins

Re: Python is slow

2008-12-21 Thread Luis M . González
On Dec 21, 2:34 pm, r wrote: > RTFM, use as much python code and optimize with C where needed, > problem solved! That's true if your *really* need C's extra speed. Most of the times, a better algorithm or psyco (or shedskin) can help without having to use any other language. This is unless you ar

Re: Namespaces, multiple assignments, and exec()

2008-12-20 Thread Luis M . González
On Dec 19, 11:34 pm, John O'Hagan wrote: > I have a lot of repetitive assignments to make, within a generator, that use a > function outside the generator: > > var1 = func("var1", args) > var2 = func("var2", args) > var3 = func("var3", args) > etc... > > In each case the args are identical, but th

Re: Python is slow

2008-12-15 Thread Luis M . González
On Dec 15, 1:38 am, cm_gui wrote: > hahaha, do you know how much money they are spending on hardware to > make > youtube.com fast??? > > > By the way... I know of a very slow Python site called YouTube.com. In > > fact, it is so slow that nobody ever uses it. > > Buddy, just stop whining and go w

Re: Python is slow

2008-12-12 Thread Luis M . González
On Dec 12, 11:17 am, sturlamolden wrote: > On Dec 12, 3:04 pm, Luis M. González wrote: > > > Why don't you guys google a little bit to know what's being done to > > address python's "slowness"?? > > Nothing is being done, and woth Py3k it go

Re: Python is slow

2008-12-12 Thread Luis M . González
On Dec 12, 10:43 am, sturlamolden wrote: > On Dec 12, 2:29 pm, sturlamolden wrote: > > > Creating a fast implementation of a dynamic language is almost rocket > > science. But it has been done. There is Stronghold, > > I meant of course Strongtalk... Blah, blah, blah... Why don't you guys google

Re: Python is slow

2008-12-11 Thread Luis M . González
On Dec 10, 3:42 pm, cm_gui <[EMAIL PROTECTED]> wrote: > http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-... > > I fully agree with Krzysztof Kowalczyk . > Can't they build a faster VM for Python since they love the language > so much? > > Python is SLOW.    And I am not compari

Re: Python is slow

2008-12-10 Thread Luis M . González
You are WRONG, WRONG, WRONG!! And when I say Wrong, I mean WRONG!!! And I am not saying that you are confussed. I say that you are WRONG! And when someone says so many times that you are wrong, it is because you are WRONG! And don't say that you are not wrong, because you are wrong! You are Wron

Re: Python for kids?

2008-12-07 Thread Luis M . González
This is a very good advice. I learned from my own experience in college that trying to learn a solution to a problem I never had, is wasted time. The first step is confronting your student with an specific problem, then let him try to find a way to solve it by himself. After he tried hard many appr

Re: How to import from a file which is not in the current directory?

2008-10-22 Thread Luis M . González
Lets say that you are in directory "C:\\Python25" and you want to import function "bar" defined in module "foo" located in your windows desktop. You do it like this: >>> import sys >>> sys.path.append('C:\\Users\\You\\Desktop') >>> from foo import bar So you add your desktop to "sys.path" and the

Re: How to import from a file which is not in the current directory?

2008-10-22 Thread Luis M . González
Lets say that you are in directory "C:\\Python25" and you want to import function "bar" defined in module "foo" located in your windows desktop. You do it like this: >>> import sys >>> sys.path.append('C:\\Users\\You\\Desktop') >>> from foo import blah So you add your desktop to "sys.path" and th

Re: Python - ubuntu

2008-08-29 Thread Luis M . González
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

Re: Replace reduce with listcomprehension?

2008-08-25 Thread Luis M . González
Correction: I guess the link I provided above is old news... In the more recent Python 3000 FAQ, GvR says: Q. If you're killing reduce(), why are you keeping map() and filter()? A. I'm not killing reduce() because I hate functional programming; I'm killing it because almost all code using reduce(

Re: Replace reduce with listcomprehension?

2008-08-25 Thread Luis M . González
Actually, GvR announced that "lambda, filter and map will stay (the latter two with small changes, returning iterators instead of lists). Only reduce will be removed from the 3.0 standard library. You can import it from functools." Check the full article here: http://www.artima.com/weblogs/viewpo

Re: Hobbyist - Python vs. other languages

2008-08-01 Thread Luis M . González
On 31 jul, 15:32, fprintf <[EMAIL PROTECTED]> wrote: > I have been playing with computers since I first learned to program > moving shapes on an Atari 800XL in BASIC. After many years of dabbling > in programming languages as a hobbyist (I am not a computer scientist > or other IT professional), I

Re: Python Written in C?

2008-07-21 Thread Luis M . González
Let's say you want to build a house... You can use pre-built bricks and stack them together to build your walls, or you can cook your own bricks out of clay because hey! clay is the real thing not those ready-made bricks that anyone can use! In the end, you'll have a truly original house but yo

Re: object-relational mappers

2008-04-03 Thread Luis M . González
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

Re: object-relational mappers

2008-04-03 Thread Luis M . González
Yes, webpy's db api can be used in stand-alone scripts if you want. See below: import web db = web.database(dbn='mysql', db='northwind', user='root') x = db.select('employees') ... Another good thing is that, since queries return Storage objects (similar to dictionaries), they are much more flexi

Re: object-relational mappers

2008-04-03 Thread Luis M . González
I have come to the same conclusion. ORMs make easy things easier, but difficult things impossible... The best approach I've seen so far is webpy's (if we are talking of web apps). It isn't an ORM, it is just a way to make the database api easier to use. Queries don't return objects, they return so

Re: Psyco alternative

2008-03-29 Thread Luis M . González
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

Re: Converting a string to the most probable type

2008-03-06 Thread Luis M . González
On 6 mar, 11:27, Pierre Quentel <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to know if there is a module that converts a string to a > value of the "most probable type" ; for instance : > - if the string is "abcd" the value is the same string "abcd" > - string "123" : value = the integer 123

Re: Seeing "locals()" from imported function

2008-02-24 Thread Luis M. González
This is one of these times when I feel so dumb and ashamed that I wished I never dared to ask... Well, that did the trick. Thanks! luis On Feb 24, 3:41 am, 7stud <[EMAIL PROTECTED]> wrote: > Yes, define your functions so that they get all the input they need > from the arguments that are passed i

Seeing "locals()" from imported function

2008-02-23 Thread Luis M. González
I apologize for this very basic question, but I can't understand how this works... I want to import a function from module B into my main script A, so this function can see and use the locals from A. For example: def auto(): urls = ['/', 'index'] for k,v in __main__.locals().items():

Re: RELEASED Python 2.5.2, release candidate 1

2008-02-15 Thread Luis M. González
On 14 feb, 22:39, Paul Rubin wrote: > I join everyone else in thanking Martin for his work on this whole > effort. This wording and naming thing is a trivial subtopic. Thanks Martin and company for the good job! By the way, I'm not a native speaker either and I understo

Re: Is there a way to use .NET DLL from Python

2008-02-15 Thread Luis M. González
On Feb 14, 6:26 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > On Feb 13, 6:58 pm, "Luis M. González" <[EMAIL PROTECTED]> wrote: > > > > > On 13 feb, 00:26, Dino Viehland <[EMAIL PROTECTED]> wrote: > > > > >> Oh, I know what you mean. &g

Re: Is there a way to use .NET DLL from Python

2008-02-13 Thread Luis M. González
On 13 feb, 00:26, Dino Viehland <[EMAIL PROTECTED]> wrote: > >> Oh, I know what you mean. > >> But that was exactly the reason for having a .DLLs folder, isn't it? > >> When you place an assembly into this folder, you avoid having to write > >> this boilerplate code, and simply import the assembly

Re: Why not a Python compiler?

2008-02-08 Thread Luis M. González
On 8 feb, 22:15, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Fri, 08 Feb 2008 17:45:36 +, Grant Edwards wrote: > > On 2008-02-08, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > >> Please get back on topic. This discussion is about parsecs and > >> wookies now. > > > What's a "woo

Re: Is there a way to use .NET DLL from Python

2008-02-07 Thread Luis M. González
On 7 feb, 05:52, Fuzzyman <[EMAIL PROTECTED]> wrote: > Luis M. González wrote: > > On 6 feb, 21:17, Fuzzyman <[EMAIL PROTECTED]> wrote: > > > On Feb 6, 9:59 pm, "Luis M. Gonz�lez" <[EMAIL PROTECTED]> wrote: > > > > > On Feb 6, 6:27 pm,

Re: Is there a way to use .NET DLL from Python

2008-02-06 Thread Luis M. González
On 6 feb, 21:17, Fuzzyman <[EMAIL PROTECTED]> wrote: > On Feb 6, 9:59 pm, "Luis M. González" <[EMAIL PROTECTED]> wrote: > > > On Feb 6, 6:27 pm, Huayang Xia <[EMAIL PROTECTED]> wrote: > > > > Hello All, > > > > I have several .NET DL

Re: Is there a way to use .NET DLL from Python

2008-02-06 Thread Luis M. González
On Feb 6, 6:27 pm, Huayang Xia <[EMAIL PROTECTED]> wrote: > Hello All, > > I have several .NET DLL (I have no source code for them), is there > anyway to use them from python instead of from C#. > > Thanks, > Huayang I used to put my .dll files into the .DLL folder, so I could simply import them a

Re: Why not a Python compiler?

2008-02-05 Thread Luis M. González
On 5 feb, 05:19, Santiago Romero <[EMAIL PROTECTED]> wrote: > ( Surely if this question has been asked for a zillion of times... ) > ( and sorry for my english! ) > > I'm impressed with python. I'm very happy with the language and I > find Python+Pygame a very powerful and productive way of wri

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Luis M. González
On 5 feb, 14:31, dmitrey <[EMAIL PROTECTED]> wrote: > Hi all, > the urlhttp://torquedev.blogspot.com/2008/02/changes-in-air.html > (blog of a game developers) > says IronPython is faster than CPython in 1.6 times. > Is it really true? > If yes, what are IronPython drawbacks vs CPython? > And is it

Re: Client side GUI-like web framework ?

2008-02-05 Thread Luis M. González
On Feb 4, 2:45 pm, USCode <[EMAIL PROTECTED]> wrote: > Wouldn't it be handy if there was a web framework that allowed you to > create pages and control the interface like you would using a > client-side GUI framework such as Tkinter? > > The framework would need a small, fast web server that would

Re: achieving performance using C/C++

2007-11-05 Thread Luis M . González
On Nov 5, 8:51 am, Filip Wasilewski <[EMAIL PROTECTED]> wrote: > On Nov 5, 7:40 am, sandipm <[EMAIL PROTECTED]> wrote:> I did fair amount of > programming in python but never used c/c++ as > > mentioned below. > > any good tutorials for using C/C++ to optimize python codebase for > > performance?

Re: TRying to import files from my folder not pythons lib folder

2007-09-24 Thread Luis M . González
On Sep 24, 5:00 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sun, 23 Sep 2007 22:01:39 -0300, Luis M. González <[EMAIL PROTECTED]> > escribi?: > > > This is exactly what I did, but I have a new problem now: > > After setingPYTHONPATHI'm

Re: TRying to import files from my folder not pythons lib folder

2007-09-24 Thread Luis M . González
On Sep 24, 5:00 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sun, 23 Sep 2007 22:01:39 -0300, Luis M. González <[EMAIL PROTECTED]> > escribi?: > > > This is exactly what I did, but I have a new problem now: > > After setingPYTHONPATHI'm

Re: TRying to import files from my folder not pythons lib folder

2007-09-23 Thread Luis M . González
Steve Holden wrote: > [EMAIL PROTECTED] wrote: > > On Sep 21, 12:32 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > >> Hi, > >> > >> I'm trying to create my own lib of functions, but it seems like I can > >> only import them if they are in pythons lib folder. > >> > >> Example > >> I have

Re: Will Python 3.0 remove the global interpreter lock (GIL)

2007-09-02 Thread Luis M . González
On Sep 2, 11:16 pm, llothar <[EMAIL PROTECTED]> wrote: > On 3 Sep., 07:38, "Eduardo O. Padoan" <[EMAIL PROTECTED]> > wrote: > > > > No.http://www.artima.com/weblogs/viewpost.jsp?thread=211430 > > > Ops, I > > meant:http://www.artima.com/forums/threaded.jsp?forum=106&thread=211200 > > Thanks. I whi

Re: ActiveRecord for Python/MySQL

2007-08-26 Thread Luis M . González
On Aug 26, 5:52 am, Devraj <[EMAIL PROTECTED]> wrote: > Thanks > > On Aug 26, 5:26 pm, EuGeNe Van den Bulke > > <[EMAIL PROTECTED]> wrote: > > Devraj wrote: > > > My application uses MySQL as a backend and am using the MySQL/Python > > > bindings. Are there any libraries that provide a database abs

Re: python + XUL

2007-08-12 Thread Luis M . González
On Aug 12, 3:21 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Madhu Alagu wrote: > > Hi > > > Python + XUL Success Stories > > > Thanks > > > Madhu Alagu > > Any chance you forgot to ask a question? > > Stefan My telepatic powers tell me that this means: "I don't really feel like googling, so j

Re: Shed Skin Python-to-C++ Compiler 0.0.21, Help needed

2007-06-30 Thread Luis M . González
On Jun 29, 7:48 am, "Mark Dufour" <[EMAIL PROTECTED]> wrote: > Hi all, > > I have just released version 0.0.22 of Shed Skin, an experimental > Python-to-C++ compiler. Among other things, it has the exciting new > feature of being able to generate (simple, for now) extension modules, > so it's much

Re: ANN: PyDAO - Python Hibernate-like Object-Relational Mapper

2007-06-27 Thread Luis M . González
On Jun 27, 4:08 pm, [EMAIL PROTECTED] wrote: > PyDAO is very thin object-relational mapper similar to Hibernate (but > much simpler). It's created to speed-up application development. It's > very simple, but powerful, based on POPO (Plain Old Python Objects). > > http://aplikacja.info/PyDAO.html >

Re: visual gui ides for python/jythpn

2007-06-24 Thread Luis M . González
On 24 jun, 04:23, "Ethan Kennerly" <[EMAIL PROTECTED]> wrote: > Luis M. Gonzalez wrote: > > PythonCard is an extremely easy to use alternative. > > It's like a simplified Visual Basic or Delphi IDE. > > Check IT out:www.pythoncard.org > > I second that! PythonCard is a rapid way to prototype an ug

Re: visual gui ides for python/jythpn

2007-06-21 Thread Luis M . González
On Jun 20, 3:16 pm, kromakey <[EMAIL PROTECTED]> wrote: > Hi, > > Are there any free visual GUI IDE's available for python/jython, which > have a drag and drop form designer similar to Visual Studio or > Delphi ? > > Cheers > kromakey PythonCard is an extremely easy to use alternative. It's like a

Re: sqlite newbie questions

2007-06-21 Thread Luis M . González
On Jun 21, 4:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I have a sqlite database table which has a table named "Transmittal". > Before inserting a new record into the database, i'd like to perform > some checking. How do i select all records with certain value (say > "Smith"

Re: PHP5 programmer learning Python

2007-05-27 Thread Luis M . González
On May 27, 12:41 pm, romiro <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm a PHP5 developer looking to "broaden my horizons" so to speak by > learning a new language. I emphasize the 5 in PHP since I have fully > engrossed myself in the full OOP of version 5 with my own ground-up > projects as well a

Re: Python Web Programming - looking for examples of solid high-traffic sites

2007-05-16 Thread Luis M . González
On May 16, 6:04 pm, Victor Kryukov <[EMAIL PROTECTED]> wrote: > Hello list, > > our team is going to rewrite our existing web-site, which has a lot of > dynamic content and was quickly prototyped some time ago. > > Today, as we get better idea of what we need, we're going to re-write > everything f

Re: Python Web Programming - looking for examples of solid high-traffic sites

2007-05-16 Thread Luis M . González
On May 16, 6:04 pm, Victor Kryukov <[EMAIL PROTECTED]> wrote: > Hello list, > > our team is going to rewrite our existing web-site, which has a lot of > dynamic content and was quickly prototyped some time ago. > > Today, as we get better idea of what we need, we're going to re-write > everything f

Re: Python Web Programming - looking for examples of solid high-traffic sites

2007-05-16 Thread Luis M . González
On May 16, 6:04 pm, Victor Kryukov <[EMAIL PROTECTED]> wrote: > Hello list, > > our team is going to rewrite our existing web-site, which has a lot of > dynamic content and was quickly prototyped some time ago. > > Today, as we get better idea of what we need, we're going to re-write > everything f

Re: Microsoft's Dynamic Languages Runtime (DLR)

2007-05-04 Thread Luis M . González
On May 4, 6:12 pm, Fuzzyman <[EMAIL PROTECTED]> wrote: > On May 4, 5:27 pm, Kaz Kylheku <[EMAIL PROTECTED]> wrote: > > > > > On May 2, 5:19 pm, sturlamolden <[EMAIL PROTECTED]> wrote: > > > > On May 3, 2:15 am, Kaz Kylheku <[EMAIL PROTECTED]> wrote: > > > > > Kindly refrain from creating any more o

Re: When are immutable tuples *essential*? Why can't you just use lists *everywhere* instead?

2007-04-20 Thread Luis M . González
On Apr 20, 3:28 pm, Bjoern Schliessmann wrote: > Luis M. González wrote: > > I don't remember exactly where I read about it, but Guido said > > once that tuples are being kept mainly for historical reasons. > > Weren't tuples added when lists already existed? >

  1   2   3   >