I'm proud to release this, the 1.1.0 release of Roundup.
Feature:
- trackers may configure custom stop-words for the full-text indexer
- login may now be for a single session (and this is the default)
- trackers may hide exceptions from web users (they will be mailed to the
tracker admin)
Post-PyCon PyPy Sprint: February 27th - March 2nd 2006
The next PyPy sprint is scheduled to take place right after
PyCon 2006 in Dallas, Texas, USA.
We hope to see lots of newcomers at this sprint, so we'll give
friendly
limodou wrote:
On 2/10/06, john peter [EMAIL PROTECTED] wrote:
(snip)
what do i have to do if i want my application code to have
read-only
attributes?
I think you may consider property() built-in function:
property( [fget[, fset[, fdel[, doc)
Return a property attribute for
Ritesh Raj Sarraf enlightened us with:
bFound = True
break
return bFound
I see two weird things. First of all, the retun statement won't be
reached due to the break before it. Let's assume the break isn't
needed, and you
Sion Arrowsmith wrote:
Duncan Booth [EMAIL PROTECTED] wrote:
Although I generally advise against overuse of regular expressions,
this is one situation where regular expressions might be useful: [ ...
]
nobr = re.compile('\W*br.*?\W*', re.I)
Agreed (on both counts), but r'\s*br.*?\s*' might
On Sun, 29 Jan 2006 14:51:18 -0800, rumours say that Michael Spencer
[EMAIL PROTECTED] might have written:
http://www.effbot.org/librarybook/marshal.htm
There's a typo in the text accompanying that example: img.get_magic() should
be
imp.get_magic().
The error is easy to explain: he's on
Ritesh Raj Sarraf wrote:
Following is the code:
def walk_tree_copy(sRepository, sFile, sSourceDir, bFound = None):
try:
if sRepository is not None:
for name in os.listdir(sRepository):
path = os.path.join(sRepository, name)
if
Raymond Hettinger wrote:
[Alex]
So what is the rationale for having list SO much harder to use in such a
way, than either set or collections.deque?
Sounds like a loaded question ;-)
If you're asking why list's don't have a clear() method, the answer is
that they already had two ways to
On 2 Feb 2006 08:03:14 -0800, rumours say that Tim N. van der Leeuw
[EMAIL PROTECTED] might have written:
So now what I need to know is, how do I find out in what encoding a
particular filename is? Is there a portable way for doing this?
You said the filename comes as data, and not as contents
Ritesh Raj Sarraf wrote:
Hi,
Following is the code:
def walk_tree_copy(sRepository, sFile, sSourceDir, bFound = None):
try:
if sRepository is not None:
You're being overly defensive here. Passing None as first arg is clearly
a programming error, so the sooner you detect it
On Wed, 08 Feb 2006 00:29:16 +0100, rumours say that Xavier Morel
[EMAIL PROTECTED] might have written:
You can also nest Raid arrays, the most common nesting are Raid 01
(creating Raid1 arrays of Raid0 arrays), Raid 10 (creating Raid0 arrays
of Raid1 arrays), Raid 50 (Raid0 array of Raid5
On 8 Feb 2006 19:49:09 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I am a little bit stuck
I want to play a bunch of soundfiles randomly, but i want to give each
soundfile a rating (say 0-100) and have the likelihood that the file be
chosen be tied to its rating so that the higher
Bryan Olson wrote:
Magnus Lycka wrote:
Do you really have a usecase for this? It seems to me that your
argument is pretty hollow.
Sure:
if item_triggering_end in collection:
handle_end(whatever)
collection.clear()
Or maybe moving everything from several
Magnus Lycka wrote:
class BryansList(list):
... add=list.append
... def clear(self):
... del self[:]
...
b = BryansList([1,2,3,4,5])
b
[1, 2, 3, 4, 5]
b.add(6)
b.clear()
b
[]
Happy now? You can keep it, I don't need it. :)
Most of us consider minimal
On Fri, 10 Feb 2006 09:59:43 +, rumours say that Ed Singleton
[EMAIL PROTECTED] might have written:
If speed is no issue (for example you can queue an mp3 while the
current one is playing), then Ben's solution is the classic one.
Store the total of all your scores (or calculate it on the fly
Magnus Lycka wrote:
Bryan Olson wrote:
Magnus Lycka wrote:
Do you really have a usecase for this? It seems to me that your
argument is pretty hollow.
Sure:
if item_triggering_end in collection:
handle_end(whatever)
collection.clear()
Or maybe moving everything
Yes, documents should also be validated against the schema. I finally
managed to compile my schema with generateDS.py but I haven't tested
the result because of my poor knowledge of Python. So I have to wait
until the group does which wanted to use my schema.
Thanks for your answer!
Matthias
--
If you're asking why list's don't have a clear() method, the answer is
that they already had two ways to do it (slice assignment and slice
deletion) and Guido must have valued API compactness over collection
polymorphism. The latter is also evidenced by set.add() vs
list.append() and by
I found if I opened a second TKinter, Python will go out of work. But
I need two graph outputs at the same time. What to do?
Linda.
--
http://mail.python.org/mailman/listinfo/python-list
John McMonagle wrote:
Is there a python module which can determine an operating system's
default web browser application.
I would like to use it in the following context: I have a GUI
application where all the documentation is written as html pages. I
wish to have these html help pages
Hi,
I tried to understand the docs of Peak's PyProtocols, and failed.
I use PyProtocols v0.93 final. I fetched the ...tar.gz file for Linux
and installed it using the setup.py.
Here's my Hello-World-like example, that defines a Duck, which
implements the given Interface:
from protocols import
On 2/10/06, Michael Foord [EMAIL PROTECTED] wrote:
On 10/02/06, linda.s [EMAIL PROTECTED] wrote:
I found if I opened a second TKinter, Python will go out of work. But
I need two graph outputs at the same time. What to do?
Linda.
Hello linda (?),
How are you opening a 'second
os.fork() does that (on Mac and Unix).
Okay, but how?
Sorry, fork() is implemented strictly on a 'need to know' basis :-)
It seems to me that if the process which issued os.fork() ends, then
the forked process also ends.
No, no, they're not a quantum mechanic photon pair. Every process
Raymond Hettinger wrote:
[...]
If you're asking why list's don't have a clear() method, the answer is
that they already had two ways to do it (slice assignment and slice
deletion) and Guido must have valued API compactness over collection
polymorphism.
That's a decision from long ago. Now
On Wed, 08 Feb 2006 07:14:04 -0500, Steve Holden wrote:
Someone had to code Python so that it raised an error when you try to call
a module object. Is there a reason why module() should not execute
module.__call__()? I would have thought that by the duck typing principle,
it shouldn't matter
Thank you for your info. Now I have read that a simple call os.getpid()
returned the linux identifier of the thread in latest python versions, but
I'm using Python 2.3 and 2.4 and this call returns always the same id
I only want to take the pid of the thread but isn't as easier as it seems.
--
John McMonagle wrote:
Is there a python module which can determine an operating system's
default web browser application.
I would like to use it in the following context: I have a GUI
application where all the documentation is written as html pages. I
wish to have these html help pages
John McMonagle wrote:
On Thu, 2006-02-09 at 17:53 -0600, Larry Bates wrote:
You don't have to determine it. Just os.startfile('page1.html')
and let the OS figure it out.
Works great for Windows - not available on Unix though.
Take a look at the desktop module for similar functionality for
where to download numpy for Python 2.3 in Mac?
Thanks!
Linda
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I have installed the
python 2.4 version and downloaded the HTML documentation also.
But when I give the
command help( ) in the
IDLE command prompt and ' while ' ,it says
Sorry, topic and keyword documentation is
not available because the PythonHTML documentation files
linda.s wrote:
On 2/10/06, Michael Foord [EMAIL PROTECTED] wrote:
On 10/02/06, linda.s [EMAIL PROTECTED] wrote:
I found if I opened a second TKinter, Python will go out of work. But
I need two graph outputs at the same time. What to do?
Linda.
Hello linda (?),
How are you opening a
On 2/10/06, Steve Holden [EMAIL PROTECTED] wrote:
linda.s wrote:
On 2/10/06, Michael Foord [EMAIL PROTECTED] wrote:
On 10/02/06, linda.s [EMAIL PROTECTED] wrote:
I found if I opened a second TKinter, Python will go out of work. But
I need two graph outputs at the same time. What to
linda.s wrote:
On 2/10/06, Steve Holden [EMAIL PROTECTED] wrote:
linda.s wrote:
On 2/10/06, Michael Foord [EMAIL PROTECTED] wrote:
On 10/02/06, linda.s [EMAIL PROTECTED] wrote:
I found if I opened a second TKinter, Python will go out of work. But
I need two graph outputs at the same time.
[EMAIL PROTECTED] wrote:
But using the free SDK compiler from MS? That seems elusive.
Have you seen this?
http://www.vrplumber.com/programming/mstoolkit/
--
http://mail.python.org/mailman/listinfo/python-list
slogging_away wrote:
Adding it back in
cause it to not run - no error message - just a return to the in
the IDLE console window much as if I had executed the 'Check Module'
command.
What happens if you run it from the command line instead
of IDLE? After all, it might be some problem in IDLE
John McMonagle [EMAIL PROTECTED] wrote:
Is there a python module which can determine an operating system's
default web browser application.
http://docs.python.org/lib/module-webbrowser.html
--
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
___ | Frankly I have no feelings
On Feb 10, 2006, at 4:21 AM, Nebur wrote:
Hi,
I tried to understand the docs of Peak's PyProtocols, and failed.
I use PyProtocols v0.93 final. I fetched the ...tar.gz file for Linux
and installed it using the setup.py.
Here's my Hello-World-like example, that defines a Duck, which
Paul Rubin wrote:
Xavier Morel [EMAIL PROTECTED] writes:
BeautifulSoup...
The API of the package is extremely simple, straightforward and... obvious.
I did not find that. I spent a few minutes looking at the
documentation and it wasn't obvious at all how to use it. Maybe I
1. read
nope, we where one short plus mark just pulled out so now we're two short. if
you can get ANYONE that would be great?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of [EMAIL PROTECTED]
Sent: 10 February 2006 02:21
To: python-list@python.org
Subject:
On Fri, 10 Feb 2006 02:44:41 -0800, Rahul wrote:
Hi Everybody
I have some problem in my script. please help me.
I'll do better: I'll help you help yourself.
First step: what is the problem? Saying I have a problem and expecting
us to guess what it is will not give good results.
Second
On 09 Feb 2006 12:54:04 + (GMT)
Sion Arrowsmith [EMAIL PROTECTED] wrote:
Terry Hancock [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
Just to present a complete picture, not mentioned in
this thread are triple-quoted strings:
[ ... ]
Also in the mode of beating a dead horse ...
Shanon wrote:
Thank you for your info. Now I have read that a simple call os.getpid()
returned the linux identifier of the thread in latest python versions, but
I'm using Python 2.3 and 2.4 and this call returns always the same id
I only want to take the pid of the thread but isn't as easier
Shanon wrote:
Thank you for your info. Now I have read that a simple call os.getpid()
returned the linux identifier of the thread in latest python versions, but
I'm using Python 2.3 and 2.4 and this call returns always the same id
I only want to take the pid of the thread but isn't as easier
slogging_away wrote:
It appears it may not be a 'if' statment limitation at all. This is
because I added another 800 element array
Looks like a memory problem then...
in which to store the various
error messages generated when a configuration file error is deteceted
based on their
N Sharmishta-in1769c wrote:
Hi
I have installed the python 2.4 version and downloaded the HTML
documentation also.
But when I give the command help( ) in the IDLE command prompt and '
while ' ,it says
*/Sorry, topic and keyword documentation is not available because the Python
HTML
I have two lists which I want to use to create a dictionary. List x
would be the keys, and list y is the values.
x = [1,2,3,4,5]
y = ['a','b','c','d','e']
Any suggestions? looking for an efficent simple way to do this...maybe
i am just having a brain fart...i feel like this is quit simple.
py wrote:
I have two lists which I want to use to create a dictionary. List x
would be the keys, and list y is the values.
x = [1,2,3,4,5]
y = ['a','b','c','d','e']
Any suggestions? looking for an efficent simple way to do this...maybe
i am just having a brain fart...i feel like this
On Fri, 2006-02-10 at 08:51, py wrote:
I have two lists which I want to use to create a dictionary. List x
would be the keys, and list y is the values.
x = [1,2,3,4,5]
y = ['a','b','c','d','e']
Any suggestions? looking for an efficent simple way to do this...maybe
i am just having a
The next PyPy sprint is scheduled to take place right after
PyCon 2006 in Dallas, Texas, USA.
We hope to see lots of newcomers at this sprint, so we'll give
friendly introductions. Note that during the Pycon conference
we are giving PyPy talks which serve well as preparation.
Goals and
py [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have two lists which I want to use to create a dictionary. List x
would be the keys, and list y is the values.
x = [1,2,3,4,5]
y = ['a','b','c','d','e']
Any suggestions? looking for an efficent simple way to do this...maybe
i
Thanks to everyone. It is really the best place and the best people to
learn from.
Here's what I followed from the discussion:
def files(root):
for path, folders, files in os.walk(root):
for file in files:
yield path, file
def copy_first_match(repository, filename,
Hi,
I've spent a pleasant hour or so trying to bring up a top-level Tk menu at
the same spot as it would appear if I had actually clicked the menu. That
is, I want to bring up a menu from the keyboard.
The problem is computing the x and y args to menu.post. menu.winfo_x and
Diez B. Roggisch wrote:
py wrote:
I have two lists which I want to use to create a dictionary. List x
would be the keys, and list y is the values.
x = [1,2,3,4,5]
y = ['a','b','c','d','e']
Any suggestions? looking for an efficent simple way to do this...maybe
i am just having a brain
Thanks, itertools.izip and just zip work great. However, I should have
mentioned this, is that I need to keep the new dictionary sorted.
d = {1:'first', -5 : 'negative 5', 6:'six', 99:'ninety-nine',
3:'three'}
keys = d.keys()
keys.sort()
vals = map(d.get, keys)
At this point keys is sorted [-5,
[EMAIL PROTECTED] wrote:
|| My abuser has been using the medical device to harass me the
|| last 4-5 years. I have no idea what type of a device is being
|| used on me. I believe the device is only available to
|| licensed pharmacist(s). I am not very familiar with the
|| intend usage of the
On 8 Feb 2006 06:48:30 -0800, Lad wrote:
What editor shall I use if my Python script must contain utf-8
characters?
I use XP
The best (and free) are:
Eclipse http://www.eclipse.org/
with pydev http://pydev.sourceforge.net/
SPE http://pythonide.stani.be/
Eric3
Hello, this time I have a question about PIL usage, maybe if Lundh has
some time he can answer me.
I am experimenting different color quantization algorithms, so having
computed the palette with a clustering function, I use the code below
to quantize the original image to produce an image without
bruno at modulix wrote:
Looks like a memory problem then...
The system I am using has 2GB of memory, (unless you are syaing the
memory is faulty).
Why storing error messages ? Why don't you just write'em out (be it to
stdout or to a file) ?
I guess I could do that, (write them to a file as
py wrote:
Thanks, itertools.izip and just zip work great. However, I should have
mentioned this, is that I need to keep the new dictionary sorted.
Dictionaries aren't sorted. Period.
/MiO
--
http://mail.python.org/mailman/listinfo/python-list
py:
Thanks, itertools.izip and just zip work great. However, I should have
mentioned this, is that I need to keep the new dictionary sorted.
A Python dictionary is an unsorted data structure, so you cannot have
it sorted as you please.
(I have seen that lot of people ask for a sorted
Peter Maas wrote:
Lad schrieb:
What editor shall I use if my Python script must contain utf-8
characters?
I use XP
An extremely capable, easy to use and small editor is Neil
Hodgson's SciTE. It's my favorite editor on Windows and Linux.
There is a Windows installer at
slogging_away wrote:
bruno at modulix wrote:
Why storing error messages ? Why don't you just write'em out (be it to
stdout or to a file) ?
I guess I could do that, (write them to a file as they are discovered).
Right now the error messages are stored in the array and then the the
array is
Magnus Lycka wrote:
What happens if you run it from the command line instead
of IDLE? After all, it might be some problem in IDLE involved
here. Even if it doesn't work correctly outside IDLE, I was
thinking that IDLE might swallow some kind of error message.
Excellent suggestion, (behold
py wrote:
Thanks, itertools.izip and just zip work great. However, I should have
mentioned this, is that I need to keep the new dictionary sorted.
d = {1:'first', -5 : 'negative 5', 6:'six', 99:'ninety-nine',
3:'three'}
keys = d.keys()
keys.sort()
vals = map(d.get, keys)
At this point
Iain King wrote:
Short answer - you can't. Dictionaries aren't sequential structures,
so they have no sorted form. You can iterate through it in a sorted
manner however, as long as you keep your list of keys:
keys.sort()
for k in keys:
print d[k]
Iain
duh!thanks.
--
On 09/02/06, Magnus Lycka [EMAIL PROTECTED] wrote:
While the official Python Tutorial has served its
purpose well, keeping it up to date is hardly anyones
top priority, and there are others who passionately
create really good Python tutorials on the web.
I think 'A Byte of Python' by Swaroop
On Fri, 10 Feb 2006 06:50:25 -0800, slogging_away wrote:
Excellent suggestion, (behold the power of the command line!). I ran
two saved versions of the script that had produced the symptom
originally described. The fist seemed to be caused by too many 'if'
statements, the second by adding
Steven D'Aprano wrote:
On Fri, 10 Feb 2006 06:50:25 -0800, slogging_away wrote:
Excellent suggestion, (behold the power of the command line!). I ran
two saved versions of the script that had produced the symptom
originally described. The fist seemed to be caused by too many 'if'
statements,
Bryan Olson wrote:
Magnus Lycka wrote:
Bryan Olson wrote:
big_union = set()
for collection in some_iter:
big_union.update(t)
collection.clear()
I don't understand the second one. Where did 't' come from?
Cut-and-past carelessness. Meant to update with
Hi,
I'm parsing html. I have a page with a lot of html enitties for hebrew
characters. When i print what i get are blanks, dots and commas. How
can i decode this entities to unicode charachters?
TIA
Zunbeltz
--
http://mail.python.org/mailman/listinfo/python-list
There is a difference between the above code and your prior code, namely
in that you have explicitly instantiated Tk and put your canvas into the
root toplevel. Try this in idle where it was failing:
snip
Problem solved...I tried James' suggestion (explicitly instantiating
the root Tk
There are now more than 300 tutorials listed at
www.awaretek.com/tutorials.html so one could even imagine a
mega-tutorial using the best-of-breed tutorial for each sub-section,
a la Turbogears ;-)))
Of course it might bear an unholy resemblance to a FrankenTutorial
;-)))
Ron Stephens
--
Hello, Is there a *direct* way of doing set operations on lists which
preserve the order of the input lists ?
For Ex. l1 = [1, 5, 3, 2, 4, 7]
l2 = [3, 5, 10]
and (l1 intersect l2) returns [5, 3] (and (l2 intersect l1)
returns [3, 5])
thanks in advance,
amit.
--
I have a question for all you Pythoneers out there. I'm making a game
with Python, and have a need for fonts. I am currently using a free
TrueType font, but am considering switching to a bitmap font instead.
Let's say I own a font, and use it in a paint program to 'draw some
text' on a picture
Hello all,
I have released version 0.5 of my functional module, a collection of
higher-order and functional programming tools for Python. Currently
offered are tools for function composition, partial function
application, plus flip, foldl, foldr, scanl and scanr functions.
Two version of the
Actually, the directory-name comes in as a URL and as such I had no
problems yet just creating a unicode-string from it which I can pass to
os.walk(), and get proper unicode-filenames back from it.
Then I can encode them into utf-8 and pass them to the database-layer
and it all works.
cheers,
Amit Khemka wrote:
Hello, Is there a *direct* way of doing set operations on lists which
preserve the order of the input lists ?
For Ex. l1 = [1, 5, 3, 2, 4, 7]
l2 = [3, 5, 10]
and (l1 intersect l2) returns [5, 3] (and (l2 intersect l1)
returns [3, 5])
what do you
Yes, I adapted the instance, and it's working.That's it.
Thank you !
Nebur
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin http://[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Bob Greschke [EMAIL PROTECTED] writes:
What I came up with was the user can just create a text file (a kind
of a transaction log of what things were done to the copy of the
database on his machine), then cut and
Alan, Kent, many thanks this really helped!
But there is still a problem I guess with inheritance. I use the java
testsuit supplied with the original to test the server. If I use the
Java FitServer the testsuite can be completed. I commented everything
out from my class and it does not work??
Problem:
You have a list of unknown length, such as this: list =
[X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
the X's are all up front and you know that the item after the last X is
an O, or that the list ends with an X. There are never O's between
X's.
I have been
[EMAIL PROTECTED] wrote:
You have a list of unknown length, such as this: list =
[X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
the X's are all up front and you know that the item after the last X is
an O, or that the list ends with an X. There are never O's between
Ben Wilson [EMAIL PROTECTED] wrote:
I would like to dynamically assign object attributes:
dict = {
a : 1,
b : 2,
}
for key,val in dict :
obj.key = val
I've googled to no effect, or maybe I'm needing to be hit with the
appropriately sized clue-by-four.
The conventional clue-by-four applied
[EMAIL PROTECTED] wrote:
I was able to modify my C code so that instead of being a Python
module, it runs as a standalone binary, and it works as it should.
Calling it with os.spawn* works. The two versions are essentially the
same, the primary differences being the necessary difference in
[EMAIL PROTECTED] wrote:
Problem:
You have a list of unknown length, such as this: list =
[X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
the X's are all up front and you know that the item after the last X is
an O, or that the list ends with an X. There are never O's
You have a list of unknown length, such as this: list =
[X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
the X's are all up front and you know that the item after the last X is
an O, or that the list ends with an X. There are never O's between
X's.
I have been using
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Problem:
You have a list of unknown length, such as this: list =
[X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
the X's are all up front and you know that the item after the last X is
an O, or that the list ends
Paul McGuire [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Problem:
You have a list of unknown length, such as this: list =
[X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
the X's are all up
On 2006-02-08, Bernard Lebel [EMAIL PROTECTED] wrote:
Hi Bernhard and all,
oPipe = os.popen( run C:/program files/my app/executable.exe )
while 1:
sLine = oPipe.read()
print sLine
if sLine == '':
print 'No more line from pipe, exit.'
break
kpp9c wrote:
I've been looking at some of the suggested approaches and looked a
little at Michael's bit which works well bisect is a module i
always struggle with (hee hee)
I am intrigued by Ben's solution and Ben's distilled my problem quite
nicely
Thanks!-) Actually, you should use
Hi all,
Because I telecommute, I'm limited to using my company's webmail
interface, Microsoft Outlook Web Access, rather than having direct POP
or IMAP access to e-mail. This isn't ideal, for several reasons:
* Outlook Web Access has a horrendous user interface in any browser
other than
I believe Martin Franklin wrote a Tile.py wrapper for the Tk/Tile
extension, which adds theming to the core Tk widget set. It used to
reside here:
http://mfranklin.is-a-geek.org/docs/Tile/index.html
That server seems to be down. Anyone know if the wrapper is available
elsewhere? Or if someone
In article [EMAIL PROTECTED],
Bob Greschke [EMAIL PROTECTED] wrote:
Paul Rubin http://[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Bob Greschke [EMAIL PROTECTED] writes:
What I came up with was the user can just create a text file (a kind
of a transaction log of what things were
Thanks but I am a bit unsure as to what error I have made by posting
this question. I am not trying to be funny but can you give me a
pointer to the issue.
Many thanks
David
--
http://mail.python.org/mailman/listinfo/python-list
Well, my Perl way of doing it would be to have all attributes in a dict
(hash), then create the accessor vi a dynamic function. I knew Python
would have a right way to do it for Python, but when I went looking I
neglected to look at the core of the language. I suppose I'm just too
accustomed to
Amit Khemka wrote:
Hello, Is there a *direct* way of doing set operations on lists which
preserve the order of the input lists ?
Nope
For Ex. l1 = [1, 5, 3, 2, 4, 7]
l2 = [3, 5, 10]
and (l1 intersect l2) returns [5, 3] (and (l2 intersect l1)
returns [3, 5])
Kamilche wrote:
I have a question for all you Pythoneers out there. I'm making a game
with Python, and have a need for fonts. I am currently using a free
TrueType font, but am considering switching to a bitmap font instead.
Let's say I own a font, and use it in a paint program to
[EMAIL PROTECTED] wrote:
Problem:
You have a list of unknown length, such as this: list =
[X,X,X,O,O,O,O]. You want to extract all and only the X's. You know
the X's are all up front and you know that the item after the last X is
an O, or that the list ends with an X. There are never O's
[Amit Khemka]
Hello, Is there a *direct* way of doing set operations on lists which
preserve the order of the input lists ?
For Ex. l1 = [1, 5, 3, 2, 4, 7]
l2 = [3, 5, 10]
and (l1 intersect l2) returns [5, 3] (and (l2 intersect l1)
[bonono]
what do you mean
[...]
What not
for x in list:
if x == O:
break
storage.append(x)
i think this may take too long
better aproach would be to test for zero from the end
Regards, Daniel
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 180 matches
Mail list logo