Heiko Wundram wrote:
> Heiko Wundram wrote:
>
>>..., unless I convince the
>>people at my univ to _release_ the code I've written under a
>>GPL-compatible open source license itself.
>
>
> The can of worms in this is basically that management at my uni doesn't want
> employees to take the softwa
jeremito wrote:
> I have written a simple C++ program in my efforts to learn how to
> extend Python. It is shown below. Everything compiles and installs
> correctly, but I get strange answers. I know the function "Pi" is
> correct because when I call it from a C++ code it gives the correct
> ans
Well what do you know, that worked! It's one of those errors that you
can't see yourself, but someone else can see it instantly.
Thanks,
Jeremy
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 4 Jan 2006 [EMAIL PROTECTED] wrote:
> I think python is broken here-- why aren't lists hashable, or why isn't
> there a straightforward way to make memoised() work?
a = [1, 2, 3]
d = {a: "foo"}
a[0] = 0
print d[a]
I feel your pain, but i don't think lists (and mutable objects generally)
KraftDiner wrote:
> I was under the assumption that everything in python was a refrence...
>
> so if I code this:
> lst = [1,2,3]
> for i in lst:
>if i==2:
> i = 4
> print lst
>
> I though the contents of lst would be modified.. (After reading that
> 'everything' is a refrence.)
> so it
rodmc wrote:
> I am looking for a 2D data visualisation or graphics library for
> Python. Can anyone point me in the right direction?
>
>
> Thanks in advance,
>
> rod
http://www.mps.mpg.de/dislin/
(Scientific Plotting Software)
Gerard
--
http://mail.python.org/mailman/listinfo/python-list
Cameron Laird wrote:
> This thread confuses me.
>
> I've lost track of the real goal. If it's an exact calculation of
> binomial coefficients--or even one of several other potential
> targets mentioned--I echo Steven D'Aprano, and ask, are you *sure*
> the suggestions already offered aren't adequ
> Oh, yeah, that's undoubtedly true. What I was referring to were things
> such as using [] for generic, that doesn't exist in current CPython
> does it?
I'm not en expert on the subject, but I guess that any language
implementation running on .Net should be able to at least "understand"
generics
Hi,
I must be going nutty, but I can't seem to find anywhere where I can
get just the binaries for, say, 2.3.5 for win32. I've googled high and
low and all I come up with is installer (MSI/EXE) binaries and the
source code. They have to be somewhere. I cant be the only person
that doesn't want
Stephen Kellett wrote:
> In message <[EMAIL PROTECTED]>,
>
> Sverker Nilsson <[EMAIL PROTECTED]> writes
>
[Note that actually it was Hermann Maier that wrote the following
but as quoted, it may look like it was I that wrote it.]
> >> i need to find out the memory usage of a specific function th
"Raven" <[EMAIL PROTECTED]> writes:
> The problem with Stirling's approximation is that I need to calculate
> the hypergeometric hence the factorial for numbers within a large range
> e.g. choose(14000,170) or choose(5,2)
Stirling's approximation to second order is fairly accurate even at
low valu
Hi Peter,
> Riko, any chance you could post the final code and a bit more detail on
> exactly how much Psyco contributed to the speedup? The former would be
> educational for all of us, while I'm personally very curious about the
> latter because my limited attempts to use Psyco in the past ha
[EMAIL PROTECTED] wrote:
> Hi,
>
> I must be going nutty, but I can't seem to find anywhere where I can
> get just the binaries for, say, 2.3.5 for win32. I've googled high and
> low and all I come up with is installer (MSI/EXE) binaries and the
> source code. They have to be somewhere. I cant
import socket, threading, time, binascii, struct
from Configure import Debug
thanks to all, here's my final code that works, if it helps anyone
import socket, threading, time, binascii, struct
from Configure import Debug
ZERO = chr(0)
class Udp:
def __init__(self, my_address, destination_a
[EMAIL PROTECTED] writes:
> Hi,
>
> I must be going nutty, but I can't seem to find anywhere where I can
> get just the binaries for, say, 2.3.5 for win32. I've googled high and
> low and all I come up with is installer (MSI/EXE) binaries and the
> source code. They have to be somewhere. I cant
Claudio Grondi wrote:
> [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > I must be going nutty, but I can't seem to find anywhere where I can
> > get just the binaries for, say, 2.3.5 for win32. I've googled high and
> > low and all I come up with is installer (MSI/EXE) binaries and the
> > source code.
On Wed, 04 Jan 2006 21:53:32 +1100, Tim Churches wrote:
>> Firstly, perhaps you could use a mail/news client that correctly limits
>> lines to (say) 72 characters, that would make it a lot easier to read your
>> comments.
>
> Sorry, was using the Optus webmail client which does not do line
> wrap
[EMAIL PROTECTED] writes:
> class HashableList(list):
> def __hash__(self):
> return 0
This will suck for performance if you put a lot of lists in the same
dictionary. Faster is:
class FastHashableList(list):
def __hash__(self):
return id(self)
> I think python is broken
[EMAIL PROTECTED] wrote]
> So, I give. Can someone point me to somewhere where there is a pile of
> Python 2.3 EXE and DLLs that I can happily dump somewhere on my system
> without having to install?
ftp://ftp.activestate.com/ActivePython/windows/2.3/ActivePython-2.3.5-236-win32-ix86.zip
> In
On Wed, 04 Jan 2006 13:18:32 +0100, Riko Wichmann wrote:
> hi everyone,
>
> I'm googeling since some time, but can't find an answer - maybe because
> the answer is 'No!'.
>
> Can I call a function in python inline, so that the python byte compiler
> does actually call the function, but sort of
Riko Wichmann wrote:
> the difference between running with and without psyco is about a factor
> 3 for my MC simulation.
> A factor 3 I consider worthwhile, especially since it doesn't really
> cost you much.
Definitely. "import psyco; psyco.full()" is pretty hard to argue
against. :-)
> Th
I assume your talking about building a new dictionary with the key and
value pair switched. I have seen no built in function to do this but I
have found a way to create another dictionary that is the inverse of
the first.
for example you have designed a dictionary such as
a={}
a['one']=1
a['two'
Phillip J. Eby wrote:
> Paul Boddie wrote:
> > Could anyone enlighten me/us as to why the Smart Package Manager [1]
> > (written in Python, presented at EuroPython this year) isn't being more
> > closely investigated as part of a suitable solution?
>
> More closely investigated by whom, as a soluti
On Wed, 04 Jan 2006 10:54:17 -0800, KraftDiner wrote:
> I was under the assumption that everything in python was a refrence...
>
> so if I code this:
> lst = [1,2,3]
> for i in lst:
>if i==2:
> i = 4
> print lst
>
> I though the contents of lst would be modified.. (After reading that
>
Grant Edwards <[EMAIL PROTECTED]> writes:
>> Of course, in cases where it matters (i.e. - I provide public
>> access to my legally purchased copy of the Brittanica, or some
>> such), copyrights on things other than the program come into
>> play. Possibly multiple copyrights.
> Huh?
As you pointed
On Wed, 04 Jan 2006 20:05:38 +0100, Christian Tismer wrote:
> KraftDiner wrote:
>> I was under the assumption that everything in python was a refrence...
>
> This is true.
No it is not.
>> so if I code this:
>> lst = [1,2,3]
>
> lst is a reference to a list that holds references to 1, 2, and 3
Here is it:
---
class Human:
def __init__(self, eye_one, eye_two):
self.eye_one = eye_one
self.eye_two = eye_two
class Population:
def __init__(self):
self.house = []
for i in range(0, POPULATION_COUNT):
self.house.append(Human(s
Ernst Noch <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>> In my case, I get paid for building custom applications. If I use
>> GPL'ed software, I'm required to give my client the software under the
>> GPL (or, as you point out, a GPL-compatible license). I never bother -
>> I hand them a tarbal
"Raymond Hettinger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> [EMAIL PROTECTED] wrote:
> > izip's uses can be partitioned two ways:
> > 1. All iterables have equal lengths
> > 2. Iterables have different lengths.
> >
> > Case 1 is no problem obviously.
> > In Case 2 there are t
Thomas Heller wrote:
> [EMAIL PROTECTED] writes:
>
>
>>Hi,
>>
>>I must be going nutty, but I can't seem to find anywhere where I can
>>get just the binaries for, say, 2.3.5 for win32. I've googled high and
>>low and all I come up with is installer (MSI/EXE) binaries and the
>>source code. They
Karlo Lozovina said unto the world upon 04/01/06 04:19 PM:
> Here is it:
>
> ---
> class Human:
> def __init__(self, eye_one, eye_two):
> self.eye_one = eye_one
> self.eye_two = eye_two
>
> class Population:
> def __init__(self):
> self.house = []
>
Karlo Lozovina wrote:
> Here is it:
>
> class Population:
> def __init__(self):
> self.house = []
> for i in range(0, POPULATION_COUNT):
> self.house.append(Human(self.GenerateRandomColour(),
> self.GenerateRandomColour()))
>
>
I haven't examined the code very well, but generally I don't suggest to
use exceptions inside tight loops that that have to go fast.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
"Gerard Flanagan" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Class methods must have at least the 'self' argument. So
Argh! :)
Thanks guys!
--
___Karlo Lozovina - Mosor
| | |.-.-. web: http://www.mosor.net || ICQ#: 1
Steven D'Aprano wrote:
> On Wed, 04 Jan 2006 10:54:17 -0800, KraftDiner wrote:
>
>
>>I was under the assumption that everything in python was a refrence...
>>
>>so if I code this:
>>lst = [1,2,3]
>>for i in lst:
>> if i==2:
>> i = 4
>>print lst
>>
>>I though the contents of lst would be mo
[EMAIL PROTECTED] writes:
> Yeah, I guess that is one route to go down. It just seems, I don't
> know, hacky. I will try it though, if I can't find the binaries online
> by themselves. I don't think it's a question of being "hard to do"
> using the method you suggested, I just find it really odd
crc <[EMAIL PROTECTED]> writes:
> I assume your talking about building a new dictionary with the key and
> value pair switched. I have seen no built in function to do this but I
> have found a way to create another dictionary that is the inverse of
> the first.
Note that you can't reliable "revers
> I don't understand this. Why do you need look ahead?
Just before I posted, I got it (I think) but didn't want to
rewrite everything. The need for unget() (or peek(), etc)
is to fix the thrown-away-data problem in izip(), right?
As an easier alternative, what about leaving izip() alone
and si
Steven D'Aprano wrote:
> Python does not have references or pointers, except internally where
> Python coders can not get to them. It has names and objects. Keep thinking
> about "call by reference" and you just confuse yourself and others. Think
> about names and objects and it is simple and strai
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> On Wed, 04 Jan 2006 10:54:17 -0800, KraftDiner wrote:
>> I was under the assumption that everything in python was a refrence...
>> so if I code this:
>> lst = [1,2,3]
>> for i in lst:
>>if i==2:
>> i = 4
>> print lst
>> I though the contents o
[EMAIL PROTECTED] wrote:
> John J. Lee schrieb:
> >
> > I guess this is 'rendering' in a more general/abstract sense than
> > 'graphical rendering'.
>
> Exactly. In these case rendering means that you traverse a tree with
> widget objects and every is "rendered" to a text representation of
> itself
Paul Rubin wrote:
> What do you think of my suggestion of passing an optional arg to the
> StopIteration constructor, that the caller can use to resume the
> iterator or take other suitable recovery steps? Maybe this could
> interact with PEP 343 in some useful way.
Probably unworkable. Complex
Peter Hansen <[EMAIL PROTECTED]> writes:
> Steven D'Aprano wrote:
>> Python does not have references or pointers, except internally where
>> Python coders can not get to them. It has names and objects. Keep thinking
>> about "call by reference" and you just confuse yourself and others. Think
>> ab
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
> On Wed, 04 Jan 2006 21:53:32 +1100, Tim Churches wrote:
>
> >> Secondly, perhaps you should consider that dynamically linking to a
> >> work is creating a derivative work, which most certainly falls under
> >> the "modification" clause.
>
> [snip]
>
ankit wrote:
> Hi,
> I am working with libxml2dom package for having DOM support with
> libxml2.
> There are some test examples are given along with the package but when
> I try to run that, it gives me following error:
[...]
> File
> "/usr/lib/python2.2/site-packages/libxml2dom/macrolib/macro
[EMAIL PROTECTED] wrote:
[snip..]
>
> So, I give. Can someone point me to somewhere where there is a pile of
> Python 2.3 EXE and DLLs that I can happily dump somewhere on my system
> without having to install? In case it matters, this is for a WAMP-like
> project I'm developing that includes a w
Hi,
I am learning how to use the smtplib module, but am having some very
early problems, maybe because I don't understand it.
So, am I correct that by following the example in the Python:
>>> import smtplib
>>> server = smtplib.SMTP('localhost')
>>> server.sendmail('[EMAIL PROTECTED]', '[EMAIL PR
You've received good answers to your original question. Just a side
issue...
On Wed, 4 Jan 2006 22:19:27 + (UTC) in comp.lang.python, Karlo
Lozovina <[EMAIL PROTECTED]> wrote:
[...]
>def GenerateRandomColour():
>rn.seed()
>colour = rn.choice(['C', 'P', 'Z'])
>retu
Steven D'Aprano wrote:
> On Wed, 04 Jan 2006 10:54:17 -0800, KraftDiner wrote:
>>I though the contents of lst would be modified.. (After reading that
>>'everything' is a refrence.)
>
> See, this confusion is precisely why I get the urge to slap people who
> describe Python as "call by reference"
In article <[EMAIL PROTECTED]>,
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> See what confusing, complicated hoops people have to jump through to
> hammer the round peg of Python's behaviour into the square peg of "call by
> reference"?
>
> http://effbot.org/zone/call-by-object.htm
>
> Python d
Tim Churches wrote:
>
> The key verb is "containing", and I'm sorry, but "link" (or "reference" or
> "call" or whatever other verb could reasonably used to describe
> dynamic run-time linking) does not mean the same as "contain".
What's interesting with respect to distribution of works (of course,
Hey, I'm trying my hand and pyparsing a log file (named l.log):
FIRSTLINE
PROPERTY1 DATA1
PROPERTY2 DATA2
PROPERTYS LIST
ID1 data1
ID2 data2
ID1 data11
ID2 data12
SECTION
So I wrote up a small bit of code (named p.py):
from pyparsing im
Hi
In one of the data files that I have , I am seeing these characters
\xed\xa0\xa0 . They seem to break the xsl.
---
Extra content at the end of the document
XML/XSL Error:
Claudio Grondi wrote:
[snip]
>> See, this confusion is precisely why I get the urge to slap people who
>> describe Python as "call by reference". It isn't.
>>
>> It isn't "call by value" either -- Python never copies objects unless you
>> explicitly tell it to.
>>
>> It is "call by object" -- you
Peter Hansen wrote:
> Steven D'Aprano wrote:
>
>> Python does not have references or pointers, except internally where
>> Python coders can not get to them. It has names and objects. Keep
>> thinking
>> about "call by reference" and you just confuse yourself and others. Think
>> about names and
I should mention that I'm on Windows XP.
--
http://mail.python.org/mailman/listinfo/python-list
Dave Hansen <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> I'm not sure what rn is, but it looks like a standard library
> random.Random object. If so, I don't think you want to seed your PRNG
> each time you use it -- your numbers might be much less random that
> way. If it is the stan
Luis M. González wrote:
> I'm not en expert on the subject, but I guess that any language
> implementation running on .Net should be able to at least "understand"
> generics or any other feature available on this framework, because
> languages are supposed to interact and use all kinds of classes a
On 3 Jan 2006 20:09:34 -0800, [EMAIL PROTECTED] (Aahz) wrote:
>Unfortunately, this isn't quite true. Medicine and law both require the
>passing of an apprenticeship, so there's still some room for favoritism
>and blackballing.
In the UK, in Medicine, House Officer jobs pretty much match the
qual
Hi everybody,
Im newbie to Python (I found it three weeks ago) , in fact Im newbie to
programming. I'm being reading and training with the language, but I
still wondering about what Classes are used to. Could you please give
me some examples??
Thanks.
--
http://mail.python.org/mailman/listinfo/
fuzzylollipop wrote:
> there are lots of things you can't do or can't do easily or can't do at
> efficiently in Apache using python as cgi or as anyone would more
> likely assume mod_python. anything that requires any shared state or
> shared resources in Apache is next to impossible. Doing similar
On 4 Jan 2006 12:46:47 -0800, "Raven" <[EMAIL PROTECTED]> wrote:
>Cameron Laird wrote:
>
>> This thread confuses me.
>>
>> I've lost track of the real goal. If it's an exact calculation of
>> binomial coefficients--or even one of several other potential
>> targets mentioned--I echo Steven D'Apran
Try this.
http://www.ibiblio.org/g2swap/byteofpython/read/oops.html
Best thing is to do a little reading, then wait until you have a
problem or a project that would provide the occasion to create your
first class. Then try it, and if it doesn't work, post it here with (1)
what you were trying to
Thanks, I'll do that.
--
http://mail.python.org/mailman/listinfo/python-list
this has me puzzled; I've created a small test app to show the problem
I'm having.
I want to use subprocess to execute system commands from inside a
Tkinter app running under Cygwin.
When I open a python interpreter and run my subprocess command, all is
well. But when I run the same command from
Mike Meyer wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>
>>On Wed, 04 Jan 2006 10:54:17 -0800, KraftDiner wrote:
>>
>>>I was under the assumption that everything in python was a refrence...
>>>so if I code this:
>>>lst = [1,2,3]
>>>for i in lst:
>>> if i==2:
>>> i = 4
>>>print lst
Sakcee wrote:
> Hi
>
> In one of the data files that I have , I am seeing these characters
> \xed\xa0\xa0 . They seem to break the xsl.
[...]
> is this a unicode utf-16 surrogate pair ?
Yes and no. This is the UTF-8 encoding of U+D820, which is a high
surrogate code point. So yes. It's not yet a
Mike Meyer wrote:
> Peter Hansen <[EMAIL PROTECTED]> writes:
>
>
>>Steven D'Aprano wrote:
>>
>>>Python does not have references or pointers, except internally where
>>>Python coders can not get to them. It has names and objects. Keep thinking
>>>about "call by reference" and you just confuse you
In article <[EMAIL PROTECTED]>,
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
>Nonsense. What is stored in the list is an object. Python doesn't have
>pointers. You are confusing the underlying C implementation, which
>implements lists as an array of pointers, with the high-level Python
>code, whi
"the.theorist" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hey, I'm trying my hand and pyparsing a log file (named l.log):
> FIRSTLINE
>
> PROPERTY1 DATA1
> PROPERTY2 DATA2
>
> PROPERTYS LIST
> ID1 data1
> ID2 data2
>
> ID1 data11
>
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>>>On Wed, 04 Jan 2006 10:54:17 -0800, KraftDiner wrote:
I was under the assumption that everything in python was a refrence...
so if I code this:
lst = [1,2,3]
for i in ls
KraftDiner wrote:
> I was under the assumption that everything in python was a refrence...
For a good writeup on the 'name-binding' behavior others are talking about:
http://starship.python.net/crew/mwh/hacks/objectthink.html
Cheers,
Shalabh
--
http://mail.python.org/mailman/listinfo/python-li
I am a new bie of Python. I knew there is module for syslog of Linux,
but I want to create a syslog server on the windows server like windows
2k or 2k3, to collect the log message sent from our firewall. Any one
has any idea about this? Many thanks.
Jason Liu
--
http://mail.python.org/mailman/li
On Wed, 04 Jan 2006 10:54:17 -0800, KraftDiner wrote:
> I was under the assumption that everything in python was a refrence...
>
> so if I code this:
> lst = [1,2,3]
> for i in lst:
>if i==2:
> i = 4
> print lst
>
> I though the contents of lst would be modified.. (After reading that
>
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>> Peter Hansen <[EMAIL PROTECTED]> writes:
>>>Steven D'Aprano wrote:
Python does not have references or pointers, except internally where
Python coders can not get to them. It has names and objects. Keep thinking
about "ca
Looks like the fundamental error was in my understanding.
Boy, do I feel sheepish. Yes, what I wanted were Literals.
That clarifies things greatly. Thank you.
Also, I went browsing around further, and found on O'reilly's CodeZoo:
Most of the methods in the pyparsing module are very easy to figure
Sorry, got a bit of formatting wrong. Messed up what I was really
trying to point out.
container_tag << Group(open_tag + OneOrMore(container_tag | content)
# ^name^recursive reference
--
http://mail.python.org/mailman/listinfo/python-list
Boy, do I feel sheepish. Yes, what I wanted were Literals. That
clarifies things greatly. Thank you.
Also, I went browsing around further, and found on O'reilly's CodeZoo:
Most of the methods in the pyparsing module are very easy to figure
out. Forward() might not be as obvious. To get going with
I'm trying to log into a secure IMAP4 server using imaplib,
and I'm getting a strange error. If I do the following (name
of mail server x'ed out in example):
>>> import imaplib
>>> m = imaplib.IMAP4_SSL("mail.xxx.xxx")
I get:
Traceback (most recent call last):
File "", line 1, in ?
File "
> Faster is:
>
>class FastHashableList(list):
> def __hash__(self):
> return id(self)
But that's wrong. Two equal objects must hash to the same value, and
you're not guaranteeing that at all. My degenerate __hash__ does
guarantee that, and I still claim the performance impact from
collision
[EMAIL PROTECTED] writes:
> Alright, so I've been following some of the arguments about enhancing
> parallelism in python, and I've kind of been struck by how hard things
> still are. It seems like what we really need is a more pythonic
> approach.
I certainly agree, and have thought about it som
Steven D'Aprano wrote:
> Mike Meyer wrote:
[...]
>> Correct. What's stored in a list is a reference.
>
> Nonsense. What is stored in the list is an object.
According to the Python Language Reference:
Some objects contain references to other objects; these are
called containers. Example
Mike Meyer wrote:
> Steven D'Aprano writes:
[...]
>>Because the Original Poster said so! He said, to paraphrase, "Hey, I
>>thought Python was call by reference, but I tried this, and it didn't
>>work, what gives???"
>
>
> And he's right, and you're wrong. Look at the *code*. There isn't a
> singl
i tried to encode tamil font in python using unicode but i couldn't.Can u help me in encoding it.ex: >>> u'have \u0061 nice day' u'have a nice day'--
\u0061 - a
Hello, Group:
Is there an easy way to automate the processing of adding the following
numbers in two lines?
test test test description (100-10-0, 6700 test)
test test test description (100-10-0, 6350 test)
I'd like to be able run a script on the file above to produce the
following
Quoth Steven D'Aprano <[EMAIL PROTECTED]>:
| Mike Meyer wrote:
[... dragging out his own terminology hangup ]
|> Except this doesn't have *anything at all* to do with python being (or
|> not being) call by reference. This is a confusion about name binding
|> vs. assignment to a variable. The proper
"Szabolcs Nagy" <[EMAIL PROTECTED]> writes:
> Hello
> Thanks for trypython, it's a cool idea
Thank you.
> I got TryPythonError after an IdentationError and i could not get rid
> of it (other than refreshing the page):
>
> Python 2.4.2 (#3, Dec 16 2005, 23:54:20)
> [GCC 2.95.4 20020320 [FreeBSD]]
Roedy Green <[EMAIL PROTECTED]> wrote:
>On 2 Jan 2006 13:16:26 -0800, "Xah Lee" <[EMAIL PROTECTED]> wrote, quoted
>or indirectly quoted someone who said :
>
>>When a software is ostensibly incorrect, and if it is likely in
>>connection to egregious irresponsibility as most software companies are
>
Roy Smith wrote:
> LOL, and you'll be LOL too when you see the problem :-)
>
> You can't give the re.I flag to reCompiled.match(). You have to give
> it to re.compile(). The second argument to reCompiled.match() is the
> position where to start searching. I'm guessing re.I is defined as 2,
> wh
Is it possible for an imported module to find its own location?
--
Programmers should realize their critical importance and responsibility in a
world gone digital. They are in many ways similar to the priests and monks of
Europe's Dark Ages; they are the only ones with the training and insight
to
thanks very much for the info, it really helped
we are using the text from file to display on webpage and we have a
method for conversion the parsed data to utf-8 and then displaying, all
the data looks fine after parsing except the
surrogate pair,
since i can not guess what it was supposed to be
[EMAIL PROTECTED] writes:
>> Faster is:
>>class FastHashableList(list):
>> def __hash__(self):
>> return id(self)
> But that's wrong.
You're right - I should have fixed equality while I was at it. The
results may not be what you had in mind, but it's a perfectly
reasonable use case.
>> The
Hi everyone, I'm planning using python with asp, and wonder if some
people do use python/asp in real life projects. (I'm going to)
cheers,
===
kychan
--
http://mail.python.org/mailman/listinfo/python-list
2006/1/5, Thomas Dybdahl Ahle <[EMAIL PROTECTED]>:
> Is it possible for an imported module to find its own location?
you can access __file__(missing for built-in modules) or __path__(used
for a package) attribute to find a module's location.
--
I like python!
My Blog: http://www.donews.net/limodo
Mike Meyer wrote:
> [Rest elided]
>
> This really has a lot in common with SCOOP. SCOOP makes concurrent
> stuff easier, but i'm not sure it fits well with Python. I'll describe
> it, on the off chance you may get some ideas from it. See http://archive.eiffel.com/doc/manuals/technology/concurren
On 4 Jan 2006 15:20:43 -0800, "Raymond Hettinger" <[EMAIL PROTECTED]> wrote:
>Paul Rubin wrote:
>> What do you think of my suggestion of passing an optional arg to the
>> StopIteration constructor, that the caller can use to resume the
>> iterator or take other suitable recovery steps? Maybe this
Corey Coughlin <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>> Calls to methods of a separate object are non-blocking. The calls are
>> queued, and executed later. Reading an attribute from a separate
>> object is a blocking action. Calling a method with a separate object
>> as an argument caus
101 - 197 of 197 matches
Mail list logo