Re: [perl-python] text pattern matching, and expressiveness

2005-02-07 Thread John Bokma
Xah Lee wrote: > Perl is a language of syntactical variegations. Python on the other > hand, does not even allow changes in code's indentation, but its > efficiency and power in expression, with respect to semantics (i.e. > algorithms), showcases Perl's poverty in specification. Clarify :-D. --

Re: empty classes as c structs?

2005-02-07 Thread Steven Bethard
Michael Spencer wrote: I see no problem in repeating the methods, or inheriting the implementation. However, if namespace and bunch are actually different concepts (one with reference semantics, the other with copy), then __repr__ at least would need to be specialized, to highlight the differen

Re: "Collapsing" a list into a list of changes

2005-02-07 Thread Peter Otten
Fredrik Lundh wrote: > Peter Otten wrote: > >> *You* are cheating when you take a predefined function implemented in C >> (operator.mul) and then claim you are using pure Python. > > operator is a standard module in Python. if you have a desperate need > to be pointless in public, consider usin

Re: Basic file operation questions

2005-02-07 Thread Caleb Hattingh
Peter, that was very clear, thanks. > So not only is > > for line in file(...): ># do stuff > > the most elegant, it is also the fastest. file.readlines() comes close, but > is only viable for "small" files. -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-07 Thread Francis Girard
> In any case, he may be right, and the FSF, Trolltech, and you could all > be wrong. Your intention when you use the GPL may be moot if a judge > determines that the text itself and copyright law does not support your > interpretation. I'm sorry to jump into this thread without any knowledge of

Re: WYSIWYG wxPython "IDE"....?

2005-02-07 Thread Francis Girard
Le mardi 8 Février 2005 00:56, Simon John a écrit : > With the news of a GPL Qt4 for Windows, I decided to go with PyQt: > > http://mats.imk.fraunhofer.de/pipermail/pykde/2005-February/009527.html > > I just knocked up my application (GUI, backend is still in progress) > using QtDesigner in about 5

Re: Multiple constructors

2005-02-07 Thread Caleb Hattingh
Sure, Nick, I agree with you completely. I generally try to make sure that my classes are limited in what they do/provide, so it is not often a problem that a class may need to be instantiated in several very different ways. But your point is well taken. Thanks Caleb -- http://mail.python.org/

Re[5]: Get importer module from imported module

2005-02-07 Thread dody suria wijaya
dsw> New problem though. On line: dsw> newclass = new.classobj(classname + '_' + food, (mixin, main), {}) dsw> received "TypeError: metaclass conflict: the metaclass of a dsw> derived class must be a (non-strict) subclass of the dsw> metaclasses of all its bases". Oops, goofed up on me. The above

Re: Is Python as capable as Perl for sysadmin work?

2005-02-07 Thread Aahz
In article <[EMAIL PROTECTED]>, John M. Gabriele <[EMAIL PROTECTED]> wrote: > >For sysadmin-related tasks, is Python as useful as Perl, or does it get >clumsy when often dealing with the stuff admins deal with on a regular >basis? > >At some point during some dingy job in the back boiler room of Un

Re: IDLE history, Python IDE, and Interactive Python with Vim

2005-02-07 Thread Fernando Perez
Ashot wrote: > Sorry, a few more things I forgot to mention having to do with editing > multiline entries in the console: > > Autotab setting doesn't seem to have any effect, I have to type "ctrl-o" > manually I've noticed it doesn't work under win32. It's fine under *nix. There's only so much

Re: Problems with python and threads under Freebsd

2005-02-07 Thread snacktime
After debugging this some more I narrowed it down to an encryption function in pycrypto that is triggering the segfault. I posted a bug report. Don't really know enough about threading to know whether it's a python bug or a pycrypto bug, but I'll let someone else sort that out now.. Chris -- ht

Re: Is Python as capable as Perl for sysadmin work?

2005-02-07 Thread John M. Gabriele
On Mon, 07 Feb 2005 20:13:30 -0800, beliavsky wrote: > > [snip] > > I'm a Windows user, not a Unix sysadmin, but I've noticed that > Cameron Laird has written several articles on Python for system > administration in Unix Review and Sys Admin magazine, for example > http://www.unixreview.com/doc

Re: IDLE history, Python IDE, and Interactive Python with Vim

2005-02-07 Thread Fernando Perez
Ashot wrote: > yup, this is why I've been using it, its (almost exactly :) what I was looking > for. I had tried it before, but was reluctant to use it because the windows > terminal is not very appealing. Some things I've noticed so far that I think > could be improved, some of which are minor b

Re[4]: Get importer module from imported module

2005-02-07 Thread dody suria wijaya
Yup, Got it. New problem though. On line: newclass = new.classobj(classname + '_' + food, (mixin, main), {}) received "TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases". This had not happened when was written usin

Re: Big development in the GUI realm

2005-02-07 Thread Courageous
>OK, so according to Linus, the GPL allows No. Pay attention. Linus has his own revised version, to clarify this point, and in fact /overruling/ the GPL if the point is clarified differently by RMS or others. That's the right of their community, it's /their/ code. >make calls to the kernel

Re: Big development in the GUI realm

2005-02-07 Thread Courageous
>Now, that's not to say that they are correct in their interpretation of >the GPL's terms. In fact, if I had to bet on an outcome, I'd probably >wager that the court would hold that only static linking would force the >program as a whole to follow the GPL terms. I just wrote and deleted a long

Re: Big development in the GUI realm

2005-02-07 Thread Grant Edwards
On 2005-02-08, Robert Kern <[EMAIL PROTECTED]> wrote: > Believe me, I share your frustration every time this issue comes up. > However, I think it's best to follow Robert Heinlein's maxim: > > "Never attribute to malice what can adequately be explained > by stupidity." Of course you are right

Re: Big development in the GUI realm

2005-02-07 Thread Robert Kern
Grant Edwards wrote: Sorry if I was a bit blunt, but I'm sick of people trying to weasle their way around a license by creative interpretation of the license terms when the licensors made their intentions as clear as possible. Believe me, I share your frustration every time this issue comes up. Ho

Re: Is Python as capable as Perl for sysadmin work?

2005-02-07 Thread beliavsky
John M. Gabriele wrote: > I recently posted this sort of question to the c.l.p.m but > didn't get much of a response. I know a little Perl and a > little Python, but master neither at the moment. > > I see that Python is a general purpose OO programming language > that finds use among some system

Re: Problems with python and threads under Freebsd

2005-02-07 Thread snacktime
This is a followup with some more information. The program is written in twisted and I posted this to twisted-python also. The freebsd list wants a more detailed backtrace, which even with python compiled with OPT -g and --with-pydebug isn't happening for some reason. The script below calls a bl

Is Python as capable as Perl for sysadmin work?

2005-02-07 Thread John M. Gabriele
I recently posted this sort of question to the c.l.p.m but didn't get much of a response. I know a little Perl and a little Python, but master neither at the moment. I see that Python is a general purpose OO programming language that finds use among some system administrators, but my guess is that

Re: Big development in the GUI realm

2005-02-07 Thread Grant Edwards
On 2005-02-08, Robert Kern <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > >> Spare us your clueless, junior-high legal analyses > > [etc.] > > Hey! There's no need for name-calling. This is a tricky legal area that > can be very confusing even to the most legal-minded of us. While I think >

Re: Memory Allocation?

2005-02-07 Thread M.E.Farmer
Chris S. wrote: >Using similar logic, we shouldn't need access to the Garbage Collector >or Profiler. After all, why would anyone need to know how fast their >program is running or whether or not their garbage has been collected. >Python takes care of it. Exactly! Even though there are a few who ju

Re: variable declaration

2005-02-07 Thread Terry Reedy
"Brian van den Broek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is the right way to understand it in this vicinity: In the vicinity, but not quite exact >At compile time (by which I mean when the Python bytecode is built) Compile time is when the def statement is executed

Re: Re: Big development in the GUI realm

2005-02-07 Thread Tim Churches
Luke Skywalker <[EMAIL PROTECTED]> wrote: > > On Tue, 08 Feb 2005 13:24:35 +1100, Tim Churches > <[EMAIL PROTECTED]> wrote: > >: NOTE! This copyright does *not* cover user programs that use kernel > >: services by normal system calls - this is merely considered normal > use > >: of the kernel, an

Re: Big development in the GUI realm

