Compare content of two XML files

2009-08-18 Thread David Brochu
I need to compare a REST XML response with a 'gold standard' response (one that we have already verified is correct). The problem is, sometimes the REST response comes back and it is logically correct, but the order of attributes and elements is different than what is in the 'gold standard' file.

comparing XML files to eachother

2009-08-17 Thread David Brochu
I need to compare one xml document to another to see if the content matches. Unfortunately, the formatting (spacing) and order of elements may change between files from run to run. I have looked into xml dom minidom but can't seem to find how to accomplish this. Does anyone know how I can do a

httplib headers

2009-07-30 Thread David Brochu
Using the following code I am trying to pass a header to my POST request. (Note: urls masked) file = sys.argv[0] url = sys.argv[1] conn = httplib.HTTPConnection(XX.XXX.XX.XXX,) headers = {'content-type':'application/xml'} conn.request(POST,url,file,headers) response = conn.getresponse() head

Re: Increment Variable Name

2008-01-25 Thread David Brochu
Basically what I am trying to do is pass each value from a list to the following line of code (where XXX is where I need to pass each value of the list tests = easygui.multchoicebox(message=Pick the test(s) you would like to run from the list below. , title=Validation Tests

Increment Variable Name

2008-01-23 Thread David Brochu
This is probably really trivial but I'm stumped :-( Does anyone know how to increment a variable name? For example: I know the length of a list and I want to pass each element of a list to a unique variable, thus I want to increment variable names. If the list length = 4, i want to have

Re: os.system questions

2007-03-31 Thread David Brochu
From: Eric Price [EMAIL PROTECTED] Date: March 31, 2007 9:38:53 AM EDT To: [EMAIL PROTECTED], [EMAIL PROTECTED] Cc: python-list@python.org Subject: Re: os.system questions Oops! The problem isn't in the os.system call. It's in the fact that I don't call the function. That is, I write a

Re: book for a starter

2007-02-27 Thread David Brochu
From: Wensui Liu [EMAIL PROTECTED] To: python-list@python.org Date: Tue, 27 Feb 2007 10:09:57 -0500 Subject: book for a starter Good morning, all, [I just start learning python and have a question regarding books for a newbie like me. If you are only allowed to buy 1 python book, which one will

PyFit documentation

2007-02-27 Thread David Brochu
I am trying to run some testing using Fitnesse with the PyFit python module. For some reason I am not able to import the fit.ColumnFixture module from PyFit. I use the following command: from fit.ColumnFixture import ColumnFixture I can't find any documentation on the web for PyFit syntax.

Re: Python-list Digest, Vol 40, Issue 215

2007-01-17 Thread David Brochu
How is it that when I try to send out a valid response to help someone with their python issue I get flagged, but this guy can send out something totally useless to the python community? -- Forwarded message -- From: [EMAIL PROTECTED] (David Bostwick) To:

Re: Making a simple script standalone

2007-01-17 Thread David Brochu
Hi, I'm new to this group. I've tried finding my answer in existing messages, but no such luck. What I want to do is to compile/bundle/prepare/whatever_term a simple Python script for deployment on a Windows machine. Installing Python itself on that machine, is not an option. Ideally I would

Re: Using Excel With Python

2007-01-11 Thread david brochu jr
Try using ExcelApp.Close(). This should kill the entire application (it might prompt for a Save). -- http://mail.python.org/mailman/listinfo/python-list

PyCon 07

2006-12-07 Thread david brochu jr
Anyone able to register yet for PyCon07? I can't find any link online..I want to get in early to lock in on the cheaper registration rate..any ideas? -- http://mail.python.org/mailman/listinfo/python-list

Re: Ensure a variable is divisible by 4

2006-12-05 Thread david brochu jr
You can use the modulous % to check for a remainder of division. If no remainder is found you know the number is divisible by 4. Ex: x = 111 if x%4 == 0: print X is divisible by 4 -- Forwarded message -- From: John Machin [EMAIL PROTECTED] To: python-list@python.org Date: 5

wait for keystoke

2006-08-30 Thread david brochu jr
I want to add a press any key to continue option to my script, where the script pauses until the users presses any key. Does anyone know how I would do this without having to add in an if statement in the middle of my existing script? Is there a method already to accomplish this? --

Automate logging into page

2006-08-11 Thread david brochu jr
I am trying to automate logging a website and have been unsuccessful. The code below is supposed to log me into the site, but changing the username/password to an incorrect combination does not cause an error or crash to be seen. My goal is to log into this page and save the cookie from the page

can't kill os.system process

2006-07-27 Thread david brochu jr
When I run the following code: import os file= C:\\progra~1\\mozill~1\\firefox.exe www.google.com os.system(file) # this will spawn Firefox and naviage to google.com kill = taskkill /f /im firefox.exe os.system(kill)# this should kill Firefox instance that was just spawned the script never

Automate Mozilla Firefox

2006-07-26 Thread david brochu jr
Hey everyone,I am trying to automate navigating to urls (all from a txt file) 1 at a time in Firefox and then killing firefox before navigating to the next. I think I might have to use PyXPCOM to do this but I have never used this package and cannot find any good resources on the net to help me

Re: Automate Mozilla Firefox

2006-07-26 Thread david brochu jr
want to take a text file (which has a list of urls) and have my script go through them 1 by one using Firefox. So for instance, if the first two urls in my list were: www.google.com www.amazon.com I would want to spawn firefox and load www.google.com. Once google loads, I would like to kill

PAMIE error help needed

2006-07-19 Thread david brochu jr
I have thrown together a script which reads a list or urls from a txt file and navigates to each url while recording how long it takes for the page to render completely using PAMIE. For some reason I randomly get crashes reporting: File c:\Python24\scripts\PAM.py, line 30, in IE_Invoke

Python to log into web site

2006-07-18 Thread david brochu jr
Hi, I have been browsing around the net looking for a way (hopefully an easily implemented module) to log into a web site using python. The site I wish to log into is an internal site which requires email address and password for authentication. Does anyone have any suggestions or links that

newbe: tuple

2006-06-14 Thread david brochu jr
I am trying to get my ip address through a script and I am using the following code: import socket ip = socket.gethostbyaddr(socket.gethostname()) ip then becomes a tuple and takes on three values. I am trying to pull the value of ip[2] which when printed displays: ['10.5.100.17']. I want

RSS feeds

2006-06-06 Thread david brochu jr
Not sure where to post this one so here it goes...sorry to anyone if it shouldnt be here. I am looking to take RSS feeds a process them with a python program..any idea where I can get RSS feeds for sports stats, and how I would use the script to connect automatically to the feed? --

Re: Starting New Process

2006-06-05 Thread david brochu jr
try os.spawn() using the os module -- http://mail.python.org/mailman/listinfo/python-list

Tkinter

2006-06-02 Thread david brochu jr
Does anyone know how to get the value of the file selected when using tk_getOpenFile in Tkinter? -- http://mail.python.org/mailman/listinfo/python-list

Tkinter question

2006-05-31 Thread david brochu jr
I am trying to create a GUI that will display a new window with information about my program when the user clicks on the info button (a green i bitmap). So far all I can get my program to do is show the new window (using Toplevel() ) when the program loads, not when the user presses the

making IE toolbars visible

2006-05-02 Thread david brochu jr
Anyone know how if there is a module out there or some way to automate making an IE toolbar visible in IE? Thanks, Dave -- http://mail.python.org/mailman/listinfo/python-list

detect enter key

2006-04-28 Thread david brochu jr
I am writing a script in which I need to wait for the user to press enter before continuing...how would I detect when the user presses the Enter key? Thanks -- http://mail.python.org/mailman/listinfo/python-list

Tail a file

2006-04-20 Thread david brochu jr
Hello, I wrote a script to monitor ping activity and output it to a log file. I am using windows and want to have another script constantly check the latest entry to see if Request timed out is seen. Is there a way to tail a file much like I would in Unix so I can just see the latest entry and

tail a file (win)

2006-04-20 Thread david brochu jr
Hello, I wrote a script to monitor ping activity and output it to a log file. I am using windows and want to have another script constantly check the latest entry to see if Request timed out is seen. Is there a way to tail a file much like I would in Unix so I can just see the latest entry and

search a string

2006-04-20 Thread david brochu jr
Hello, I have a text file with the following string: ['\r\n', 'Pinging www.ebayyy.com [207.189.104.86] with 32 bytes of data:\r\n', '\r\n', 'Request timed out.\r\n', '\r\n', 'Ping statistics for 207.189.104.86:\r\n', ' Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),\r\n'] How would I

search files in a directory

2006-04-20 Thread david brochu jr
Hello, I need to open every file in a directory and search for a string. What module is needed to do this and how would I go about searching each file? -- http://mail.python.org/mailman/listinfo/python-list

whitespace again

2006-04-14 Thread david brochu jr
hello again, still having problemsi have the following in a txt file: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\software\compete\dca]UserId=92005851PanelId=mayflowerPanelName=Consumer Input ToolbarCaptureType=dword:0002 CapTypOvr=dword:0001ExePath=C:\\Program

ping

2006-04-14 Thread david brochu jr
I am trying to ping websites and output the results to a txt file: import os file = open(c:\python24\scripts\ip.txt)redirect = open(c:\python24\scripts\log.txt,a) for x in file:ping = ping + xprint redirect, os.system(ping) but the results seen in the log.txt file are: What am i

re: ping

2006-04-14 Thread david brochu jr
Thanks, Unfortunately substituting os.system with os.popen results in the output being: open file 'ping www.google.com', mode 'r' at 0x009C4650open file 'ping www.boston.com', mode 'r' at 0x009C4650 open file 'ping www.espn.com', mode 'r' at 0x009C4650 open file 'ping www.redsox.com', mode 'r'

Remove Whitespace

2006-04-13 Thread david brochu jr
Hi again, Trying to remove whitespace from a string in a text file. the string is: D c a V e r = d w o r d : 0 0 0 0 0 6 4 0 how would i go about doing this? -- http://mail.python.org/mailman/listinfo/python-list

Regular Expressions

2006-04-12 Thread david brochu jr
Hi, I am trying to grab the following string out of a text file using regular _expression_ (re module): DcaVer=dword:0640 What I need to do with that string is trim down DcaVer=dword: and convert the remaining number from hex to dec. I have been trying to figure this out for a while..I

Re: Regular Expressions

2006-04-12 Thread david brochu jr
Pete, Why do you have to use a regular _expression_? I don't, I just though this was the easiest way. DcaVer=dword:0640Is all your other input pretty much identical in form? Specifically,the number of interest is the last thing on the line, and always preceded by a colon? The other information

Spawn/Kill Process

2006-03-31 Thread david brochu jr
I need to write a script that starts an exe and then continues throughthe script. I am able to start the exe file but my script doesn'tcontinue because the process I start runs in the background of Windows(as it is supposed to). I have tried using both os.system and os.popento get around this but

Popen

2006-03-30 Thread david brochu jr
I am trying to write a script that starts a window process and then continues on to do other testing, but have encountered a little problem. When I start the exe (process to run) I cannot move on past that point in my script. Once started, the process is supposed to run in the background

Clearing IE history

2006-03-15 Thread david brochu jr
Hello I am trying to automate the clearing of IE history using python but keep running into problems. I cannot seem to find a good resource online about this, and I can't find an object in InternetExplorer's object module to point me in the right direction. I would rather not have to deal with

Excel Object Model

2006-03-10 Thread david brochu jr
Hello, I am trying to automate Excel and I cant seem to find out much relating to it's object model (in relation to Python)..seems as if its mostly covered by C and VB. Can anyone point me in the right direction? I am able to open excel, add information to cells, and then save and close the book

PAMIE syntax

2006-03-09 Thread david brochu jr
Hi everyone, I am trying to automate Internet Explorer and am trying to use the PAMIE module for Python2.4. So far I have been unable to find any documentation online which provides syntax for using thie module. For instance, does anyone know how to use PAMIE to close a browser instance? Any