Paul Watson wrote:
> Explicit [XML declaration] is better than implicit.
Yes indeed.
"Always use an XML declaration"
http://www-128.ibm.com/developerworks/xml/library/x-tipdecl.html
--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.nethttp://fo
Fredrik Lundh wrote:
> Chas Emerick wrote:
> > If I'm wrong, just chalk it up to the fact that this is the first
> > time I've ever looked at the Infoset spec, and I'm simply confused.
>
> the Infoset spec *is* the essence of XML; if you don't realize that an
> XML document is just a serialization
"Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote - 5 times - must be record for
stupidity...
sorry about this - the message was stuck in my outbox for some reason, and I hit
the send key multiple times, not noticing that it was in fact being sent...
- Hendrik
--
http://mail.python.org/mailman/lis
Chris wrote:
> I have a vested interest in showing a colleague that a python app can
> yield results in a time comparable to his C-app, which he feels is mch
> faster. I'd like to know what I can do within the constraints of the
> python language to get the best speed possible. Hope someone can he
Solved.
Thank to Amaury.
Solution :
change (in register), Command Processor, for to force using of "CMD /U/C"
Then, STDOUT is in utf-16 (but win-console stay in cp850)
HGD
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I have a simple assignment for school but am unsure where to go. The
> assignment is to read in a text file, split out the words and say which
> line each word appears in alphabetical order. I have the basic outline
> of the program done which is:
>
> def Xref(filename):
Martin v. Löwis wrote:
>> How about returning two lists, first list contains unicode names, the
>> second list contains undecodable names:
>>
>> files, troublesome = os.listdir(separate_errors=True)
>>
>> and make separate_errors=True by default in python 3.0 ?
>
> That would be quite an incompat
walterbyrd schrieb:
>
> What other "gotchas" would I look for?
>
Maybe this is helpfull for you:
http://docs.turbogears.org/1.0/Hosting
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
"jim" <[EMAIL PROTECTED]> wrote:
> Is there such thing as a free decompile that I can run in windows xp
You asked the same Q in comp.lang.perl.misc...
--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Chris wrote:
> This is just some dummy code to mimic what's being done in the real
> code. The actual code is python which is used as a scripting language in
> a third party app. The data structure returned by the app is more or
> less like the "data" list in the code below. The test for "ELEMEN
I have a simple assignment for school but am unsure where to go. The
assignment is to read in a text file, split out the words and say which
line each word appears in alphabetical order. I have the basic outline
of the program done which is:
def Xref(filename):
try:
fp = open(filename,
On Thu, 16 Nov 2006 15:35:00 -0500, Tommy Grav wrote
(in article <[EMAIL PROTECTED]>):
> I am trying to load in a fits-image and get this error
>
> wiyn05dec/n1 -> display -i obj062.fits
> Traceback (most recent call last):
>File "/Users/tgrav/Work/Astronomy/MyCode/Python/Redspit/
> display.
At Friday 17/11/2006 23:40, Chris wrote:
This is just some dummy code to mimic what's being done in the real
code. The actual code is python which is used as a scripting language in
a third party app. The data structure returned by the app is more or
less like the "data" list in the code below.
Hi, Chris.
I made a trivial testing framework for this cute problem and tried a
couple of modifications. I also added the 10% of non-ELEMENT lines you
mentioned. First thing, your updated algorithm didn't really get me much
faster results than the original. I guess that my disk array sort
Is there such thing as a free decompile that I can run in windows xp
--
http://mail.python.org/mailman/listinfo/python-list
Chris wrote:
> This is just some dummy code to mimic what's being done in the real
> code. The actual code is python which is used as a scripting language in
> a third party app. The data structure returned by the app is more or
> less like the "data" list in the code below. The test for "ELEMEN
"Chris" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> def write_data1(out, data):
> for i in data:
> if i[0] is 'ELEMENT':
Testing for equality with 'is' is a bit of a cheat since it is
implementation dependent,
but since you have a somewhat unfair constraint
>
This is just some dummy code to mimic what's being done in the real
code. The actual code is python which is used as a scripting language in
a third party app. The data structure returned by the app is more or
less like the "data" list in the code below. The test for "ELEMENT" is
necessary ...
For example:
- If I want to use Django, I need either FastCGI or Apache
2.X/mod_python 3.x
- if I want to use TurboGears, I need Python 2.4: not 2.3 and not 2.5
- I have just learned that some hosters have T&Cs that forbid long
running processes. I am not sure exactly what that means. Except I
u
At Friday 17/11/2006 19:41, Josh wrote:
Does python have a way of registering a callback - or through some other
mechanism - to notify me when a directory listing has changed, or if a file
has been modified, deleted, created, etc.? I'm looking for behavior similar
to the .net class FileSystemWat
Peter Maas wrote:
> No magic. Just a dot. But perhaps a dot is too tiny. We could take JUST_ME
> or ME_AND_BOBBY_MCGEE instead, of course as a reserved keyword followed
> by a
> dot ;)
Why a dot, and not a @, like in Ruby and Perl?
I think a dot is a particular bad idea, not the least due to po
At Friday 17/11/2006 17:40, Tim Roberts wrote:
> double wow! as it is my customer wants me to print to the default
> printer.
> can you please help me with the command for rendering the pdf to the
> printer with acrobat using python?
You'll have to use the registry to find "acrord32", but once
gabor schrieb:
> depends on the application. in the one where it happened i would just
> display an error message, and tell the admins to check the
> filesystem-encoding.
>
> (in other ones, where it's not critical to get the correct name, i would
> probably just convert the text to unicode using
Leo Kislov schrieb:
> How about returning two lists, first list contains unicode names, the
> second list contains undecodable names:
>
> files, troublesome = os.listdir(separate_errors=True)
>
> and make separate_errors=True by default in python 3.0 ?
That would be quite an incompatible change,
[Michael B. Trausch]
>> Let's say that I want to work with the latitude 33.6907570. In Python,
>> that number > can not be stored exactly without the aid of
>> decimal.Decimal().
>>
>> >>> 33.6907570
>> 33.6907568
>> >>>
>>
>> As you can see, it loses accuracy after the 6th decimal place.
On Nov 17, 12:07 pm, "walterbyrd" <[EMAIL PROTECTED]> wrote:
> I think I have read somewhere that using Python to develop
> web-applications requires some restarting of the Apache server, whereas
> PHP does not.
It depends what you do. CGI's operate much like PHP. mod_python has
auto-reloading (an
The reason for your problem is that, at it's core, it's not threadsafe - you
have a shared data value that 2 distinct things are trying to update.
[EMAIL PROTECTED] wrote:
...
> from threading import Thread
The following value is updated by 2 things trying to run in parallel.
> c = Console.getco
At Friday 17/11/2006 11:14, Sheldon wrote:
Can someone tell me how to remove the conflicts here ?
Wrong group!
Anyway, there is no need to reinvent the wheel, there are many array
libraries for C...
--
Gabriel Genellina
Softlab SRL
__
Corr
Robert Kern wrote:
> Fredrik Lundh wrote:
>> Terry Reedy wrote:
>>
>>> This is far more accurate than any measured latitude could be.
>> you're saying that we don't measure geographical positions on an atomic
>> scale? ;-)
>>
>> (it's too late for serious calculations, but I'd guess we're talking
sturlamolden wrote:
> Sorry Mathworks, I have used your product for years, but you cannot
> compete with NumPy.
Funny. I went exactly the other way. Had a full OO postprocessing library
for Python/Scipy/HDF etc which worked brilliantly. Then changed to a 64 bit
machine and spent three days trying
[EMAIL PROTECTED] wrote:
> Klaas:
>
> > Well, you can reduce the memory usage to virtually nothing by using a
> > generator expression rather than list comprehension.
>
> Are you sure? I don't think so. Can you show a little example?
Sorry, that was boneheaded and wrong.
-Mike
--
http://mail.py
Fredrik Lundh wrote:
> Terry Reedy wrote:
>
>> This is far more accurate than any measured latitude could be.
>
> you're saying that we don't measure geographical positions on an atomic
> scale? ;-)
>
> (it's too late for serious calculations, but I'd guess we're talking
> Ångströms here, righ
On Fri, 17 Nov 2006 22:52:51 +, tom <[EMAIL PROTECTED]> wrote:
>Hi Guys,
>
>I'm wondering if it's possible to set up an inotify watch on a netfilter
>socket. I want to monitor for incoming packets to the netfilter QUEUE
>target, but I can't seem to do it. select.select works on it, but i
>want
Gregg Lind wrote:
> I wish something like this was part of the standard python installation,
> and didn't require one to use Numpy or Numarray. This sort of list
> subsetting is useful in many, many contexts.
>
Many of numpy's multi-dimensional slicing and indexing operations are
implemented
Sandy wrote:
...
> Lots of trees, but where's the Wood?
>
> Where are concurrency/distributed models compared and discussed?
I don't know about wood, but you can find a shrubbery[*] called Kamaelia
sitting here:
* http://kamaelia.sourceforge.net/Home
A basic (albeit now aging) tutorial as t
This solution I think is pretty nice:
source[:] = [x for x in source if x.lower() not in target]
Thanks a lot for all the answers,
Ray
Steven D'Aprano wrote:
> On Fri, 17 Nov 2006 12:00:46 -0800, Rares Vernica wrote:
>
>> Problem context:
>>
>> import os
>> dirs_exclude = set(('a', 'b', 'e'))
>
Terry Reedy wrote:
> This is far more accurate than any measured latitude could be.
you're saying that we don't measure geographical positions on an atomic
scale? ;-)
(it's too late for serious calculations, but I'd guess we're talking
Ångströms here, right?)
--
http://mail.python.org/mail
The problem with skipping over them is that "walk" would still walk them
and their content. If they have a lot of other dirs and files inside
then this might end up being time consuming.
Thanks,
Ray
Neil Cerutti wrote:
> On 2006-11-17, Rares Vernica <[EMAIL PROTECTED]> wrote:
>> Sorry for not b
"Michael B. Trausch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Let's say that I want to work with the latitude 33.6907570. In Python,
> that number > can not be stored exactly without the aid of
> decimal.Decimal().
> >>> 33.6907570
> 33.6907568
> >>>
> As you can
Michael B. Trausch wrote:
> On Fri, 2006-11-17 at 21:25 +0100, Fredrik Lundh wrote:
>> > Some of the lat/long pairs that I have used seem to come out fine, but
>> > some do not. Because the mathmatics used with them involve complex
>> > equations when determining distance and the like, any error
Hi Guys,
I'm wondering if it's possible to set up an inotify watch on a netfilter
socket. I want to monitor for incoming packets to the netfilter QUEUE
target, but I can't seem to do it. select.select works on it, but i
wanted to use inotify really. Is there any way to create a tangible
file
Hi,
Does python have a way of registering a callback - or through some other
mechanism - to notify me when a directory listing has changed, or if a file
has been modified, deleted, created, etc.? I'm looking for behavior similar
to the .net class FileSystemWatcher. I would also be interested to
Michael B. Trausch wrote:
> Sure, I do. Let's say that I want to work with the latitude
> 33.6907570. In Python, that number can not be stored exactly without
> the aid of decimal.Decimal().
>
> >>> 33.6907570
> 33.6907568
> >>>
>
> As you can see, it loses accuracy after the 6th d
On Fri, 2006-11-17 at 16:51 -0500, Michael B. Trausch wrote:
> On Fri, 2006-11-17 at 21:25 +0100, Fredrik Lundh wrote:
> > > Some of the lat/long pairs that I have used seem to come out fine, but
> > > some do not. Because the mathmatics used with them involve complex
> > > equations when deter
Michael B. Trausch wrote:
> Perhaps you should not make assumptions; I am sure that you have heard
> what they do at some point before. While *some* of the error doesn't
> propagate as expected (which is actually a problem in itself—equations
> no longer make sense if they are not mathematically b
On Fri, 2006-11-17 at 16:51 -0500, Michael B. Trausch wrote:
> [...]
> Let's say that I want to work with the latitude 33.6907570. In
> Python, that number can not be stored exactly without the aid of
> decimal.Decimal().
>
> >>> 33.6907570
> 33.6907568
You say that like it's Python's fa
On Fri, 2006-11-17 at 21:25 +0100, Fredrik Lundh wrote:
> > Some of the lat/long pairs that I have used seem to come out fine, but
> > some do not. Because the mathmatics used with them involve complex
> > equations when determining distance and the like, any error gets
> > massively compounde
On Nov 17, 7:19 pm, Steven D'Aprano <[EMAIL PROTECTED]>
wrote:
[snip]
> You want to see "HIDEDCT1" match closer to "HIDESCT1" than "HIDEDST1":
>
> HIDEDCT1 -- John's "best match" target string
> HIDEDST1 -- difflib's "best match" target string
> HIDESCT1 -- source string
>
> John's best match ma
krishnakant Mane wrote:
>>
> double wow! as it is my customer wants me to print to the default
> printer.
> can you please help me with the command for rendering the pdf to the
> printer with acrobat using python?
You'll have to use the registry to find "acrord32", but once you find
it, you jus
Thanks for pointing that out. I wasn't aware of this. Will take a
look.
Sébastien Boisgérault wrote:
> On Nov 16, 10:46 pm, "John Henry" <[EMAIL PROTECTED]> wrote:
> > Bill Gates will have you jailed! :-)
> >
> > On a more serious note, is there any alternative to Simulink though?
>
> Ptolemy I
Hi!
This code :
p=subprocess.Popen(chaine, shell=True, stdout=subprocess.PIPE,
stdin=subprocess.PIPE, stderr=subprocess.PIPE)
data=p.stdout.read()
Run OK, except when stdout.read() give unicode data, with char>255 (this
give many "?")
How read real unicode data in stdout.read() ?
T
Luis M. González wrote:
> [EMAIL PROTECTED] ha escrito:
>
> > Luis M. González wrote:
> > > OK. But since when has python been considered a viable alternative for
> > > web development?
> > > As a generalp purpose language, it's older.
> > > But as a web development language, it's olnly when people
On Fri, 17 Nov 2006 12:00:46 -0800, Rares Vernica wrote:
> Problem context:
>
> import os
> dirs_exclude = set(('a', 'b', 'e'))
> for root, dirs, files in os.walk('python/Lib/email'):
> # Task:
> # delete from "dirs" the directory names from "dirs_exclude"
> # case-insensitive
>
>
OK, if you don't care the resulting order, do it like:
class Convert2Dict:
def __init__(self, data):
self._data={}
for x in data:
self._data[x.upper()]=x
def get(self, key):
return self._data[key.upper()]
a = ["a", "B"]
b = ["c", "a", "A", "D", "b"]
b_d
On 2006-11-17, Rares Vernica <[EMAIL PROTECTED]> wrote:
> Sorry for not being clear from the beginning and for not using
> clear variable names.
>
> Problem context:
>
> import os
> dirs_exclude = set(('a', 'b', 'e'))
> for root, dirs, files in os.walk('python/Lib/email'):
> # Task:
> # d
Łukasz Langa wrote:
> [EMAIL PROTECTED]:
> > Ok, I built Python 2.5 (same AIX 5.1 machine). With the "for line in
> > shellOut" loop in, it now takes "only" 7 secs instead of the 11 secs in
> > python 2.4.3. So, that's better, but still unreasonably slow. And to
> > answer another's question,
Michael B. Trausch wrote:
> I don't have (so far as I know) a 64-bit float available to me.
as mentioned in the documentation, Python's "float" datatype is
implemented C doubles, which is 64-bit IEEE on all major platforms.
> Some of the lat/long pairs that I have used seem to come out fine, bu
> The solution so far is:
>
> for i in xrange(len(dirs), 0, -1):
>if dirs[i-1].lower() in dirs_exclude:
> del dirs[i-1]
This won't affect much, but uses better style I think.
Change:
for i in xrange(len(dirs),0,-1):
To:
for i in reversed(xrange(len(dirs))):
and then just use 'i' inst
Michael B. Trausch wrote:
> I don't have (so far as I know) a 64-bit float available to me.
Yes, you do: the regular Python float type.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as th
I looked all over the web and can't seem to find any examples. Surely
someone must be using python to access the paypal SDK. I found this
link for ruby (which was helpful), but python code would be better:
http://www.jeremyhubert.com/2006/7/7/using-paypal-website-payments-pro-with-ruby-on-rails
On Wed, 2006-11-15 at 12:48 +0100, Fredrik Lundh wrote:
> Steve Holden wrote:
>
> >> It /would/ be nice to see Decimal() become the default. I cannot
> >> imagine why in an otherwise "human enough" language, math wouldn't be
> >> included in that without going out of one's way to do it. :-)
>
The curve ball is the case insensitivity otherwise it's a
straightforward set operation.
I wonder if it's possible to sub-class set and make the item
comparision case insensitive.
Anybody knows how to do that?
Tim Chase wrote:
> > Yeah, I ended up doing a similar kind of loop. That is pretty m
Sorry for not being clear from the beginning and for not using clear
variable names.
Problem context:
import os
dirs_exclude = set(('a', 'b', 'e'))
for root, dirs, files in os.walk('python/Lib/email'):
# Task:
# delete from "dirs" the directory names from "dirs_exclude"
# case-ins
Scratch that. b becomes all upper...
John Henry wrote:
> from sets import Set as set # Python 2.3
>
> b = list( set([i.upper() for i in b) - set([i.upper() for i in a] ) )
>
>
> Rares Vernica wrote:
> > Yeah, I ended up doing a similar kind of loop. That is pretty messy.
> >
> > Is there any ot
> from sets import Set as set # Python 2.3
>
> b = list( set([i.upper() for i in b) - set([i.upper() for i in a] ) )
Just a caveat...this can change the order of items in the results
as sets (and their differences) are inherently unordered data
structures. If order of the items in the list n
from sets import Set as set # Python 2.3
b = list( set([i.upper() for i in b) - set([i.upper() for i in a] ) )
Rares Vernica wrote:
> Yeah, I ended up doing a similar kind of loop. That is pretty messy.
>
> Is there any other way?
>
> Thanks,
> Ray
>
> Tim Chase wrote:
> >> That is a nice solu
> Yeah, I ended up doing a similar kind of loop. That is pretty messy.
>
> Is there any other way?
I've already provided 2 (or 3 depending on how one counts)
solutions, each of which solve an interpretation of your original
problem, neither of which involve more than 3 lines of fairly
clean co
Fredrik Lundh wrote:
>> What is a *nice* way of doing it?
>
> r = [i for i in e if i not in l]
and swap l and e, add a few calls to lower, and start using better
variable names in the future.
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 16, 10:46 pm, "John Henry" <[EMAIL PROTECTED]> wrote:
> Bill Gates will have you jailed! :-)
>
> On a more serious note, is there any alternative to Simulink though?
Ptolemy II. Java stuff in the core but components may be written in
Python
http://ptolemy.eecs.berkeley.edu/ptolemyII/
htt
krishnakant Mane wrote:
> I can't figure out where is the win32api module in my system.
> I think I need to download it.
> I tried to search but did not find it.
googling for "python win32api" gives you:
http://sourceforge.net/project/showfiles.php?group_id=78018
among the first few hits.
Yeah, I ended up doing a similar kind of loop. That is pretty messy.
Is there any other way?
Thanks,
Ray
Tim Chase wrote:
>> That is a nice solution.
>>
>> But, how about modifying the list in place?
>>
>> That is, l would become ['c', 'D'].
>>
>>> >>> e = ['a', 'b', 'e']
>>> >>> l = ['A', 'a'
Rares Vernica wrote:
> I have the following problem:
>
> I have a list like
>e = ['a', 'b', 'e']
> and another list like
>l = ['A', 'a', 'c', 'D', 'E']
> I would like to remove from l all the elements that appear in e
> case-insensitive. That is, the result would be
>r = ['c', 'D']
>
> That is a nice solution.
>
> But, how about modifying the list in place?
>
> That is, l would become ['c', 'D'].
>
>> >>> e = ['a', 'b', 'e']
>> >>> l = ['A', 'a', 'c', 'D', 'E']
>> >>> s = set(e)
>> >>> [x for x in l if x.lower() not in s]
>> ['c', 'D']
Well...changing the requirements m
On 17/11/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> http://tgolden.sc.sabren.com/python/win32_how_do_i/print.html
>
> or possibly:
>
> http://www.planetpdf.com/forumarchive/49365.asp
I can't figure out where is the win32api module in my system.
I think I need to download it.
I tried
sturlamolden wrote:
> Boris wrote:
> > Hi, is there any alternative software for Matlab? Although Matlab is
> > powerful & popular among mathematical & engineering guys, it still
> > costs too much & not publicly open. So I wonder if there's similar
> > software/lang that is open & with comparable
On Friday 17 November 2006 02:58, you wrote:
> On Fri, 17 Nov 2006 00:25:39 -0500,
> jim-on-linux <[EMAIL PROTECTED]>
>
> declaimed the following in comp.lang.python:
> > Without being able to run the code my
> > question is where is the id in the lambda
> > defined?
>
> Please take into ac
Steven D'Aprano wrote:
>
> >>> s = difflib.SequenceMatcher(None, "HIDEDCT1", "HIDESCT1")
> >>> t = difflib.SequenceMatcher(None, "HIDEDST1", "HIDESCT1")
> >>>
> >>> for block in s.get_matching_blocks():
> ... print "a[%d] and b[%d] match for %d elements" % block
> ...
> a[0] and b[0] match f
That is a nice solution.
But, how about modifying the list in place?
That is, l would become ['c', 'D'].
Thanks a lot,
Ray
Tim Chase wrote:
>> I have a list like
>>e = ['a', 'b', 'e']
>> and another list like
>>l = ['A', 'a', 'c', 'D', 'E']
>> I would like to remove from l all the eleme
km wrote:
> Hi all,
>
> Thats ridiculous! why is that the numpy implementation documentation is
> put on sale and not available freely to everyone?
http://www.tramy.us/FAQ.html
In brief, because otherwise there wouldn't be any complete documentation. With
all due respect to the Numeric manua
>> Short answer: People use Python instead of Java because people (at
>> least intelligent people) tend to avoid pain.
>>
> Intelligent people don't suffer from fanboy sentiments. They just pick a
> language that works best for them.
I agree with the previous poster and don't think it's just
Matimus wrote:
> Boris wrote:
> > Hi, is there any alternative software for Matlab? Although Matlab is
> > powerful & popular among mathematical & engineering guys, it still
> > costs too much & not publicly open. So I wonder if there's similar
> > software/lang that is open & with comparable
Hi all,
Thats ridiculous! why is that the numpy implementation documentation is put
on sale and not available freely to everyone?
regards,
KM
---
On 11/18/06, Robert Kern <[EMAIL PROTECTED]> wr
Learn something new everyday. I always wondered how spell checkers are
done. Thanks.
John Machin wrote:
> John Henry wrote:
> > I am just wondering what's with get_close_matches() in difflib. What's
> > the magic? How fuzzy do I need to get in order to get a match?
>
> Are you desperate to un
Why Tea wrote:
> All I need is something to provide me with array features. I can't
> remember why I chose to use numarray a while ago...
You will probably want numpy these days. numarray is being phased out.
http://numpy.scipy.org/
--
Robert Kern
"I have come to believe that the whole world
I suppose you are right. I guess I ended up with an odd case.
I was thinking that:
To change "HIDE*S*ST1" to "HIDE*D*ST1", all you do is remove the "*S*"
from the source and the "*D*" from the target.
In order to change "HIDE*SC*T1" to "HIDE*DS*T1", I thought you have to
remove 2 characters *SC
robert wrote:
> Didn't find the relevant reasoning within time. Yet guess the reason is
> isolated-module-centric.
I gave you a brief rundown on this list already.
http://mail.python.org/pipermail/python-list/2006-October/411145.html
And I'll note again that a fuller discussion is given in
walterbyrd wrote:
> I think I have read somewhere that using Python to develop
> web-applications requires some restarting of the Apache server, whereas
> PHP does not.
Using Python to develop web-applications is a very broad topic.
E.g. you don't have to restart Apache if you develop simple
shor
> I have a list like
>e = ['a', 'b', 'e']
> and another list like
>l = ['A', 'a', 'c', 'D', 'E']
> I would like to remove from l all the elements that appear in e
> case-insensitive. That is, the result would be
>r = ['c', 'D']
>
> What is a *nice* way of doing it?
Well, it's usuall
walterbyrd wrote:
> I think I have read somewhere that using Python to develop
> web-applications requires some restarting of the Apache server, whereas
> PHP does not.
>
first thing... there are many many ways how to run a python-apache web
application..
- mod_python
- cgi
- fastcgi
- sci
- pr
Hi,
I have the following problem:
I have a list like
e = ['a', 'b', 'e']
and another list like
l = ['A', 'a', 'c', 'D', 'E']
I would like to remove from l all the elements that appear in e
case-insensitive. That is, the result would be
r = ['c', 'D']
What is a *nice* way of doing it?
Gregory Piñero wrote:
> How does Python use memory on a 64 bit OS? Is there a lot more
> available to it by default?
as we've already said a couple of hundred times in this thread, Python
uses *all* the memory it can get from the operating system. no more, no
less.
(the link I posted yesterd
I wish something like this was part of the standard python installation,
and didn't require one to use Numpy or Numarray. This sort of list
subsetting is useful in many, many contexts.
--
http://mail.python.org/mailman/listinfo/python-list
ronrsr wrote:
> very sorry, that was my error - len(result[0]) and len(result[1]) both
> return 1 --
>
> i think I'm misunderstanding what len() does - to me they appear to
> have 2 or 3 elements, or at least be composed of a string of some
> length.
One string composed of multiple data elements
Gregg Lind wrote:
> One difficulty I am having with using Python for scientific computing is
> that I cannot figure out good ways to get arbitrary (unpatterned?) slices.
> In Python, solutions I have found for these tasks are:
>
> [vals[ii] for ii in wanted]# task 1
>
> [a[1] for in zip
One difficulty I am having with using Python for scientific computing is
that I cannot figure out good ways to get arbitrary (unpatterned?) slices.
As an example, in R or Matlab / Octave, syntax exists such that:
vals = range(6)
wanted = [1,2,3,1,1,1]
vals[wanted] = [1,2,3,1,1,1]
Both of those
In <[EMAIL PROTECTED]>, walterbyrd
wrote:
> I am not trying to suggest anything here. I'm just asking.
Asking what? Asking something usually involves a question. ;-)
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list
I think I have read somewhere that using Python to develop
web-applications requires some restarting of the Apache server, whereas
PHP does not.
Also, I seem to remember reading something about PHP being able to
recover from Apache restarting more easily than Python.
I am not trying to suggest a
On 11/17/06, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> The default configuration for WinXP is 2GB shared OS, and 2GB
> process... I believe there is some registry setting that can change that
> to 1GB/3GB.
I did some research and it looks like it does apply to XP
(http://support.micro
Jon <[EMAIL PROTECTED]> wrote:
> I wrote some code to read in info from a port using pyserial. the code
> reads info sent by a box that is connected to my computer by an
> rs232-to usb adapter. When I was writing the code and testing it on my
> computer it worked fine.
> I ran py2exe on the pr
> I have been using the string.replace(from_string, to_string, len(string))
> to replace names in a file with their IP address.
> For example, I have definitions file, that looks something like:
> 10.1.3.4 LANDING_GEAR
> 20.11.222.4 ALTIMETER_100
> 172.18.50.138 SIB
> 172.18.50.138 LAPTOP
>
1 - 100 of 179 matches
Mail list logo