473,386 Members | 1,835 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,386 software developers and data experts.

how to use Dispatch to open an application in win32com.client

Hi'
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1

But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.

Feb 17 '07 #1
4 16908
En Fri, 16 Feb 2007 23:36:26 -0300, vithi <vi*****@hotmail.comescribió:
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1

But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.
The above code is used to launch a COM server registered under the name
"Excel.Application" and then control it. If you don't know what a COM
server is, surely your application can't be used this way.

For launching another program, perhaps sending it some text, and capturing
its output, look at the subprocess module. If you are only interested in
executing it, with no additional communication, os.system() may be enough.

--
Gabriel Genellina

Feb 17 '07 #2
En Fri, 16 Feb 2007 23:36:26 -0300, vithi <vi*****@hotmail.comescribió:
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1

But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.
The above code is used to launch a COM server registered under the name
"Excel.Application" and then control it. If you don't know what a COM
server is, surely your application can't be used this way.

For launching another program, perhaps sending it some text, and capturing
its output, look at the subprocess module. If you are only interested in
executing it, with no additional communication, os.system() may be enough.

--
Gabriel Genellina

Feb 17 '07 #3
Hi
Since I haven't see any help or tutorial on com there is a application
is installed in the server I am login to the server then what code do
I have to implement to launch the application registered in a server.
how do I write a code to tell my computer to go in to the perticular
server and launch program "XYZ "

do you think this code alone enough to go and look for xyz
application in the server, I don't get it
Give me any sample code or more help. It help me a lot.
object = win32com.client.Dispatch("xyz.Application")
On Feb 16, 11:56 pm, "Gabriel Genellina" <gagsl...@yahoo.com.ar>
wrote:
En Fri, 16 Feb 2007 23:36:26 -0300, vithi <vith...@hotmail.comescribió:
I am trying to launch an application. When I try like that
When I try like that Excel is opening
import win32com.client
object = win32com.client.Dispatch("Excel.Application")
object.Visible = 1
But when I try my application which is QeepIt.exe
which is in the c:\ drive it is not running
Any body tell me how to give path to open an exectable application in
Dispatch modules
I try like that
object = win32com.client.Dispatch("c:\Folder\QeepIt.exe")
It give an error.

The above code is used to launch a COM server registered under the name
"Excel.Application" and then control it. If you don't know what a COM
server is, surely your application can't be used this way.

For launching another program, perhaps sending it some text, and capturing
its output, look at the subprocess module. If you are only interested in
executing it, with no additional communication, os.system() may be enough.

--
Gabriel Genellina

Feb 17 '07 #4
En Sat, 17 Feb 2007 17:47:23 -0300, vithi <vi*****@hotmail.comescribió:
Hi
Since I haven't see any help or tutorial on com there is a application
is installed in the server I am login to the server then what code do
I have to implement to launch the application registered in a server.
how do I write a code to tell my computer to go in to the perticular
server and launch program "XYZ "
Try to explain a bit better what do you want to do.
What is "the server"?
Do you want to open and execute a program on "another" computer?
Or is it on the "same" computer?
do you think this code alone enough to go and look for xyz
application in the server, I don't get it
Give me any sample code or more help. It help me a lot.
object = win32com.client.Dispatch("xyz.Application")
Does the manual for "xyz" say that it is a COM application?
Did someone told you that "xyz" works that way?
Did you find "xyz" actually registered as a COM application?
If not, forget about that line, won't work at all.

--
Gabriel Genellina

Feb 17 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Nicolson | last post by:
Hi, I have been successfully using iTunes' COM interface with Python using either of the following lines successfully: iTunes = win32com.client.gencache.EnsureDispatch("iTunes.Application")...
3
by: muttu2244 | last post by:
Hi all Am trying to read an html page using win32com in the following way. from win32com.client import Dispatch ie = Dispatch("InternetExplorer.Application")
5
by: kbperry | last post by:
On my machine, this runs fine, but when I try to run it on someone elses machine it blows up with an attribute error: <code> import win32com.client, pythoncom ...
3
by: tyler.schlosser | last post by:
Hi there, I am trying to launch a program called AmiBroker using the command: AB = win32com.client.Dispatch("Broker.Application") However, I have a dual-core CPU and would like to launch two...
4
by: mirandacascade | last post by:
O/S : Win2K vsn of Python: 2.4 Hoping to find information that provide information about error messages being encountered. Pythonwin session: Traceback (most recent call last): File...
0
by: vithi | last post by:
Hi' I am trying to launch an application. When I try like that When I try like that Excel is opening import win32com.client object = win32com.client.Dispatch("Excel.Application") object.Visible...
2
by: Ray | last post by:
Hi, I need to use cell's background color. when I record a macro from excel, it shows: Rows("7:7").Select With Selection.Interior .ColorIndex = 8 .Pattern = xlSolid
1
by: SPJ | last post by:
Sorry, forgot to mention Subject in my earlier post, hence reposting. ------------ I am writing a script which need's to convert an excel file to csv (text) format. For that I am using the...
3
by: Amelie Lesser | last post by:
Hello, I'm trying to use the in32com.client for writing into Excel with Dispatch() (on a windows machine using python 2.7.1). I downloaded pywin from http://sourceforge.net/projects/pywin32/ into...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.