RE: Dict Copy & Compare

2007-04-30 Thread Robert Rawlins - Think Blue
ssage- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Golden Sent: 30 April 2007 10:15 Cc: python-list@python.org Subject: Re: Dict Copy & Compare Robert Rawlins - Think Blue wrote: > I have two dicts, one named 'this' and the other named 'that'. &

RE: Dict Copy & Compare

2007-04-30 Thread Robert Rawlins - Think Blue
om: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Golden Sent: 30 April 2007 11:27 Cc: python-list@python.org Subject: Re: Dict Copy & Compare Robert Rawlins - Think Blue wrote: > Hello Tim, > > Sorry, that 'value' was a slip up on my part, we're just

RE: Dict Copy & Compare

2007-04-30 Thread Robert Rawlins - Think Blue
1 over and done with :-D Thanks, Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Golden Sent: 30 April 2007 12:54 Cc: python-list@python.org Subject: Re: Dict Copy & Compare Robert Rawlins - Think Blue wrote: > On[e] quick question, how ca

Killing Threads

2007-05-01 Thread Robert Rawlins - Think Blue
Hello Guys, I've got an application which I've fearfully placed a couple of threads into however when these threads are running it seems as if I try and quite the application from the bash prompt it just seems to freeze the SSH client. I've also seen that if I have my app running in the backgro

RE: test

2007-05-01 Thread Robert Rawlins - Think Blue
Test response :-D -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ray Sent: 02 May 2007 04:05 To: python-list@python.org Subject: test test only -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-li

Dynamic File Name Open()

2007-05-01 Thread Robert Rawlins - Think Blue
Chaps, I'm trying to open a file using open() but the name of the file is created dynamically as a variable, but also has part of a static path. For instance, the file may be called 'dave' and will always be in '/my/files/here/'. Now I've tried a few combinations of getting this to work, su

RE: Killing Threads

2007-05-02 Thread Robert Rawlins - Think Blue
Thanks for this Diez and Tim, I'll take a look into this today, sorry for not posting any code fragments, its not so much a fragment as it is a bloody great big monster :-D Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Diez B. Roggisch Sent: 02 May

Spotting Crashed Application

2007-05-09 Thread Robert Rawlins - Think Blue
Hello Guys, I've got an application that I've written, and it sits in an embedded system, from time to time the application will crash, I'm not quite sure what's causing this, but as we test it more and more we'll grasp a better understanding and fix the issues. However, until then I need a

Code Explanation

2007-05-17 Thread Robert Rawlins - Think Blue
Hello Guys, I'm currently working on a non-python project, and I'm trying to overcome a task of parsing a text file into a database and/or xml file. I've managed to find a parser example written in python, and I'm hoping to deconstruct the code methodology a bit so I can write it in another lan

App Leaving 'sh ' Everywhere

2007-05-18 Thread Robert Rawlins - Think Blue
Hello Guys, I've got an application that seems to leave 'sh ' in my os processes list. I'm running it on Debian, albeit a stripped down embedded version. I'm not sure what the cause of this is, My application starts several threads and also uses popen2.popen3() to run a few CMD commands. An

SOAPpy My Class

2007-05-21 Thread Robert Rawlins - Think Blue
Hello Chaps, I've used SOAPpy in its very basic form for consuming web services on my web server, but I'm now looking to publish a web service from my application. Basically I'm looking to create a public 'proxy' of an object I have in the application. The idea being that my application will be

Restart Linux System

2007-05-22 Thread Robert Rawlins - Think Blue
Hello Guys, I'm looking to restart a Linux system from my python application. What's the best way to achieve this, is there something in the OS module? Thanks, Rob -- http://mail.python.org/mailman/listinfo/python-list

Shared Memory Space - Accross Apps & Network

2007-05-22 Thread Robert Rawlins - Think Blue
Hello Guys, I've got an application that runs on an embedded system, the application uses a whole bunch or dicts and other data types to store state and other important information. I'm looking to build a small network of these embedded systems, and I'd love to have them all share the same

File Handling & TRY/EXCEPT

2007-08-03 Thread Robert Rawlins - Think Blue
Hello Guys, I'm looking for some advice on how best to handle file read/write errors with try/except as i'm a little vague on this, I have a small memory leak in my app and I'm starting to think its generated by my log file write. For an example of the function look below. def addApp

RE: File Handling & TRY/EXCEPT