2005-02-07 Thread Luke Skywalker
On Tue, 08 Feb 2005 13:24:35 +1100, Tim Churches <[EMAIL PROTECTED]> wrote: >: NOTE! This copyright does *not* cover user programs that use kernel >: services by normal system calls - this is merely considered normal use >: of the kernel, and does *not* fall under the heading of "derived work". OK

Re: Big development in the GUI realm

2005-02-07 Thread Mike Meyer
"Kartic" <[EMAIL PROTECTED]> writes: > Is there a "GPL for Dummies" out there??? :-) > > Sorry if I am asking a question that has already been asked/answered in > another form. > > In any case, let's say I use Python to create an application that uses > some module that is GPL. So what are my opti

Re: Big development in the GUI realm

2005-02-07 Thread Robert Kern
Grant Edwards wrote: Spare us your clueless, junior-high legal analyses [etc.] Hey! There's no need for name-calling. This is a tricky legal area that can be very confusing even to the most legal-minded of us. While I think "Luke" is incorrect in several respects and is somewhat uninformed about

Re: Big development in the GUI realm

2005-02-07 Thread Grant Edwards
On 2005-02-08, Luke Skywalker <[EMAIL PROTECTED]> wrote: >>Now, that's not to say that they are correct in their >>interpretation of the GPL's terms. In fact, if I had to bet on >>an outcome, I'd probably wager that the court would hold that >>only static linking would force the program as a whole

Re: Re: Big development in the GUI realm

2005-02-07 Thread Tim Churches
Luke Skywalker <[EMAIL PROTECTED]> wrote: > > On Mon, 07 Feb 2005 17:47:30 -0800, Robert Kern <[EMAIL PROTECTED]> > wrote: > >Now, that's not to say that they are correct in their interpretation > of > >the GPL's terms. In fact, if I had to bet on an outcome, I'd probably > >wager that the cour

Re: def __init__ question in a class definition

2005-02-07 Thread M.E.Farmer
Steve Holden wrote: > M.E.Farmer wrote: > > >>Jeffrey Borkent > >>Systems Specialist > >>Information Technology Services > > > > > > With that kind of credentials, and the fact that you claim you are a > > system specialists > > I don't know you have me worried already. > > I guess for you I ju

Re: Memory Allocation?

2005-02-07 Thread Tim Hoffman
Hi Chris Have a look at http://www.python.org/doc/2.3.4/whatsnew/section-pymalloc.html for a description of what is going on. Basically malloc is used to grab a big chunk of memory, then python objects use bits of it. Rgds Tim Chris S. wrote: Donn Cave wrote: In article <[EMAIL PROTECTED]>, "Chr

Re: Big development in the GUI realm

2005-02-07 Thread Luke Skywalker
On Mon, 07 Feb 2005 17:47:30 -0800, Robert Kern <[EMAIL PROTECTED]> wrote: >Now, that's not to say that they are correct in their interpretation of >the GPL's terms. In fact, if I had to bet on an outcome, I'd probably >wager that the court would hold that only static linking would force the >pr

Re: Dumb glob question

2005-02-07 Thread Michael Hoffman
Python Dunce wrote: So if I happen to be processing 'foo [bar].par2' glob.glob(filename[:-5]+'.*par2') doesn't return anything. Using win32api.FindFiles(filename[:-5]+'.*par2') works perfectly, but I don't want to rely on win32api functions. I hope that made more sense :). If you look in the

check socket alive

2005-02-07 Thread martinnitram
Dear all, following are some piece of my code (mainly create a socket connection to server and loop to receive data): # function to create and return socket def connect(): server_config = ('192.168.1.50', ); sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try:

Re: Big development in the GUI realm

2005-02-07 Thread Robert Kern
Luke Skywalker wrote: On Tue, 08 Feb 2005 10:47:25 +1100, Tim Churches <[EMAIL PROTECTED]> wrote: So there you have it: there must be some portion of the GPLed Program contained in the other work for it to fall under the scope of the GPL, and/or as defined as a derivative work in local copyright

Re: Big development in the GUI realm

2005-02-07 Thread Courageous
>If dynamic, then, it doesn't make sense that an EXE that builds on Qt >should also be GPLed. I'm hoping you're referring to the owners choice of license. For example, if someone, owning rights to a thing that was a dynamic library, decided to have a license akin to the GPL, it would easily quali

Re: variable declaration

2005-02-07 Thread Brian van den Broek
Steve Holden said unto the world upon 2005-02-07 17:51: Alexander Zatvornitskiy wrote: Привет Alex! 05 февраля 2005 в 17:00, Alex Martelli в своем письме к All писал: AM> to all intents and purposes working "as if" AM> it was a declaration. If I had to vote about the one worst formal AM> defec

Re: Big development in the GUI realm

2005-02-07 Thread JanC
Kartic schreef: > In any case, let's say I use Python to create an application that uses > some module that is GPL. So what are my options? For your own personal use: doesn't mather. If you want to distribute it, your application must be GPL'ed, so *all* source code must be made available for t

Re: empty classes as c structs?

2005-02-07 Thread Michael Spencer
Steven Bethard wrote: Do you mean there should be a separate Namespace and Bunch class? Or do you mean that an implementation with only a single method is less useful? The former. If the former, then you either have to repeat the methods __repr__, __eq__ and update for both Namespace and Bunch,

Re: Re: Big development in the GUI realm

2005-02-07 Thread Tim Churches
Luke Skywalker <[EMAIL PROTECTED]> wrote: > > On Tue, 08 Feb 2005 10:47:25 +1100, Tim Churches > <[EMAIL PROTECTED]> wrote: > >So there you have it: there must be some portion of the GPLed Program > contained in > >the other work for it to fall under the scope of the GPL, and/or as > defined as

Re: Dumb glob question

2005-02-07 Thread Python Dunce
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in comp.lang.python: > code like below willprint all files ending on 'par2', except tose not > containong 'vol' from the 5th position. is that what you need? > -import glob > -for nuke in glob.glob(r"""c:\temp\*.par2"""): > -try: > -nuke.in

Re: Memory Allocation?

2005-02-07 Thread Dima Dorfman
On 2005-02-07, Chris S. <[EMAIL PROTECTED]> wrote: > Is it possible to determine how much memory is allocated by an arbitrary > Python object? The hardest part about answering this question is figuring out what you want to count as being allocated for a particular object. That varies widely depen

Re: Big development in the GUI realm

