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.
--
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
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
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
> 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
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
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/
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
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
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
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
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
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
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
>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
>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
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
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
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
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
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
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
>
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
"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
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
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
"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
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
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
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
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
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
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
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
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:
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
>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
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
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
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,
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
"[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
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
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
I'll be there, if I can only find where I parked my Tardis :-)
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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'
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
> 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
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
[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,
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
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
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
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
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/
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
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
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
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
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
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
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
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
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
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
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:
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
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
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.
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
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
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
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
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
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
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
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
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
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
Привет 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
Привет 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
"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
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.
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
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
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
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();
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
[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
> 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
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
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 - 100 of 239 matches
Mail list logo