> You can only try and search the sys-path for the logging-module, using
>
> sys.prefix
>
> and then look for logging.py. Using
>
> __import__(path)
>
> you get a reference to that module.
>
> Diez
Thank you Diez, that's the info i'd been looking for :-)
So the answer is sys module + __import__
On Mar 5, 1:39 pm, gigs <[EMAIL PROTECTED]> wrote:
> koara wrote:
> > Hello, is there a way to access a module that is hidden because
> > another module (of the same name) is found first?
>
> > More specifically, i have my own logging.py module, and inside thi
Hello, is there a way to access a module that is hidden because
another module (of the same name) is found first?
More specifically, i have my own logging.py module, and inside this
module, depending on how initialization goes, i may want to do 'from
logging import *' from the built-in logging.
Hello all,
i am using the mmap module (python2.4) to access contents of a file.
My question regards the relative performance of mmap.seek() vs
mmap.tell(). I have a generator that returns stuff from the file,
piece by piece. Since other things may happen to the mmap object in
between consecutive
Hello all,
i am using urllib.unquote_plus to unquote a string. Sometimes i get a
strange string like for example "spolu%u017E%E1ci.cz" to unquote. Here
the problem is that some application decided to quote a non-ascii
character as %u directly, instead of using an encoding and quoting
byte per
On Oct 3, 7:22 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> In Py2.6, I will mostly likely put in an automatic promotion to long
> for both enumerate() and count(). It took a while to figure-out how
> to do this without killing the performance for normal cases (ones used
> in real programs,
> At the moment, you have to generate a character class for this yourself,
> e.g.
> ...
Thank you Martin, this is exactly what i wanted to know.
--
http://mail.python.org/mailman/listinfo/python-list
Hello all -- my question regards special meta characters for the re
module. I saw in the re module documentation about the possibility to
abstract to any alphanumeric unicode character with '\w'. However,
there was no info on constructing patterns for other unicode
categories, such as purely alphab
> > I would recommend you to use a database since it meets your
> > requirements (off-memory, fast, persistent). The bsdddb module
> > (berkeley db) even gives you a dictionary like interface.
> >http://www.python.org/doc/lib/module-bsddb.html
>
> Standard SQL databases can work for this, but gener
Hello Steven,
On Jun 10, 5:29 pm, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> > ...
> How do you know it won't fit in main memory if you don't know the
> overhead? A guess? You've tried it and your computer crashed?
exactly
> > Please recommend a module that allows persistent set/dict storage +
What is the best to go about using a large set (or dictionary) that
doesn't fit into main memory? What is Python's (2.5 let's say)
overhead for storing int in the set, and how much for storing int ->
int mapping in the dict?
Please recommend a module that allows persistent set/dict storage +
fast
Hello again John -- your hack/fix seems to work. Thanks a lot, now
let's hope timbot will indeed be here shortly with a proper fix =)
--
http://mail.python.org/mailman/listinfo/python-list
John Machin wrote:
> --test results snip---
> Looks to me like the problem has nothing at all to do with the length
> of the searched strings, but a bug appeared in 2.3. What version(s)
> were you using? Can you reproduce your results (500 & 499 giving
> different answers) with the same version?
Hello, it might be too late or too hot, but i cannot work out this
behaviour of find_longest_match() in difflib.SequenceMatcher:
string1:
releasenotesforwildmagicversion01thiscdromcontainstheinitialreleaseofthesourcecodethataccompaniesthebook"3dgameenginedesign:apracticalapproachtorealtimecomputer
14 matches
Mail list logo