On Sat, Feb 20, 2010 at 9:27 AM, sWrath swrath wrote:
> from xml.dom.minidom import parse
> from xml.etree.ElementTree import*
>
> file1="book.xml"
> tmptree=ElementTree()
> tmptree.parse(file1)
> items=root.getiterator()
>
>
> dom = parse(file1)
>
>
> #Find tag names
> for node in items :
> if
On Sun, Nov 8, 2009 at 11:15 AM, Wells wrote:
> I'm not quite understanding why a tuple is hashable but a list is not.
> Any pointers? Thanks!
tuple is hashable because it is immutable whereas a list is mutable.
--
http://mail.python.org/mailman/listinfo/python-list
I dont see anything wrong with it and it works for me on a sequence of 5000
--
http://mail.python.org/mailman/listinfo/python-list
when looking up namespace-packages I found pkgutil which lets me add a
myapp.user package with the following in its __init__.py and nothing
else
import os, os.path
from pkgutil import extend_path
homedir = os.environ.get('HOME') or os.environ.get('USERPROFILE')
__path__ = extend_path([os.path.abs
*" or better yet map it to myapp.user?
Dj Gilcrease
OpenRPG Developer
~~http://www.openrpg.com
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Aug 18, 2009 at 2:12 AM, "Martin v. Löwis" wrote:
> The second item is line conversion hooks. Dj Gilcrease has posted a
> solution which he considers a hack himself. Mark Hammond has also
> volunteered, but it seems some volunteer needs to be "in charge",
On Apr 11, 12:30 am, Dennis Lee Bieber wrote:
> On Fri, 10 Apr 2009 13:25:25 -0700 (PDT), dj
> declaimed the following in gmane.comp.python.general:
>
>
>
> > I have a handler which I use with a set of log levels for the pyth
I have a handler which I use with a set of log levels for the python
logging module.
--- myhandler.py
import logging.handlers
# create my handler class
class MyHandler(logging.handlers.RotatingFileHandler):
On Mar 31, 4:01 pm, MRAB wrote:
> dj wrote:
> > On Mar 31, 12:58 pm, MRAB wrote:
> >> dj wrote:
> >>> On Mar 30, 4:18 pm, Vinay Sajip wrote:
> >>>> On Mar 30, 4:13 pm, dj wrote:
> >>>>> I am trying to create a log level called user
On Mar 31, 12:58 pm, MRAB wrote:
> dj wrote:
> > On Mar 30, 4:18 pm, Vinay Sajip wrote:
> >> On Mar 30, 4:13 pm, dj wrote:
>
> >>> I am trying to create a log level called userinfo for the pythonlogging.
> >>> I read the source code and tried to reg
On Mar 31, 1:13 pm, dj wrote:
> It seems that you can create custom handlers and add them to the
> logging.handlers namespace(http://mail.python.org/pipermail/python-
> list/2008-May/493826.html.)
> But for reasons beyond my understanding my log file (test.log) is not
It seems that you can create custom handlers and add them to the
logging.handlers namespace(http://mail.python.org/pipermail/python-
list/2008-May/493826.html.)
But for reasons beyond my understanding my log file (test.log) is not
written to.
my handler class
On Mar 30, 4:18 pm, Vinay Sajip wrote:
> On Mar 30, 4:13 pm, dj wrote:
>
>
>
> > I am trying to create a log level called userinfo for the pythonlogging. I
> > read the source code and tried to register the level to theloggingnamespace
>
I am trying to create a log level called userinfo for the python
logging. I read the source code and tried to register the level to the
logging namespace with the following source:
from logging import Logger
# create the custom log level
Hello,
I have just started working with minimock in doctest.
I want to create a mock pyodbc object which returns a string value
when the method execute is called.
Here is my doctest:
>>> from minimock import Mock
>>> import pyodbc
>>> def database_response()
... ServerName = 'test_server'
On Jun 7, 9:40 am, Scott David Daniels <[EMAIL PROTECTED]> wrote:
> dj wrote:
> > Hello again,
>
> > Does anyone know which method in the time module will generate and am
> > or pm ?
> > If none of the method will do this for me. Can I produce the value
On Jun 7, 9:24 am, "Mark Tolonen" <[EMAIL PROTECTED]> wrote:
> "dj" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
>
> > Hello again,
>
> > Does anyone know which method in the time module will generate and am
>
Hello again,
Does anyone know which method in the time module will generate and am
or pm ?
If none of the method will do this for me. Can I produce the value on
my own ?
Any suggestions ?
--
http://mail.python.org/mailman/listinfo/python-list
Hello All,
First, Is there a python library, method or module that will tell you
if a file has been opened by another program (i.e: Word, PowerPoint,
IE etc.), the methods I have found in the standard library will only
work with the python open method.
Second, I want to take the time to thank eac
Hello All,
I am attempting to us os.walk to populate two lists with values from a
directory. The first list contains all the files in the directory and
subdirectories.
The second list contains only the files in the subdirectories.
Here is the code:
import os
# list of matching files
allfiles =
Hello,
Rather then holding my XML document in memory before writing it to
disk, I want to create a file object that elementtree will write each
element to has it is created. Does any one know how to do that ?
Here is my code so, far:
fd = open("page.xml", "w")
tree.write( fd, encoding="iso-8859-
Hello All,
I am using elementtree to write an XML document and I am having a hard
time adding the correct indentation.
I have tried using the indent method, but I can not figure out how to
use it. Any suggestions.
--
http://mail.python.org/mailman/listinfo/python-list
method. I have tried a couple times, but I can not figure it
out. Thank you so very much.
DJ
--
http://mail.python.org/mailman/listinfo/python-list
Hello, can anyone help me with this? What am I doing wrong here?
(I've changed private info to /xx)
I'm getting an authentication error while using a standard script
Gmail:
--SCRIPT-
import smtplib
from email.MIMEText import MIMEText
ms
On May 28, 1:53 am, Petr Jakes <[EMAIL PROTECTED]> wrote:
> Maybe you can try python binding for gammu, which works great for me.
> HTH
> Petr Jakes
>
> http://cihar.com/gammu/python/
I'm going to try and setup Gammu today. I'm using a DKU-2
cable connection. The Gammu guide says that:"Before you
>
> You could try this wiki page:
>
> http://rosettacode.org/wiki/Main_Page
>
> It has a fair amount of Python examples as well as many more other
> languages (doing the same algorithm).
>
> Hope this helps.
>
> Adonis
THIS IS GREAT :) Thanx!
--
http://mail.python.org/mailman/listinfo/python-l
omatic responder. This system will be
part of a multiplayer game that lots of people can play using SMS.
cheers,
DJ Fadereu
http://www.algomantra.com
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 30, 1:46 am, nullified <[EMAIL PROTECTED]> wrote:
> On 29 Mar 2007 20:34:26 -0700, "Evil Otto" <[EMAIL PROTECTED]> wrote:
>
> >On Mar 29, 2:19 pm, [EMAIL PROTECTED] wrote:
> >> I am looking for a fake consumer review generator that could generate
> >> realistic looking reviews for any produ
Xah Lee wrote:
> Of interest:
>
> · The Semicolon Wars, by Brian Hayes. 2006.
> http://www.americanscientist.org/template/AssetDetail/assetid/51982
>
> in conjunction to this article, i recommend:
>
> · Software Needs Philosophers, by Steve Yegge, 2006
> http://xahlee.org/Periodic_dosage_dir/_p/so
29 matches
Mail list logo