2005-02-07 Thread Luke Skywalker
On Tue, 08 Feb 2005 10:47:25 +1100, Tim Churches <[EMAIL PROTECTED]> wrote: >So there you have it: there must be some portion of the GPLed Program >contained in >the other work for it to fall under the scope of the GPL, and/or as defined as >a >derivative work in local copyright law (local beca

Re: [Baypiggies] BayPIGgies: January 13, 7:30pm

2005-02-07 Thread Tony Cappellini
I'll be there, if I can only find where I parked my Tardis :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: negative integer division

2005-02-07 Thread Mark Jackson
Imbaud Pierre <[EMAIL PROTECTED]> writes: > integer division and modulo gives different results in c and python, > when negative numbers > are involved. take gdb as a widely available c interpreter > print -2 /3 > 0 for c, -1 for python. > more amazing, modulos of negative number give negative v

Re: negative integer division

2005-02-07 Thread Scott David Daniels
Imbaud Pierre wrote: integer division and modulo gives different results in c and python, when negative numbers are involved. take gdb as a widely available c interpreter print -2 /3 0 for c, -1 for python. more amazing, modulos of negative number give negative values! (in c). from an algebraic p

Re: negative integer division

2005-02-07 Thread Robert Kern
Imbaud Pierre wrote: integer division and modulo gives different results in c and python, when negative numbers are involved. take gdb as a widely available c interpreter print -2 /3 0 for c, -1 for python. more amazing, modulos of negative number give negative values! (in c). from an algebraic p

Re: Memory Allocation?

2005-02-07 Thread Chris S.
Donn Cave wrote: In article <[EMAIL PROTECTED]>, "Chris S." <[EMAIL PROTECTED]> wrote: Is it possible to determine how much memory is allocated by an arbitrary Python object? There doesn't seem to be anything in the docs about this, but considering that Python manages memory allocation, why wou

Re: negative integer division

2005-02-07 Thread Skip Montanaro
Imbaud> integer division and modulo gives different results in c and Imbaud> python, when negative numbers are involved. http://www.python.org/doc/faq/programming.html#why-does-22-10-return-3 Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory Allocation?

2005-02-07 Thread Chris S.
M.E.Farmer wrote: Hello Chris, I am sure there are many inaccuracies in this story but hey you asked instead of seeking your owns answers so In general you need not worry about memory allocation. Too be more specific objects have a size and most of them are known (at least to a wizard named T

Re: Memory Allocation?

2005-02-07 Thread Chris S.
Gerrit Holl wrote: Chris S. wrote: Is it possible to determine how much memory is allocated by an arbitrary Python object? There doesn't seem to be anything in the docs about this, but considering that Python manages memory allocation, why would such a module be more difficult to design than say

negative integer division

2005-02-07 Thread Imbaud Pierre
integer division and modulo gives different results in c and python, when negative numbers are involved. take gdb as a widely available c interpreter print -2 /3 0 for c, -1 for python. more amazing, modulos of negative number give negative values! (in c). from an algebraic point of view, python

Re: empty classes as c structs?

2005-02-07 Thread Carlos Ribeiro
On Mon, 07 Feb 2005 13:31:20 -0700, Steven Bethard <[EMAIL PROTECTED]> wrote: > Carlos Ribeiro wrote: > > On Mon, 07 Feb 2005 11:50:53 -0700, Steven Bethard > > <[EMAIL PROTECTED]> wrote: > > > >>Michael Spencer wrote: > >> > >>>We could use __add__, instead for combining namespaces > >> > >>I don'

Re: WYSIWYG wxPython "IDE"....?

2005-02-07 Thread Simon John
With the news of a GPL Qt4 for Windows, I decided to go with PyQt: http://mats.imk.fraunhofer.de/pipermail/pykde/2005-February/009527.html I just knocked up my application (GUI, backend is still in progress) using QtDesigner in about 5 minutes, and it's layout is just how I want it! -- http://m

Re: Big development in the GUI realm

2005-02-07 Thread Damjan
> Isn't this just the same thing with a different spin. There was always > an available distribution for linux for non-commercial use. Windows was > always the problem. You still can't use it for windows without knowing > how to compile the thing on windows. There'll be people that know how to co

Re: Confused with methods

2005-02-07 Thread jfj
I just realized that I'm trolling. We all sometimes get into a trollwar despite our intensions (even FL). So, I would like to apologize on behalf of all those who participated in it. I'm sorry you had to witness that. jfj -- http://mail.python.org/mailman/listinfo/python-list

BayPIGgies: February 10, 7:30pm

2005-02-07 Thread Aahz
[Argh -- ignore wrong date on last post] WARNING: the last meeting of BayPIGgies at Stanford is currently scheduled for March. Our host, Danny Yoo, is leaving Stanford, and we need to find a new location. If you wish to assist with the search, please join the BayPIGgies mailing list. Meanwhile,

BayPIGgies: January 13, 7:30pm

2005-02-07 Thread Aahz
WARNING: the last meeting of BayPIGgies at Stanford is currently scheduled for March. Our host, Danny Yoo, is leaving Stanford, and we need to find a new location. If you wish to assist with the search, please join the BayPIGgies mailing list. Meanwhile, let's all give hearty thanks to Danny for

Re: Re: Big development in the GUI realm

2005-02-07 Thread Tim Churches
Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > Tim Churches wrote: > > > Thus, it seems to me, and to the expert legal advice which we sought > (note the scope of the advice > > was Australian law only) that provided no GLPed source or object code > is mixed, included or > > combined with non-G

Re: "Collapsing" a list into a list of changes

2005-02-07 Thread Fredrik Lundh
Peter Otten wrote: > *You* are cheating when you take a predefined function implemented in C > (operator.mul) and then claim you are using pure Python. operator is a standard module in Python. if you have a desperate need to be pointless in public, consider using another newsgroup. -- htt

Re: def __init__ question in a class definition rephrased

2005-02-07 Thread Steven Bethard
Jeffrey Borkent wrote: what is the significance ( if any ) of the __ in these self.xx assignments. Variables with preceding __ are a vague attempt to avoid some types of name collisions in inheritance hierarchies. Any name that starts with a __ will be mangled by prefixing it with _: py> cl

Re: Modifying the global modules included with the distribution

2005-02-07 Thread Fredrik Lundh
Justin Standard wrote: > I'm trying to make some small modifications to the xml.dom.minidom > module. I'm developing on windows (since I have to at work), and I > located the .py files which represent the module in the Python23/Lib > directory, I made my changes to the file: > Python/Lib/xml/dom/

python-dev Summary for 2005-01-01 through 2005-01-15

2005-02-07 Thread Brett C
This is a summary of traffic on the `python-dev mailing list`_ from January 01, 2005 through January 15, 2005. It is intended to inform the wider Python community of on-going developments on the list. To comment on anything mentioned here, just post to `comp.lang.python`_ (or email python-lis

Subclassing cElementTree.Element

2005-02-07 Thread Kent Johnson
Is it possible to subclass cElementTree.Element? I tried >>> import cElementTree as et >>> class Elt(et.Element): ... pass ... Traceback (most recent call last): File "", line 1, in ? TypeError: Error when calling the metaclass bases cannot create 'builtin_function_or_method' instances

Re: Possibly OT: Controlling winamp with Python

2005-02-07 Thread JanC
Bill Mill schreef: > You could write the Python program as a proxy of the internet stream. > Basically, you would point your proxy at the web stream and receive > the data it sends. At the same time, you would be listening for > connections on some socket on the local machine. You would then point

Re: OT: why are LAMP sites slow?

2005-02-07 Thread Almad
M.E.Farmer wrote: > Paul Rubin wrote: > To emulate a table you use the div and span tag. Sorry, but I don't think that this is the way you have to create web pages. I think the most important think is to have web pages "semantic valid". That means, do not use table for formatting whole page, but

Re: def __init__ question in a class definition rephrased

2005-02-07 Thread Fredrik Lundh
Jeffrey Borkent wrote: > what is the significance ( if any ) of the __ in these self.xx > assignments. > > If i look at chapter 9.5 in the tutorial (v2.3.4) then it talks > about private variables is this the same thing yes. -- http://mail.python.org/mailman/listinfo/python-list

Re: PHP Embedded In Python

2005-02-07 Thread jdonnell
I'm not sure exactly what your trying to do, but I use php and python together a lot. I usually call the python script from php with the passthru function like this: -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-07 Thread Fredrik Lundh
Tim Churches wrote: > Thus, it seems to me, and to the expert legal advice which we sought (note > the scope of the advice > was Australian law only) that provided no GLPed source or object code is > mixed, included or > combined with non-GPLed code and how exactly are you going to load a DLL

Modifying the global modules included with the distribution

2005-02-07 Thread Justin Standard
Hi, I'm trying to make some small modifications to the xml.dom.minidom module. I'm developing on windows (since I have to at work), and I located the .py files which represent the module in the Python23/Lib directory, I made my changes to the file: Python/Lib/xml/dom/minidom.py. However, when I

Re: variable declaration

2005-02-07 Thread Steve Holden
Alexander Zatvornitskiy wrote: Привет Alex! 05 февраля 2005 в 17:00, Alex Martelli в своем письме к All писал: >> AM> The fact that in Python there are ONLY statements, NO >> AM> declarations, >> What is "global"? Statement? Ok, I fill lack of "var" statement:) AM> 'global' is an ugly wart, O

def __init__ question in a class definition rephrased

2005-02-07 Thread Jeffrey Borkent
Hi There, Please let me rephrase the problem as many people misunderstood what i was trying to ask. I know that the __init__ is the class constructor, that was not my question. under the def __init__ are several assignments self.__list = list self.refresh = 360 i wish to add some more assignme

Re: variable declaration

2005-02-07 Thread Alex Martelli
Alexander Zatvornitskiy <[EMAIL PROTECTED]> wrote: > ?? Alex! > > 05 ??? 2005 ? 17:00, Alex Martelli ? ? ?? ? All ?: > >> AM> The fact that in Python there are ONLY statements, NO > >> AM> declarations, > >> What is "global"? Statement? Ok, I fill lack of "var" statement:

Re: Big development in the GUI realm

2005-02-07 Thread Luke Skywalker
On Tue, 08 Feb 2005 07:57:51 +1100, Tim Churches <[EMAIL PROTECTED]> wrote: >Thus, it seems to me, and to the expert legal advice which we sought >(note the scope of the advice was Australian law only) that provided no >GLPed source or object code is mixed, included or combined with >non-GPLed c

Re: Confused with methods

2005-02-07 Thread jfj
Steven Bethard wrote: For your benefit, and the benefit of others who make this same mistake, I'll rewrite your original post in a manner that won't seem so self-important and confrontational[1]. ``People who code too much tend to get authoritative'', in general. I am an arrogant noob -- just li

Re: OT: why are LAMP sites slow?

2005-02-07 Thread JanC
Jeffrey Froman schreef: > M.E.Farmer wrote: > >> Div is a block level tag and span isn't. >> You can also group them  together and nest them. > > One caveat here -- I don't believe you can (should) nest a > inside a , or for that matter, nest any block-level element > inside an inline element.

Re: Big development in the GUI realm

2005-02-07 Thread Kartic
Is there a "GPL for Dummies" out there??? :-) Sorry if I am asking a question that has already been asked/answered in another form. In any case, let's say I use Python to create an application that uses some module that is GPL. So what are my options? 1. Distribute my app as closed source but wit

Re: socket question

2005-02-07 Thread Philippe C. Martin
Thanks, it was a bind problem: socket.gethostname() returns 'localhost' where '' is was was needed. Regards, Philippe On Mon, 07 Feb 2005 11:02:13 -0800, Kartic wrote: > > Philippe C. Martin wrote: >> >> My problem is that I cannot connect to my server if the client is > not on >> >> the sam

PHP Embedded In Python

2005-02-07 Thread Keith
I am a python and php newbie. Newbie is even pushing it. I need to take the contents of my_cgi.py and evaluate it with the php_module. Is this possible. I think that pyPHP goes the other way. The only reason I need this is because the header that all the html pages use on our website uses a ph

Re: socket question

2005-02-07 Thread Philippe C. Martin
Yes it was. Regards, Philippe On Mon, 07 Feb 2005 21:30:28 +, Steve Horsley wrote: > Philippe C. Martin wrote: >> Thanks you! that did it. >> > > That makes me wonder what socket.gethostname() was returning. > It wasn't 'localhost', was it? > > Steve -- http://mail.python.org/mailman

Re: Big development in the GUI realm

2005-02-07 Thread huy
RM wrote: For all you GUI developers, things just got a little more interesting. Trolltech will soon be offering the QT GUI toolkit for Windows under the GPL license. That means that PyQt may become a much more popular option in the near future. Unfortunately, some things available for the commer

Re: Problems with python and threads under Freebsd

2005-02-07 Thread Stefan Schwarzer
snacktime wrote: > I am consistantly getting seg faults and bus errors when running a > multi threaded python application under 5.3-release-p2. Python was > built from the port(python 2.4) with threading enabled. I had similar problems some time ago. The solution/workaround was to remove the thre

Re: "Collapsing" a list into a list of changes

2005-02-07 Thread Peter Otten
John Lenton wrote: > On Mon, Feb 07, 2005 at 09:39:11PM +0100, Peter Otten wrote: >> John Lenton wrote: >> > For example, the fastest way >> > to get the factorial of a (small enough) number in pure python is >> > >> > factorial = lambda n: reduce(operato

Re: "Collapsing" a list into a list of changes

2005-02-07 Thread Francis Girard
Le lundi 7 Février 2005 22:53, Steven Bethard a écrit : > Francis Girard wrote: > > I see. I personnaly use them frequently to bind an argument of a function > > with some fixed value. Modifying one of the example in > > http://mail.python.org/pipermail/python-list/2004-December/257990.html > > I f

Re: [noob] Questions about mathematical signs...

2005-02-07 Thread Lou Pecora
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > > 2. Inputing fractions like (a / b) + (c / d), It's tiring work too. > >Can it be simplified? Can't this just be written as a/b+c/d ? How much simpler can it get? I would think you need at least one symbol per op

Re: "Collapsing" a list into a list of changes

2005-02-07 Thread Steven Bethard
Francis Girard wrote: I see. I personnaly use them frequently to bind an argument of a function with some fixed value. Modifying one of the example in http://mail.python.org/pipermail/python-list/2004-December/257990.html I frequently have something like : SimpleXMLRPCServer.py: server.register

variable declaration

2005-02-07 Thread Alexander Zatvornitskiy
Привет Nick! 06 февраля 2005 в 02:54, Nick Coghlan в своем письме к Python List писал: NC> An alternate proposal, where the decision to request rebinding NC> semantics is made at the point of assignment: NC> epsilon = 0 NC> S = 0 NC> while epsilon < 10: NC>S .= S + epsilon NC>epsel

variable declaration

2005-02-07 Thread Alexander Zatvornitskiy
Привет Alex! 05 февраля 2005 в 17:00, Alex Martelli в своем письме к All писал: >> AM> The fact that in Python there are ONLY statements, NO >> AM> declarations, >> What is "global"? Statement? Ok, I fill lack of "var" statement:) AM> 'global' is an ugly wart, Ok, === def hi(): print "hel

Re: Word for a non-iterator iterable?

2005-02-07 Thread Terry Reedy
"Oren Tirosh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > But when iter() returns the same object - well, that's a > sign that the object is definitely not reiterable. Unless, of course, __iter__ resets the iteration variable to its starting value. But it would definitely not

Re: returning True, False or None

2005-02-07 Thread Steven Bethard
Matteo Dell'Amico wrote: Since a function that doesn't return is equivalent to one that returns None, you can write it as: >>> def doit(lst): ... s = set(lst) - set([None]) ... if s: return max(s) that looks to me as the most elegant so far, but this is just because it's mine :-) Cool.

Re: socket question

2005-02-07 Thread Steve Horsley
Philippe C. Martin wrote: Thanks you! that did it. That makes me wonder what socket.gethostname() was returning. It wasn't 'localhost', was it? Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Big development in the GUI realm

2005-02-07 Thread Steve Holden
Luke Skywalker wrote: On Mon, 7 Feb 2005 18:30:18 +0100, Michael Goettsche. <[EMAIL PROTECTED]> wrote: Not 100% right. Only drivers for commercial databases will not be included, mysql and co. are available. What I find weird, is that I always understood the GPL meaning that you must give back an

Re: "Collapsing" a list into a list of changes

2005-02-07 Thread Francis Girard
Le lundi 7 Février 2005 21:21, Steven Bethard a écrit : > Francis Girard wrote: > > Le lundi 7 Février 2005 20:30, Steven Bethard a écrit : > >>especially since I avoid lambda usage, and would have to write these as: > > > > Why avoid "lambda" usage ? You find them too difficult to read (I mean in

Re: python under java2

2005-02-07 Thread Steve Horsley
motokoit wrote: For some reason i need to start a python script from inside a java code. The main part of the code is something like this try{ Runtime rt = Runtime.getRuntime(); System.out.println("start"); Process proc = Runtime.getRuntime().exec("python myscript.py"); proc.waitFor();

Re: returning True, False or None

2005-02-07 Thread Matteo Dell'Amico
nghoffma wrote: sorry, that should have been: py>>import sets py>>def doit(thelist): ... s = sets.Set(thelist) ... if s == sets.Set([None]): ... return None ... else: ... return max(s - sets.Set([None])) Since a function that doesn't return is equivalent to one

Re: Python versus Perl ?

2005-02-07 Thread Peter Maas
[EMAIL PROTECTED] schrieb: His survey of programming languages in "The Art of Unix Programming", available at http://www.catb.org/~esr/writings/taoup/html/languageschapter.html , is interesting (and biased). Raymond evaluates C, C++, Shell, Perl, Tcl, Python, Java, and Emacs Lisp. One part of this

Re: Big development in the GUI realm

2005-02-07 Thread Damjan
> For all you GUI developers, things just got a little more interesting. > Trolltech will soon be offering the QT GUI toolkit for Windows under > the GPL license. That means that PyQt may become a much more popular > option in the near future. This applies to QT-4 only. I wonder how much of P

Re: python code with indention

2005-02-07 Thread Christopher De Vries
On Mon, Feb 07, 2005 at 03:43:15PM -0500, Dan Perl wrote: > > "Xah Lee" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > is it possible to write python code without any indentation? > > I read just today in a tutorial that "Python on the other hand, does not > even allow change

Re: loops -> list/generator comprehensions

2005-02-07 Thread Steven Bethard
Caleb Hattingh wrote: Would filenames = [os.path.join(dirpath, filename) for dirpath, dirnames, filenames in os.walk('.') for filename in filenames] have been clearer for you? Then all you have to do is remember the order of the for-loop execution: Bizarr

  1   2   3   >