[CentralOH] Help for a newbie......

Richard.C.1 at bwc.state.oh.us Richard.C.1 at bwc.state.oh.us
Wed Jun 5 21:42:33 CEST 2013


Thank you for your speedy reply!

What I do is work with/manage a large number of servers here at the bureau. Each morning I have a number
of IE shortcuts each of which I click on to run. The shortcuts are of the form http://servername:5555 . This will cause the
server to run the "health app" and display a status result screen and an "ok" reply box. Since I'm starting with Python I thought
it would be instructive and kind of neat to be able to automate the process so that I can kick off a python program
that will call/run/execute the IE shortcut that will call the server which will then display the status screen and wait
for me to reply with an enter key to the "OK" box. Then on to the next screen full.

I just didn't know if I need to use something like an os.popen(cmd) thingee  .....and do I pass it the IE program and
the URL string, or just the URL string or ???  Whatever will "kick off" the ie command I think is what I need.

I hope I'm not biting off more than I can chew with this, but it sounds neat and challenging....

Thanks for the invite to the meeting but I don't think I can make it. I'm low vision and can't do much driving. I work
in Columbus but live in Dayton. I vanpool from Cols. to Springfield and get a ride to Dayton from there each day....
It doesn't look like there's a Python group in Dayton....

TKInter is on my list of stuff to learn....but a bit down the road.....

From: CentralOH [mailto:centraloh-bounces+richard.c.1=bwc.state.oh.us at python.org] On Behalf Of Brian Costlow
Sent: Wednesday, June 05, 2013 3:14 PM
To: Mailing list for Central Ohio Python User Group (COhPy)
Subject: Re: [CentralOH] Help for a newbie......

Hi Richard,

Welcome!

First, I'm not sure I completely understand the question you are asking.

Do you want your python program itself to connect to that URL, and display the okay dialog?

Or are you trying to use Python to script a browser (Firefox, Chrome, IE) so the browser connects to the URL and hits okay on a dialog displayed in the browser?

If the latter, I suggest you look into a web test application, like selenium. You can script it in Python (or a number of other languages) and use it to automate browsers.

http://docs.seleniumhq.org/

If the former, you'll need to work out how to connect to the URL and get data. I suggest looking into the Requests library.

http://docs.python-requests.org/en/latest/

Then you'll need to work on a GUI. There are a number of possible choices, though PyQt and TkInter seem to get talked about the most.

http://wiki.python.org/moin/GuiProgramming

Trying to give this level of help on the mailing list is tough. You might want to bring your code to a dojo for help. Or get started and ask a more specific question.

You can go here to find dojos, the next one is this Friday.  http://cohpy.org

--Brian





On Wed, Jun 5, 2013 at 2:36 PM, Richard.C.1 at bwc.state.oh.us<mailto:Richard.C.1 at bwc.state.oh.us> <Richard.C.1 at bwc.state.oh.us<mailto:Richard.C.1 at bwc.state.oh.us>> wrote:
First, I'm a real newbie to Python - and I mean a real newbie...  I'm still going
through a tutorial on it so I think I don't know what I don't know.... and right
now I think I'm getting a bit swamped by what seem to be the bunch of ways
I might be able to do something..... and what would help is a short example or
description of the command/call (s?) that I need to use. Briefly, what I want to
be able to do is to execute an internal browser command that will run a shortcut
on our internal web that looks like this:

http://<hostname>:5555/dosomething<http://%3chostname%3e:5555/dosomething>

This will call a server which after a few seconds will show an "OK" box on the
screen to which I want to "pipe" an "enter" command.  There's a lot more to
the whole thing, but if I can get an example of what commands/calls/?? I would
need to use to do those two actions that would get me started. Thank you very
much for any help/suggestions/references/thoughts you may feel like sharing!



Portions of this message may be confidential under an exemption to Ohio's public records law or under a legal privilege. If you have received this message in error or due to an unauthorized transmission or interception, please delete all copies from your system without disclosing, copying, or transmitting this message.

_______________________________________________
CentralOH mailing list
CentralOH at python.org<mailto:CentralOH at python.org>
http://mail.python.org/mailman/listinfo/centraloh

Portions of this message may be confidential under an exemption to Ohio's public records law or under a legal privilege. If you have received this message in error or due to an unauthorized transmission or interception, please delete all copies from your system without disclosing, copying, or transmitting this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/centraloh/attachments/20130605/806651b4/attachment.html>


More information about the CentralOH mailing list