2007-08-03 Thread Robert Rawlins - Think Blue
gust 2007 14:20 To: python-list@python.org Subject: Re: File Handling & TRY/EXCEPT Robert Rawlins - Think Blue wrote: > Hello Guys, > > > > I'm looking for some advice on how best to handle file read/write errors > with try/except as i'm a little vague on this, I

RE: Replacing _xmlplus.dom.minidom with xml.dom.minidom

2007-08-03 Thread Robert Rawlins - Think Blue
Just as a heads up, minidom is pretty inefficient and difficult to work with too. On someone else's advice I switched over to ElementTree and have been really pleased with the results, its much simpler to work with and more efficient too. Rob -Original Message- From: [EMAIL PROTECTED] [m

Devloper Wanted For Debugging / Optimizing

2007-08-03 Thread Robert Rawlins - Think Blue
Hello Chaps, I've been writing (with your help) a small application over the past couple of months but I'm really struggling to iron out all of the creases and its seems to spring a few memory leaks that I'm unable to find and plug. It's only a small app, around 500 lines of code I would guess,

Launching App

2007-08-09 Thread Robert Rawlins - Think Blue
Hello Guys, I'm looking for the best method to launch my python app when my Linux system boots up. At the moment I just have an entry like this in my rc.local file: CD /myfolder/anotherfolder ./myapp.py Is this the best way to do this? Or is there a better way? I feel like a bit of a d

SOAP Webservices and Python

2007-04-11 Thread Robert Rawlins - Think Blue
Hello Chaps, I'm pretty new to the world of Python, but I'm slowly getting my head around things, and on today's agenda I'm looking at consuming SOAP web services. I've got an Adobe ColdFusion application which I've written that publishes the web service that I'm looking to consume, but I'm at

Writing XML Logs

2007-04-11 Thread Robert Rawlins - Think Blue
Hello Chaps, I'm trying to write an application that will log to an XML file, that'll be later parsed by another application. The proposed log file will look something like this, listing different event elements and then a record for each time that event occurs.

SOAPPY Install Issues

2007-04-11 Thread Robert Rawlins - Think Blue
Hi Guys, I've been trying hopelessly -ALL- afternoon to get python-xml and python-soappy working nicely, but for the -LIFE- of me I keep running into the same brick wall over and over. I'm running Debian and I've installed the latest stable builds of Python, Python-XML and Python-SOAPPY alo

Binary To File

2007-04-12 Thread Robert Rawlins - Think Blue
Hello Guys, Is there an easy way to take binary data and build it into a file? Generally this will be BLOB data drawn from a database, the data will be for jpg images, I want to take the blob data and build it into a physical .jpg file. Is there a simple function for doing this in python? L

Arrays, Got Me Confused

2007-04-13 Thread Robert Rawlins - Think Blue
Hello Guys, I'm struggling to get my head into arrays in python, I've used them plenty in other languages but I'm struggling to find any decent documentation for them in python. I'm looking to build a list of network MAC address's into an array, which will probably be used for logging and firew

RE: Arrays, Got Me Confused

2007-04-13 Thread Robert Rawlins - Think Blue
: 13 April 2007 13:27 Cc: [EMAIL PROTECTED] Subject: Re: Arrays, Got Me Confused Michael Bentley wrote: > > On Apr 13, 2007, at 7:04 AM, Robert Rawlins - Think Blue wrote: >> #!/usr/bin/python >> >> # Filename: Firewall.py >> class Firewall: >>def __ini

RE: Arrays, Got Me Confused

2007-04-13 Thread Robert Rawlins - Think Blue
olden Sent: 13 April 2007 14:03 Cc: [EMAIL PROTECTED] Subject: Re: Arrays, Got Me Confused Robert Rawlins - Think Blue wrote: > Hello Guys, > > Wider fragments of code don't really exists at this moment in time :-D this > is just a bit of a 'tester' class for me to get

Class Dependancy Injection

2007-04-13 Thread Robert Rawlins - Think Blue
Hey again guys, I'm looking to get an answer about dependency injection in python classes, what is the best way to deal with this? For instance, in my application I have a configuration bean which contains all the applications configuration information. Now in one of other classes I need ac

RE: Class Dependancy Injection

2007-04-13 Thread Robert Rawlins - Think Blue
ECTED] Subject: Re: Class Dependancy Injection Robert Rawlins - Think Blue wrote: > Hey again guys, > > > > I'm looking to get an answer about dependency injection in python > classes, what is the best way to deal with this? > > > > For instance, in my a

