Steven Bethard wrote:
> Can you just do:
>
> py> def uniq(lst):
> ... result = []
> ... for s1 in sorted(lst, reverse=True):
> ... for s2 in result:
> ... if s1 <= s2:
> ... break
> ... else:
> ... result.append(s1)
> ... return
First a bit about myself. I've been programming in python several
years now, and I've got several more years before that with C. I've
got a lot of interest in the more theoretical stuff (language design,
component architectures, etc). Of late my focus has been on concurrent
operations (and on ho
Lutz Horn wrote:
[EMAIL PROTECTED] schrieb:
I've been searching high and low for a way to simply convert a small
XML configuration file to Python data structures.
Take a look at Amara (http://uche.ogbuji.net/tech/4Suite/amara/).
Lutz
Amara rules xml to python conversions. I've used it successfully
Igorati wrote:
Hello all, I am still needing some help on this code, I have gone a bit
further on it. Thank you for the help. I am trying to understand how to
make the file searchable and how I am to make the deposit and withdrawl
interact with the transaction class.
I need to just search the file
"Christos TZOTZIOY Georgiou" wrote:
>
> the 'in' operator searches for existance of *elements* in a set, not
> of *subsets*. BTW, only a frozenset can be included in a set.
ah! yes. that's clear now. thanks!
after all:
>>> for element in aset:
print element,
why did i think that 'in'
has anyone got some hard numbers on which pg access module is the
fastest, i currently use pypgsql, but i can't help but feel it's a
little slow.
3 seconds to connect, send one query, get th return data.
i'm on a adsl 1.5mbit/256kbit link, the server is on a 10/10mbit, and i
have a ping of 245ms
Timothy Smith skrev:
> has anyone got some hard numbers on which pg access module is the
> fastest, i currently use pypgsql, but i can't help but feel it's a
> little slow.
> 3 seconds to connect, send one query, get th return data.
> i'm on a adsl 1.5mbit/256kbit link, the server is on a 10/10mbi
AMK, thanks for your work on PyZeroConf!
Using PyZeroConf 0.12.
I'm seeing an issue with the Browser.py code. I am scanning for printers
using:
type = "_pdl-datastream._tcp.local."
The list of printers is returned, but every call to getServiceInfo() in
the Listener objectresults in a timeout and
Heiko Wundram said unto the world upon 2005-03-17 16:29:
On Thursday 17 March 2005 20:08, Leeds, Mark wrote:
But, I also want it to get rid of the AAA KP because
there are two AAA's even though the last two letters
are different. It doesn't matter to me which one
is gotten rid of but I don't know h
Mike,
I've got a very good news for you which, to my surprise, nobody
mentioned in this thread:
Right now, Micrsoft is developing a .NET version of Python (
http://www.ironpython.com ).
It has been started as an open source project by Jim Hugunin, which was
later hired by Microsoft to keep on wor
In article <[EMAIL PROTECTED]>,
Rhamphoryncus <[EMAIL PROTECTED]> wrote:
>
>import mainloop, urllib
>
>def get_and_save(path):
>infile = waitfor urllib.urlopen(path, async=True)
>outfile = waitfor open(path.split('/')[-1], async=True)
>waitfor outfile.write(waitfor infile.read(async=Tru
Leif B. Kristensen wrote:
Timothy Smith skrev:
has anyone got some hard numbers on which pg access module is the
fastest, i currently use pypgsql, but i can't help but feel it's a
little slow.
3 seconds to connect, send one query, get th return data.
i'm on a adsl 1.5mbit/256kbit link, the serve
Thanks to everyone who answered my two questions. I have only submitted
questions twice, and on both occasions the solutions were excellent,
and, I'm emarrassed to say, much simpler than I thought they would be.
My next goal is to be able to help someone they way y'all have helped me.
Thanks aga
Timothy Smith skrev:
> my only issue with psycopg, is last time i looked they had no win32
> port?
Uh, in that case, maybe you should consider changing platform? 8^)
--
Leif Biberg Kristensen
just another global village idiot
--
http://mail.python.org/mailman/listinfo/python-list
Leif B. Kristensen wrote:
Timothy Smith skrev:
my only issue with psycopg, is last time i looked they had no win32
port?
Uh, in that case, maybe you should consider changing platform? 8^)
my app has to be multiplatform, but i would gladly rip windows from the
drives of every computer wi
Gary D. Duzan wrote:
>A while back I tossed something together to deal with the same
issue
> in terms of "futures" (or "promises".) Here is roughly what the
above
> code would look like with futures as I implemented them:
>This was all done using plain Python 1.5.2 in 80 lines of code,
[EMAIL PROTECTED] TOP-POSTED:
> Anyone have any idea?
1. Larry Bates has already told you.
2. I note that you say "I do not want to use a new int for every member
of struct S.", *not* "I am forced to pack bools into an int, 1 bit per
bool, because I have no control over the file format". Quite a
"Kent Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Raymond Hettinger wrote:
> > [EMAIL PROTECTED]
> >
> >>I have many set objects some of which can contain same group of object
> >>while others can be subset of the other. Given a list of sets,
> >>I need to get a list of
On Fri, Mar 18, 2005 at 09:31:45AM +1000, Timothy Smith wrote:
> Leif B. Kristensen wrote:
>
> >Timothy Smith skrev:
> >>has anyone got some hard numbers on which pg access module is the
> >>fastest, i currently use pypgsql, but i can't help but feel it's a
> >>little slow.
> >>3 seconds to connec
s1 = set(['a','b','c'])
s2 = set(['a','c'])
s3 = set(['a','d','e','f'])
s4 = set(['r','k','l'])
s5 = set(['r','k','l'])
ls = [s1,s2,s3,s4,s5]
result1 = [s1, s3, s5]
A result can contain s4 or s5 at random. This problem looks like the
one of searching the correct hyperedges for a hypergraph. s1-5 a
Google has started a site Google Code http://code.google.com/ to
showcase Open Source software, and the first featured project is
PyGoogle, a Python module wrapper for the Google Web APIs. Also
mentioned is goopy/functional, a library that brings functional
language attributes to Python.
--
http:
The only reason i can think of to use it would be for the purpos of using an
Applet in a WebPage, as
the Jythonc tool can compile Jython classes to Java byte code.
But if your not in need of an Applet, then youll probably want to go with a
normal Python GUI
toolkit like wxPython (or QT or Tkinte
Is it possible to design interfaces that classes must implement in
Python? If it's not, is this functionality planned at all for the future?
Thanks,
Steve
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
matlab has a useful function called "textread" which I am trying to
reproduce
in python.
two inputs: filename, format (%s for string, %d for integers, etc and
arbitary delimiters)
variable number of outputs (to correspond to the format given as
input);
So suppose your file looked like this
s
On Thu, 17 Mar 2005 18:37:11 -0500, Kotlin Sam <[EMAIL PROTECTED]> wrote:
>Thanks to everyone who answered my two questions. I have only submitted
>questions twice, and on both occasions the solutions were excellent,
>and, I'm emarrassed to say, much simpler than I thought they would be.
>
>My n
> "les" == les ander <[EMAIL PROTECTED]> writes:
les> Hi, matlab has a useful function called "textread" which I am
les> trying to reproduce in python.
les> two inputs: filename, format (%s for string, %d for integers,
les> etc and arbitary delimiters)
les> variable numbe
Over the last few years I have converted from Perl and Scheme to
Python. There one task that I do often that is really slick in Perl
but escapes me in Python. I read in a text line from a file and check
it against several regular expressions and do something once I find a match.
For example, in p
Hi,
I have a configuration file need to be processed (read/write) by python.
Currently I the following method can only read and store data that
python read a line from a configuraiton file:
def _parse (self):
# parse message
m = self.FWShow_Command.match (conf_data)
if (m
[EMAIL PROTECTED] reported:
> Google has started a site Google Code http://code.google.com/ to
> showcase Open Source software, and the first featured project is
> PyGoogle, a Python module wrapper for the Google Web APIs. Also
> mentioned is goopy/functional, a library that brings functional
> la
With the round-trip time of 245ms, three seconds only allows for
approximately 12 packet exchanges (roughly 24 total packets). I think
latency is your problem.
casevh
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis wrote:
>> are the PyXML folks shipping the latest sgmlop? I'm pretty sure they've
>> forked the code (there's no UnicodeParser in the effbot.org edition), and
>> I have no idea how things work in the fork.
>
> As we've forked the code, the answer is a clear "yes" :-) It certainly
Twisted and Zope already use interfaces. You can download
the interface package and use it in you project.
Michele Simionato
--
http://mail.python.org/mailman/listinfo/python-list
Michele Simionato wrote:
Twisted and Zope already use interfaces. You can download
the interface package and use it in you project.
Thanks for the response. I'm completely new to Python, where exactly
would I go to find these interface packages(Python site, or Twisted/Zope
sites)? Is it the same
John Hunter wrote:
"les" == les ander <[EMAIL PROTECTED]> writes:
les> Hi, matlab has a useful function called "textread" which I am
les> trying to reproduce in python.
les> two inputs: filename, format (%s for string, %d for integers,
les> etc and arbitary delimiters)
Builing on J
F. Petitijean:
> ManagerInterface is a module not a class !
Yes, but the error message could be improved (at least for the sake of
people
not knowing the internal working of Python). Do you care to fill a bug
report?
Michele Simionato
--
http://mail.python.org/mailman/listinfo/
On behalf of the Python development team and the Python community, I'm
happy to announce the release of Python 2.4.1 (release candidate 2).
Python 2.4.1 is a bug-fix release. See the release notes at the website
(also available as Misc/NEWS in the source distribution) for details of
the bugs squi
Now they use the same interface package. For the other
questions: google is your friend. (try "zope interfaces"
then "twisted interfaces").
--
http://mail.python.org/mailman/listinfo/python-list
On Thursday 17 March 2005 23:31, Brian van den Broek wrote:
> Am I not
> right in thinking that with the dict approach there is no guarantee
> that the order from the original list will be preserved?
Yup, absolutely right that the original ordering will not be preserved. But, I
wonder whether thi
Paul Boddie wrote:
> The principal advantage of the property function was to permit the
> definition of "active" attributes without having a huge
> "if...elif...else" statement in the __getattr__ method. So the
> motivation was seemingly to externalize the usually simple logic in
> __getattr__ so
Steve wrote:
Is it possible to design interfaces that classes must implement in
Python?
There are some well-known 'independent' implementations of interfaces:
Zope Interfaces :http://www.zope.org/Wikis/Interfaces/FrontPage
- a separable component of the much larger app server
Mike Tuller wrote:
I have looked everywhere on the net, and can't figure out how to
configure python so that Tkinter will work with it. Any help would be
appreciated.
The following worked for me with OSX version 10.3 and the default python
2.3:
http://www.pythonmac.org/wiki/FAQ#head-8838d40d
Matt Wette <[EMAIL PROTECTED]> writes:
> Over the last few years I have converted from Perl and Scheme to
> Python. There one task that I do often that is really slick in Perl
> but escapes me in Python. I read in a text line from a file and check
> it against several regular expressions and do
"Mike Cox" <[EMAIL PROTECTED]> wrote:
>
>As you may or may not know, Microsoft is discontinuing Visual Basic in favor
>of VB.NET and that means I need to find a new easy programming language. I
>heard that Python is an interpreted language similar to VB.
This statement is a little bit silly. VB.
Teie kiri listi 'Linux-ee' teemal
read it immediately
edastati listi moderaatorile üle vaatamiseks.
Põhjus:
Postitus aadressilt, mis pole listi tellijate nimekirjas
Sõltuvalt moderaatori otsusest kiri kas postitakse listi või
teavitatakse teid moderaatori otsusest. Kui soovite seda po
I am working on making something called a PopMsg widget which is
actually identical to a Balloon widget from Pmw. Here is the code:
---code---
from Tkinter import *
import time
class PopMsg:
def showmsg(self, event):
for a in range(1000): pass
self.t.d
101 - 145 of 145 matches
Mail list logo