Re: Very strange issues with collections.Mapping

2018-01-19 Thread John Krukoff via Python-list
Have you ruled out the possibility that collections.Mapping has been (perhaps temporarily) assigned to something else? On Thu, Jan 18, 2018 at 2:37 PM, Jason Swails wrote: > Hello! > > I am running into a very perplexing issue that is very rare, but creeps up > and is

Re: [ANN]VTD-XML 2.9

2010-08-20 Thread John Krukoff
is it on the python-announce list? -- John Krukoff Land Title Guarantee Company jkruk...@ltgc.com -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

Re: [ANN]VTD-XML 2.9

2010-08-20 Thread John Krukoff
is it on the python-announce list? -- John Krukoff Land Title Guarantee Company jkruk...@ltgc.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Best Pythonic Approach to Annotation/Metadata?

2010-07-15 Thread John Krukoff
for development. -- John Krukoff jkruk...@ltgc.com Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Pretty printing with ElementTree

2010-07-09 Thread John Krukoff
from the element tree documentation may do what you want: http://effbot.org/zone/element-lib.htm#prettyprint -- John Krukoff jkruk...@ltgc.com Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: is not operator?

2010-07-08 Thread John Krukoff
want: http://docs.python.org/reference/expressions.html#notin -- John Krukoff jkruk...@ltgc.com Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Queue peek?

2010-03-02 Thread John Krukoff
they are. snip This is one of those places where the GIL is a good thing, and makes your life simpler. You could consider it that the interpreter does the locking for you for such primitive operations, if you like. -- John Krukoff jkruk...@ltgc.com Land Title Guarantee Company -- http://mail.python.org

Re: Overcoming python performance penalty for multicore CPU

2010-02-08 Thread John Krukoff
, it's easy to integrate BeautifulSoup as a slow backup for when things go really wrong (as J Kenneth King mentioned earlier): http://codespeak.net/lxml/lxmlhtml.html#parsing-html At least in my experience, I haven't actually had to parse anything that lxml couldn't handle yet, however. -- John

Re: Best library to make XSLT 2.0 transformation

2009-05-19 Thread John Krukoff
library available, being built on libxml2 means that it only supports XSLT 1.0. As far as I know, if you want 2.0 support, you still need to be using one of the Java XSLT processors. -- John Krukoff jkruk...@ltgc.com Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python

Re: Why can function definitions only use identifiers, and not attribute references or any other primaries?

2009-04-23 Thread John Krukoff
statements and expressions in python: http://www.artima.com/weblogs/viewpost.jsp?thread=147358 -- John Krukoff jkruk...@ltgc.com Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN]: circuits-1.0b1 released!

2008-12-30 Thread John Krukoff
). Are these actually similar or am I missing something important that differentiates circuits? -- John Krukoff jkruk...@ltgc.com Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Class instantiation fails when passed in a file but work via line by line interpreter

2008-11-18 Thread John Krukoff
: type object 'os' has no attribute 'doesnotexist' -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5: wrong number of arguments given in TypeError for function argument aggregation (dictionary input vs the norm)

2008-10-30 Thread John Krukoff
keyword arguments? I seem to remember seeing a note about keyword only arguments recently... -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Event-driven framework (other than Twisted)?

2008-10-01 Thread John Krukoff
/mailman/listinfo/python-list -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: python/xpath question..

2008-09-03 Thread John Krukoff
would recommend the O'Reilly XSLT book, it has an excellent introduction to xpath in chapter 3. -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: pickle passing client/server design

2008-08-22 Thread John Krukoff
there would be a need to have a semaphore, and some ACK or NACK that the server process got the whole pickle. -- http://mail.python.org/mailman/listinfo/python-list Quick bit of advice, don't reinvent the wheel, use PYRO: http://pyro.sourceforge.net/index.html -- John Krukoff [EMAIL PROTECTED

Re: iterparse and unicode

2008-08-20 Thread John Krukoff
to be more accepting of unicode than iterparse, though it requires a different parsing interface: http://codespeak.net/lxml/parsing.html#the-target-parser-interface -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Create a process with a time to live

2008-08-15 Thread John Krukoff
, copyright, credits or license for more information. import signal signal.alarm( 1 ) 0 Alarm clock (Interpreter exits) -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Digitally sign PDF files

2008-08-15 Thread John Krukoff
, there are also these python bindings available: http://pyxmlsec.labs.libre-entreprise.org/index.php?section=examples -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Replace Several Items

2008-08-13 Thread John Krukoff
in the benchmarks, though. It's worth noting that the interface for translate is quite different for unicode strings. -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Psycho question

2008-08-08 Thread John Krukoff
compatible version of psyco, either. -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Best practise implementation for equal by value objects

2008-08-06 Thread John Krukoff
Are you really sure this is what you want to do, and that a less tricky serialization format such as that provided by the pickle module wouldn't work for you? -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: when does the GIL really block?

2008-08-01 Thread John Krukoff
mentioning that the most common place for the python interpreter to release the GIL is during I/O, which printing a number to the screen certainly counts as. You might try again with a set of loops that only increment, and don't print, and you may more obviously see the GIL in action. -- John Krukoff [EMAIL

Re: seemingly simple list indexing problem

2008-07-30 Thread John Krukoff
On Wed, 2008-07-30 at 12:06 -0700, Tobiah wrote: On Mon, 28 Jul 2008 23:41:51 -0700, iu2 wrote: On Jul 29, 3:59 am, John Machin [EMAIL PROTECTED] wrote: On Jul 29, 8:10 am, John Krukoff [EMAIL PROTECTED] wrote: On Mon, 2008-07-28 at 16:24 -0500, Ervan Ensis wrote: My

Re: seemingly simple list indexing problem

2008-07-30 Thread John Krukoff
)), key=sorted(range(len(s)), key=s.__getitem__).__getitem__) [2, 0, 1] Wolfram -- http://mail.python.org/mailman/listinfo/python-list Thanks, I knew I was missing something simpler. -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo

Re: seemingly simple list indexing problem

2008-07-28 Thread John Krukoff
free index slot of the available choices. -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: seemingly simple list indexing problem

2008-07-28 Thread John Krukoff
) in enumerate( sorted( decorated ) ): ... result[ originalIndex ] = sortedIndex ... result [2, 0, 1] -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: seemingly simple list indexing problem

2008-07-28 Thread John Krukoff
for this though, as now that you mention it I can't think of a use case outside of a homework assignment. -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: seemingly simple list indexing problem

2008-07-28 Thread John Krukoff
On Mon, 2008-07-28 at 16:00 -0700, iu2 wrote: On Jul 29, 12:10 am, John Krukoff [EMAIL PROTECTED] wrote: On Mon, 2008-07-28 at 16:24 -0500, Ervan Ensis wrote: My programming skills are pretty rusty and I'm just learning Python so this problem is giving me trouble. I have a list like

Re: Question by someone coming from C...

2008-06-10 Thread John Krukoff
On Wed, 2008-06-11 at 00:43 +0200, Christian Heimes wrote: John Krukoff wrote: Since you probably want access to these from many different places in your code, I find the simplest way is to create a logging module of your own (not called logging, obviously) and instantiate all of your

Re: Question by someone coming from C...

2008-06-09 Thread John Krukoff
of loggers. -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

RE: no inputstream?

2008-05-15 Thread John Krukoff
the part of the file it needs (which if the tag happens to be v1, will be the whole file). I'd love to know how Java handles all that automatically through a generic stream interface, though. -- John Krukoff [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: no inputstream?

2008-05-15 Thread John Krukoff
to find a different library that supports arbitrary file objects instead of only file paths. I'd suggest starting here: http://pypi.python.org/pypi?%3Aaction=searchterm=id3submit=search Possibly one with actual documentation, since that would also be a step up from mutagen. -- John Krukoff [EMAIL

Re: no inputstream?

2008-05-15 Thread John Krukoff
On Thu, 2008-05-15 at 17:11 -0600, John Krukoff wrote: On Thu, 2008-05-15 at 15:35 -0700, max wrote: On May 15, 6:18 pm, MRAB [EMAIL PROTECTED] wrote: On May 15, 9:00 pm, max [EMAIL PROTECTED] wrote: you're right, my java implementation does indeed parse for Id3v2 (sorry

Re: no inputstream?

2008-05-15 Thread John Krukoff
On Thu, 2008-05-15 at 17:32 -0600, John Krukoff wrote: On Thu, 2008-05-15 at 17:11 -0600, John Krukoff wrote: On Thu, 2008-05-15 at 15:35 -0700, max wrote: On May 15, 6:18 pm, MRAB [EMAIL PROTECTED] wrote: On May 15, 9:00 pm, max [EMAIL PROTECTED] wrote: you're right, my java

Re: no inputstream?

2008-05-15 Thread John Krukoff
On Thu, 2008-05-15 at 17:42 -0600, John Krukoff wrote: On Thu, 2008-05-15 at 17:32 -0600, John Krukoff wrote: On Thu, 2008-05-15 at 17:11 -0600, John Krukoff wrote: On Thu, 2008-05-15 at 15:35 -0700, max wrote: On May 15, 6:18 pm, MRAB [EMAIL PROTECTED] wrote: On May 15, 9:00 pm

Re: i want to add a timeout to my code

2008-04-29 Thread John Krukoff
out was that in the line signal.signal(signal.SIGSLRM, handler), an attributeError appeared reading that 'module' object has no attribute 'SIGALRM' -- http://mail.python.org/mailman/listinfo/python-list Are you writing your program on windows, or some other platform which is not unix? -- John