Signal Handlers

2007-04-16 Thread Robert Rawlins - Think Blue
Hello Guys, Thanks again for all the help you've given me this past week, things are moving briskly and my class library is building nicely and seems to be working well :-D Now, I'm working with an API for another piece of software today, and the API documentation details the signals that a

Import From SubFolder

2007-04-16 Thread Robert Rawlins - Think Blue
Chaps, Is it possible to import a module from a subdirectory in my application? I can only seem to get it to import from a single directory, but keeping all my files and classes in the same directory becomes a little sloppy. Thanks, Rob -- http://mail.python.org/mailman/listinfo/pyth

Writing Log CSV (Efficiently)

2007-04-16 Thread Robert Rawlins - Think Blue
Hello Guys, I'm looking to write a Log file which will be CSV based, and there is a good possibility that it'll get quite busy once its up and running, so I'm looking for the most efficient way to achieve it. Whilst I'm sure i could do something like this. myfile = open("Logs/

RE: Writing Log CSV (Efficiently)

2007-04-16 Thread Robert Rawlins - Think Blue
't likely to be a steady flow of traffic, they'll come in big fat lumps every now and then. Thanks, Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 16 April 2007 15:12 To: Dave Borne Cc: Robert Rawlins - Think Blue; python-list@python.org Subject: Re

RE: Writing Log CSV (Efficiently)

2007-04-16 Thread Robert Rawlins - Think Blue
[mailto:[EMAIL PROTECTED] On Behalf Of Tim Golden Sent: 16 April 2007 15:28 Cc: python-list@python.org Subject: Re: Writing Log CSV (Efficiently) Robert Rawlins - Think Blue wrote: > The log at its highest rate of write may be looking at an operation a > second I think I can probably type

RE: file resume

2007-04-16 Thread Robert Rawlins - Think Blue
Do the same again, but change that 'wb' to 'a' for append :-D should sort you out. Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of luca72 Sent: 16 April 2007 16:57 To: python-list@python.org Subject: file resume Hello at all: if i have one file writt

Deleting or Empty a File

2007-04-17 Thread Robert Rawlins - Think Blue
I'm looking to clear those log files we were discussing earlier chaps, What the best method to do this? Delete the file completely? Or just empty its content? Thanks, Rob -- http://mail.python.org/mailman/listinfo/python-list

Signals

2007-04-18 Thread Robert Rawlins - Think Blue
Hello Chaps, I posted about this the other day but I'm still struggling to get any form of result from it. Basically I have the following piece of code, and according to its API is produces singals when particular events occur, but i have no idea how to list for events, I've tried all sorts of

array{uint32}

2007-04-18 Thread Robert Rawlins - Think Blue
Guys, I have a function that returns a array{uint32}, is there any way to output that to screen in a more user friendly format? At the moment when I print it by itself it appears as [65541L], which isn't much used to anyone. I know this is probably a REALLY dumb question but I'm a little lo

RE: Signals

2007-04-18 Thread Robert Rawlins - Think Blue
lp you can offer, its greatly appreciated. Rob -Original Message----- From: Carsten Haese [mailto:[EMAIL PROTECTED] Sent: 18 April 2007 13:43 To: Robert Rawlins - Think Blue Cc: python-list@python.org Subject: Re: Signals On Wed, 2007-04-18 at 08:39 +0100, Robert Rawlins - Think Blue wrote: &

Wait For Application Start

2007-09-18 Thread Robert Rawlins - Think Blue
Hello Guys, I'm kick starting my application using the inittab to ensure its re-spawned if it dies. However I need to ensure several other applications and service are up and running before my application is started, things such as dbus and a couple of other hardware stacks. A concept I've

Killing A Process By PID

2007-09-20 Thread Robert Rawlins - Think Blue
Hello Guys, I've got some code here which I'm using to kill a process if it freezes. However I have no real way of testing it as I can't force a freeze on my application. So thought I would run the code past you lot to see if anything jumps out as not being quite right. Now, my main applica

Almost There - os.kill()

2007-09-24 Thread Robert Rawlins - Think Blue
Hello Guys, Finally got around to sitting down to tidy up this script this morning but I'm having a small syntax problem with os.kill() to kill a process on my system. Here is the code: def killApplication(): pid = file('/var/lock/MyApplication.lock').read().strip()

RE: Almost There - os.kill()

2007-09-24 Thread Robert Rawlins - Think Blue
Woops, Spoke too soon, just wrapped them in int() and it works a charm :-D Rob From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Rawlins - Think Blue Sent: 24 September 2007 12:23 To: python-list@python.org Subject: Almost There - os.kill() Hello Guys

Subprocess Running Slowly

2007-10-12 Thread Robert Rawlins - Think Blue
Hello Guys, I'm looking for a little advice on spawning a sub process to run a command line application for transferring a file over Bluetooth. Now the spawned process runs from start to finish exactly as I would expect it too, however its very slow. Now the main reason this is so odd, is

Control Log File Size

2007-10-19 Thread Robert Rawlins - Think Blue
Hello Chaps, I've got an application running on linux which writes log files using the python logging module. I'm looking for some help and advice to cap the size which the file will grow too, something reasonably like 2Mb would be great. What is the best way to handle this kind of thing? C

Check File Change Every 10 Seconds

2007-10-22 Thread Robert Rawlins - Think Blue
Hello Chaps, I've got a requirement to check a file for a change every 10 seconds or so, and if the file has been modified since the last time I parsed its content into the application then I need to parse it in again. However, I need this process to not interrupt the rest of my application flo

RE: Check File Change Every 10 Seconds

2007-10-22 Thread Robert Rawlins - Think Blue
Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gabriel Genellina Sent: 22 October 2007 15:29 To: python-list@python.org Subject: Re: Check File Change Every 10 Seconds En Mon, 22 Oct 2007 06:56:52 -0300, Robert Rawlins - Think Blue <[EM

RE: Check File Change Every 10 Seconds

2007-10-22 Thread Robert Rawlins - Think Blue
Check File Change Every 10 Seconds Gabriel Genellina wrote: > En Mon, 22 Oct 2007 06:56:52 -0300, Robert Rawlins - Think Blue > <[EMAIL PROTECTED]> escribi�: > >> I've got a requirement to check a file for a change every 10 seconds or >> so, >> and if the fil

Eclipse Plugins

2007-10-26 Thread Robert Rawlins - Think Blue
Hello Chaps, I'm not sure what you IDE you all generally use for your python development. I've been somewhat lazy and always used a plain text editor, however this technique is starting to take its toll, and it's purely been out of laziness not finding myself a decent IDE to develop in. So this

Logging Help

2008-01-02 Thread Robert Rawlins - Think Blue
Hello Guys, I'm having a little trouble modifying my logging so that the log files are rotated. I'm using the standard python logging module and can find some decent documentation on how to create and add a rotatingFileHandler to my logger but I've been unable to find out how to disable the sta

RE: Get Available Functions

2008-01-28 Thread Robert Rawlins - Think Blue
Thanks for that Tim, I'll have a play around with these functions later today and see what happens, hopefully it'll shed some light on this API for me. Thanks mate, I appreciate it. Rob -Original Message- From: Tim Chase [mailto:[EMAIL PROTECTED] Sent: 28 January 2008 17:02

Get Available Functions

2008-01-28 Thread Robert Rawlins - Think Blue
Hello Guys, I'm working with a python module which isn't part of the core Python API and it also isn't very documented or supported, is there any way that I can easily dump/view the available classes and methods within the package from within python? Thanks guys, Rob -- http://mail.py

IoC and MVC Frameworks

2008-02-01 Thread Robert Rawlins - Think Blue
Hello Guys, I've been working on a little pet project for a while now, using it as a learning exercise for Python and its starting to grow nicely, I'm now looking into refactoring it a little in a more OO fashion and I've always been a real fan of design patterns and all those fun kind of thing

Memory Issue

2008-02-17 Thread Robert Rawlins - Think Blue
Afternoon Guys, I've got what I would consider to be a strange memory leak within an application I've been working on. When the application is running the consumed system memory creeps up slowly, getting higher and higher. However, when looking at 'top' to display the memory allocation for

Last 4 Letters of String

2008-02-21 Thread Robert Rawlins - Think Blue
Hello Guys, I'm looking for a function which will give me the last 4 characters of a given string. I'm sure it's a very simple task but I couldn't find anything of it. Any ideas? Rob -- http://mail.python.org/mailman/listinfo/python-list

Logging to HTTP or File

2008-02-27 Thread Robert Rawlins - Think Blue
Hello Chaps, I'm after some advice on the best way to handle a logging job. Essentially I have data which I'm looking to log to a webservice, it would make good sense I think to use something like the HTTP handler for the python logging API. The problem comes when the application isn't 'onl

<    1   2