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.
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
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
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
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
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
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
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.
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:
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
Try using ExcelApp.Close(). This should kill the entire application (it
might prompt for a Save).
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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?
--
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
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
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
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
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
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
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
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?
--
try os.spawn() using the os module
--
http://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
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
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
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
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
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
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'
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
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
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
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
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
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
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
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
42 matches
Mail list logo