Problem with libxml2/libxlst

2010-06-10 Thread CinnamonDonkey
Hi All, I could not find a dedicated libxml2/libxlst group so I thought I would see if anyone here could help. I have a system which captures the stdout from various sources and writes it into a generic xml file. This file then needs to be transformed to get the correct html format for rendering

Re: Problem with libxml2/libxlst

2010-06-10 Thread CinnamonDonkey
My mistake! *doh* I had an 'disable-output-escape=YES' when it should have been NO. -Shaun On 10 June, 10:17, CinnamonDonkey cinnamondon...@googlemail.com wrote: Hi All, I could not find a dedicated libxml2/libxlst group so I thought I would see if anyone here could help. I have a system

Re: (Windows) Finding out which process has locked a file.

2009-05-15 Thread CinnamonDonkey
/win32_how_do_i/get-the-owner-of-a-file.html On 15 May, 03:47, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 14 May 2009 08:42:07 -0300, Lawrence D'Oliveiro escribió: In message 787d6072-3381-40bd- af20-8e1a40405...@h23g2000vbc.googlegroups.com, CinnamonDonkey wrote: I have a script

Re: (Windows) Finding out which process has locked a file.

2009-05-15 Thread CinnamonDonkey
actually posted them so that I could later read them at work). Yes, this thread is specifically about who has the *lock* on a file. Thanx TJG for the reality check ;-) Shaun On 15 May, 08:50, Tim Golden m...@timgolden.me.uk wrote: CinnamonDonkey wrote:   I have to say, this has got to be one

(Winows) Finding out which process has locked a file.

2009-05-13 Thread CinnamonDonkey
Hi all, Does anyone know how I can programatically find out which process (resolved to human friendly string, i.e. executable) has a lock on a file. I have a script running which occassionally fails because it is trying to delete a file in use by another process. When this happens I want it to

Re: Deleteing empty directories

2009-03-31 Thread CinnamonDonkey
: On Mon, 30 Mar 2009 08:14:55 -0700, CinnamonDonkey wrote: My understanding was that rmtree removes a whole tree not just the empty directories? So it seems: os.mkdir('die-die-die') os.mkdir('die-die-die/stuff') shutil.rmtree('die-die-die') I think what you want is os.removedirs

Caught out by daylight saving :-(

2009-03-30 Thread CinnamonDonkey
Hi All, I had the following bit of code which was working fine until we went into Daylight saving this weekend, now the result is an hour out. timeString = 20090330 15:45:23 timeFormat = '%Y-%m-%d %H:%M:%S' modificationTime = datetime.datetime.utcfromtimestamp( time.mktime (

Re: Caught out by daylight saving :-(

2009-03-30 Thread CinnamonDonkey
inheriting from tzinfo and refine the behaviour of the dst() function? If so, then what do I do with the class? On 30 Mar, 13:08, Chris cwi...@gmail.com wrote: On Mar 30, 1:47 pm, CinnamonDonkey cinnamondon...@googlemail.com wrote: Hi All, I had the following bit of code which was working fine

Re: Caught out by daylight saving :-(

2009-03-30 Thread CinnamonDonkey
Ah, I think I needed to use fromtimestamp() and not utcfromtimestamp (). :-) On 30 Mar, 13:42, CinnamonDonkey cinnamondon...@googlemail.com wrote: Hi Chris, Thanx for the link... I had already found that. My problem is not finding information but more understanding it. I've only been

Re: Caught out by daylight saving :-(

2009-03-30 Thread CinnamonDonkey
the disk drive involved was located in France.  Just what time is correct? Anything other than UTC is subject to confusion. CinnamonDonkey wrote: Hi All, I had the following bit of code which was working fine until we went into Daylight saving this weekend, now the result is an hour out

Deleteing empty directories

2009-03-30 Thread CinnamonDonkey
Hi All, I've been scratching my head all afternoon trying to work out the best/ quickest way is to delete empty directories within a tree (Windows). I've looked at os.walk() but it seems to traverse the directory tree in the wrong order (is it possible to reverse the order?) It seems the only

Re: Deleteing empty directories

2009-03-30 Thread CinnamonDonkey
:\temp ) But I'm not sure what the max recursion depth is in python? Plus I think this could be more efficient. On 30 Mar, 15:59, Tim Golden m...@timgolden.me.uk wrote: CinnamonDonkey wrote: Hi All, I've been scratching my head all afternoon trying to work out the best/ quickest way

Re: Deleteing empty directories

2009-03-30 Thread CinnamonDonkey
': RecurseTree( rc:\temp ) On 30 Mar, 16:14, CinnamonDonkey cinnamondon...@googlemail.com wrote: My understanding was that rmtree removes a whole tree not just the empty directories? eg. root  - file1  - file2  - dir1  - dir2   - file3   - dir3 I would expect; dir1 and dir3 to be deleted

Re: Relative Imports, why the hell is it so hard?

2009-03-24 Thread CinnamonDonkey
other projects... seems as good a reason as any to try packages out ;-) Thanx anyway :) On 23 Mar, 18:57, bearophileh...@lycos.com wrote: CinnamonDonkey: what makes something a package? If you don't know what a package is, then maybe you don't need packages. In your project

Re: Relative Imports, why the hell is it so hard?

2009-03-24 Thread CinnamonDonkey
Mar, 12:37, bearophileh...@lycos.com wrote: CinnamonDonkey: It is neither constructive nor educational. It's a bit like saying If you don't know what a function is, then maybe you don't need it. ... have you tried having a single block of code? The point of people coming

Relative Imports, why the hell is it so hard?

2009-03-23 Thread CinnamonDonkey
Hi All, I'm fairly new to Python so I still have a lot to learn. But I'd like to know how to correectly use relative imports. Please, please... please! don't go off on rants about why you think relative imports should not be used. I've got 15+ years in C++ and relative inclusion of other

Re: Relative Imports, why the hell is it so hard?

2009-03-23 Thread CinnamonDonkey
Hi Guys, Thanx for the quick responses, it is very much appreciated! Skip, that's a good point about C++ != Python and I assure you I am very much aware of that ;-). Looking at http://www.python.org/dev/peps/pep-0328/#guido-s-decision would suggest, unless I am completely miss-understanding the

Re: Relative Imports, why the hell is it so hard?

2009-03-23 Thread CinnamonDonkey
My applogies if this is a silly question... but what makes something a package? and does that mean that what I am trying to do is not possible ? :( On 23 Mar, 15:53, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Mon, 23 Mar 2009 12:22:21 -0300, CinnamonDonkey   cinnamondon

Microsoft Message Queues

2009-02-27 Thread CinnamonDonkey
Hi All, I am looking to use win32com to set-up a Microsoft Message Queue (MSMQ) between two or more computers connected on a LAN. I have found this posting: