Re: set IP in linux with python

2007-06-12 Thread fscked
On Jun 12, 1:23 pm, fscked <[EMAIL PROTECTED]> wrote: > I have a text file with some network info like IP, mask, gateway, etc, > that I want to set on a linux box. This script will run on the host > that will be getting the new info. I can parse the data in the text > file an

set IP in linux with python

2007-06-12 Thread fscked
I have a text file with some network info like IP, mask, gateway, etc, that I want to set on a linux box. This script will run on the host that will be getting the new info. I can parse the data in the text file and get my data in a list, but I can't figure out how to put it in the right place of t

Re: path stuff

2007-05-11 Thread fscked
On May 10, 6:08 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 10 May 2007 19:04:30 -0300, fscked <[EMAIL PROTECTED]> > escribió: > > > > > > > ok, I lied, it is still doing the archived folders. Here is the code: > > > im

Re: path stuff

2007-05-10 Thread fscked
On May 10, 1:43 pm, fscked <[EMAIL PROTECTED]> wrote: > On May 10, 12:45 pm, fscked <[EMAIL PROTECTED]> wrote: > > > > > > > On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > > > > On May 9, 7:02 pm, "Gabriel Genellina" <[EM

Re: path stuff

2007-05-10 Thread fscked
On May 10, 12:45 pm, fscked <[EMAIL PROTECTED]> wrote: > On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > > > > > > > On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > En Wed, 09 May 2007 15:11:06 -0

Re: path stuff

2007-05-10 Thread fscked
On May 10, 10:41 am, fscked <[EMAIL PROTECTED]> wrote: > On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > > > > > > En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> > > escribió: > > > >

Re: path stuff

2007-05-10 Thread fscked
On May 9, 7:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 09 May 2007 15:11:06 -0300, fscked <[EMAIL PROTECTED]> > escribió: > > > I am walking some directories looking for a certain filename pattern. > > This part works fine, b

path stuff

2007-05-09 Thread fscked
I am walking some directories looking for a certain filename pattern. This part works fine, but what if I want to exclude results from a certain directory being printed? eg d:\dir\mydir1\filename.txt <--I want to see this one d:\dir\mydir2\archived\filename.txt

Re: _csv.Error: string with NUL bytes

2007-05-03 Thread fscked
On May 3, 9:29 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, fscked wrote: > > The traceback is as follows: > > > Traceback (most recent call last): > > File "createXMLPackage.py", line 35, in ? >

Re: _csv.Error: string with NUL bytes

2007-05-03 Thread fscked
On May 3, 9:11 am, Larry Bates <[EMAIL PROTECTED]> wrote: > fscked wrote: > > Anyone have an idea of what I might do to fix this? I have googled adn > > can only find some random conversations about it that doesn't make > > sense to me. > > > I am basical

_csv.Error: string with NUL bytes

2007-05-03 Thread fscked
Anyone have an idea of what I might do to fix this? I have googled adn can only find some random conversations about it that doesn't make sense to me. I am basically reading in a csv file to create an xml and get this error. I don't see any empty values in any fields or anything... -- http://ma

Re: read list of dirnames and search for filenames

2007-05-01 Thread fscked
On May 1, 2:36 pm, Rob Wolfe <[EMAIL PROTECTED]> wrote: > Rob Wolfe <[EMAIL PROTECTED]> writes: > > fscked <[EMAIL PROTECTED]> writes: > > >> I cannot seem to get this to work. I am hyst trying to read in a list > >> of paths and see if the directory

read list of dirnames and search for filenames

2007-05-01 Thread fscked
I cannot seem to get this to work. I am hyst trying to read in a list of paths and see if the directory or any sub has a filename pattern. Here is the code: import os, sys from path import path myfile = open("boxids.txt", "r") for line in myfile.readlines(): d = path(line) for f i

Re: ValueError: too many values to unpack

2007-04-11 Thread fscked
You guys have given me some great ideas, I am going to try them all out and let you guys know how it turns out. On a side note, thanks for nto bashing a noob like me who isn't the greatest pythonista around. I am trying to learn and you guys are how I learn my mistakes. Well you, and the fact the

Re: ValueError: too many values to unpack

2007-04-11 Thread fscked
On Apr 11, 10:26 am, Laszlo Nagy <[EMAIL PROTECTED]> wrote: > fscked írta:> Trying to use CSV to read in a line with 11 fields and I keep > getting > > this error. I have googled a bit and have been unable to figure it out. > > Probably you have more than 11 values in s

ValueError: too many values to unpack

2007-04-11 Thread fscked
Trying to use CSV to read in a line with 11 fields and I keep getting this error. I have googled a bit and have been unable to figure it out. -- http://mail.python.org/mailman/listinfo/python-list

Re: XML/encoding/prolog/python hell...

2007-04-03 Thread fscked
Any ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: XML/encoding/prolog/python hell...

2007-03-29 Thread fscked
Here is what I currently have. Still missing prolog information and namespace info. Encoding is irritating me also. :) import os,sys import csv from elementtree.ElementTree import Element, SubElement, ElementTree, tostring def indent(elem, level=0): i = "\n" + level*" " if len(elem):

Re: XML/encoding/prolog/python hell...

2007-03-28 Thread fscked
[EMAIL PROTECTED] wrote: <---SNIP---> > I've never done this, but I found a recipe on the ActiveState website > that looks like it would be helpful: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/159100 I tried looking at that but couldn't figure out how to get the property file wor

XML/encoding/prolog/python hell...

2007-03-28 Thread fscked
I am a beginning pythoner and I am having a terrible time trying to figure out how to do something that (it would seeme to me) should be fairly simple. I have a CSV file of unknown encoding and I need to parse that file to get the fields <--- DONE I need to create an xml document that has the prop

XLM prolgoue

2007-01-17 Thread fscked
How do I go about creating the XML prologue like I want it to be? Specifically, I am trying to add encoding and some namespace stuff. -- http://mail.python.org/mailman/listinfo/python-list

Re: minidom utf-8 encoding

2007-01-04 Thread fscked
Martin v. Löwis wrote: <...snip...> > I find that hard to believe. There is no code in Python that does > removal of characters, and I can't see any other reason why it gets > removed. > > OTOH, what I do get when writing to a file is a UnicodeError, when > it tries to convert the Unicode string

Re: minidom utf-8 encoding

2007-01-04 Thread fscked
Martin v. Löwis wrote: > fscked schrieb: > > Hi guys/gals. > > > > I am trying to write and xml file from data parsed from a csv. > > > > I can get everything to work except that I cannot get minidom to do --> > > ö which needless to say is driving me nut

minidom utf-8 encoding

2007-01-03 Thread fscked
Hi guys/gals. I am trying to write and xml file from data parsed from a csv. I can get everything to work except that I cannot get minidom to do --> ö which needless to say is driving me nuts. Any suggestions? What it ends up doing is just removing the character from the datastream. -- http:/