RE: convert xhtml back to html

2008-04-24 Thread John Krukoff
always seems to work out badly in the end for me. - John Krukoff [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

[issue643841] New class special method lookup change

2008-04-22 Thread John Krukoff
John Krukoff [EMAIL PROTECTED] added the comment: I've been following the py3k maliing list disscussion for this issue, and wanted to add a note about the proposed solution described here: http://mail.python.org/pipermail/python-3000/2008-April/013004.html The reason I think this approach

Re: Recurring patterns: Am I missing it, or can we get these added to the language?

2008-04-15 Thread John Krukoff
the function that does what you want to do. -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Recurring patterns: Am I missing it, or can we get these added to the language?

2008-04-15 Thread John Krukoff
matching the default split parameters kind of pointless, as why bother doing all this work to return a 0 item list in the default maxsplit = None case. -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a tuple to a list

2008-04-08 Thread John Krukoff
, 4 ), ( 5, 6 ) ) list( itertools.chain( *t ) ) [1, 2, 3, 4, 5, 6] Though the list part is probably unnecessary for most uses. The problem gets interesting when you want to recursively flatten an iterable of arbitratrily deeply nested iterables. -- John Krukoff [EMAIL PROTECTED] Land Title

[issue643841] New class special method lookup change

2008-04-01 Thread John Krukoff
John Krukoff [EMAIL PROTECTED] added the comment: I assume when you say that the documentation has already been updated, you mean something other than what's shown at: http://docs.python.org/dev/reference/datamodel.html#new-style-and- classic-classes or http://docs.python.org/dev/3.0/reference

[issue643841] New class special method lookup change

2008-03-28 Thread John Krukoff
John Krukoff [EMAIL PROTECTED] added the comment: I was just bit by this today in converting a proxy class from old style to new style. The official documentation was of no help in discoverting that neither __getattr__ or __getattribute__ are used to look up magic attribute names. Even the link

Re: Does __import__ require a module to have a .py suffix?

2008-03-12 Thread John Krukoff
) exec compiled in service.__dict__ You could probably shorten it for your needs by using execfile instead. If it's not in the current directory, you'll probably run into some issues with further imports not working as expected unless you set the names/paths right. -- John Krukoff [EMAIL PROTECTED

RE: GC performance with lists

2007-09-04 Thread John Krukoff
the massive allocation burden. - John Krukoff [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: 'Advanced' list comprehension? query

2007-08-08 Thread John Krukoff
by breaking the 'noShow in listItem' test out into a separate function, and does have the advantage that by using itertools.ifilter this is a lazy approach. There's got to be a better way to do the test to see if takewhile bailed early than using len, though. - John Krukoff [EMAIL PROTECTED

RE: 'Advanced' list comprehension? query

2007-08-08 Thread John Krukoff
John Krukoff wrote: [EMAIL PROTECTED] wrote: Hi, I'm playing around with list comprehension, and I'm trying to find the most aesthetic way to do the following: I have two lists: noShowList = ['one', 'two', 'three'] myList = ['item one', 'item four', 'three item'] I want

RE: Reading multiline values using ConfigParser

2007-06-21 Thread John Krukoff
-Original Message- From: [EMAIL PROTECTED] [mailto:python- [EMAIL PROTECTED] On Behalf Of Phoe6 Sent: Wednesday, June 20, 2007 8:51 PM To: python-list@python.org Subject: Re: Reading multiline values using ConfigParser On Jun 20, 10:35 pm, John Krukoff [EMAIL PROTECTED] wrote

RE: Reading multiline values using ConfigParser

2007-06-20 Thread John Krukoff
whitespace in your value names, I don't think this will work at all. - John Krukoff [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: Questions about mathematical and statistical functionality in Python

2007-06-14 Thread John Krukoff
to use python for whatever it is you need without abandoning R for your mathematical/statistical work. - John Krukoff [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: Accessing global namespace from module

2007-06-11 Thread John Krukoff
-in) plot.AddPlot function AddPlot at 0x0099E830 Hope that helps. - John Krukoff [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

RE: Accessing global namespace from module

2007-06-11 Thread John Krukoff
own module on-the-fly, using the recipe posted earlier by John Krukoff. If there are many functions, try enumerating them all: import sys from types import ModuleType as module plotModule = module('plot') for key,value in globals().items(): if key[:2

RE: Any way to refactor this?

2007-04-13 Thread John Krukoff
= hatch_radius, **kwargs ) As it pulls out the two obviously common components, the function call and the radius parameter. - John Krukoff [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: some OT: how to solve this kind of problem in our program?

2006-12-26 Thread John Krukoff
wonder if loading that much data isn't slower than solving the puzzle. -- John Krukoff [EMAIL PROTECTED] Land Title Guarantee Company -- http://mail.python.org/mailman/listinfo/python-list