473,395 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

similar script in Python

hi
My VB SCript is like this

Function submit
wait(3)
Set ws = CreateObject("WScript.Shell")

ws.Sendkeys"{ENTER}"

Set ws=nothing
End Function

Setting.WebPackage("ReplayType") = 2
Browser("iXXXXXXX").Page("InXXXX").Frame("fraBuild InvoiceDetail").WebEdit("WebEdit").Set DataTable("Line_Item", dtGlobalSheet)
Setting.WebPackage("ReplayType") = 1
wait(3)
Set ws = CreateObject("WScript.Shell")
ws.SendKeys"{DOWN}"
ws.Sendkeys"{ENTER}"

how to write a similar code in Python
thanks in advance
Apr 19 '07 #1
2 1177
ghostdog74
511 Expert 256MB
2 ways i can think of
using urllib2 module
Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/python
  2. import urllib2
  3. page = urllib2.urlopen("http://www.google.com")
  4. result = page.read()
  5. print result
  6.  
or webbrowser module. pls see the example at the end of that doc.
Apr 19 '07 #2
bartonc
6,596 Expert 4TB
hi
My VB SCript is like this

Function submit
wait(3)
Set ws = CreateObject("WScript.Shell")

ws.Sendkeys"{ENTER}"

Set ws=nothing
End Function

Setting.WebPackage("ReplayType") = 2
Browser("iXXXXXXX").Page("InXXXX").Frame("fraBuild InvoiceDetail").WebEdit("WebEdit").Set DataTable("Line_Item", dtGlobalSheet)
Setting.WebPackage("ReplayType") = 1
wait(3)
Set ws = CreateObject("WScript.Shell")
ws.SendKeys"{DOWN}"
ws.Sendkeys"{ENTER}"

how to write a similar code in Python
thanks in advance
If you're good in VB, you'll probably want to check out the win32com examples in the PythonWin package.
Apr 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: DeepBleu | last post by:
When one is using an HTML form via a web broswer, the user submits the form contents and these are passed to a CGI Python script on the web server. I need to write a client script that connects to...
6
by: Paul Winkler | last post by:
This is driving me up the wall... any help would be MUCH appreciated. I have a module that I've whittled down into a 65-line script in an attempt to isolate the cause of the problem. (Real...
2
by: Efrat Regev | last post by:
Hello, I'm a data-structures course TA trying to write a python CGI script for automatically compiling and testing students' projects. Unfortunately, I've run into some questions while writing...
10
by: Noah | last post by:
I would like to package my main script and all the modules it imports into a single script that will run just as the collection would. It should not need to package standard Python lib modules --...
6
by: tatamata | last post by:
Hello. How can I run some Python script within C# program? Thanks, Zlatko
14
by: nsamad | last post by:
Hi All, Is there anyone using python script to programm the Telit GM862-GPS module?? I am a newbie in using python. I am developing an application in which i have to open a GPRS connection and...
9
by: boris.smirnov | last post by:
Hi there, I have a problem with setting environment variable in my script that uses qt library. For this library I have to define a path to tell the script whre to find it. I have a script...
1
by: Phillip B Oldham | last post by:
I'm sure I'll soon figure out how to find these things out for myself, but I'd like to get the community's advice on something. I'm going to throw together a quick project over the weekend: a...
4
by: Quill_Patricia | last post by:
I have a Python script which is used to load data into a database. Up to now this script has been run by customers from the Windows command prompt using "python edg_loader.pyc". Any error messages...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.