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

autoexecution in Windows

How does one make a Python program auto-execute in Windows?

Earl

Jul 18 '05 #1
8 1728
Le Mon, 07 Mar 2005 13:25:35 -0700, Earl Eiland a écrit :
How does one make a Python program auto-execute in Windows?

Earl

write a virus ? :-)

What do you mean by « auto-execute » ?

Regards
Jul 18 '05 #2
In Linux, if I make the first line #!/path/to/Python, all I have to do
to execute the program is type ./FileName (assuming my pwd is the same
as FileName). what's the Windows equivalent?
Earl

On Mon, 2005-03-07 at 13:36, F. Petitjean wrote:
Le Mon, 07 Mar 2005 13:25:35 -0700, Earl Eiland a écrit :
How does one make a Python program auto-execute in Windows?

Earl

write a virus ? :-)

What do you mean by « auto-execute » ?

Regards


Jul 18 '05 #3
rbt
Earl Eiland wrote:
How does one make a Python program auto-execute in Windows?

Earl


No program (python or other) can just arbitrarily execute. A user has to
click it or a cron-like utility (Task Scheduler) has to execute it at a
set time. registry entries (such as run) can execute programs too. Also,
proper Windows services can be configured to start at boot.

Again, nothing can just arbitrarily execute. If it could, viruses would
be a *nightmare*
Jul 18 '05 #4
rbt
Earl Eiland wrote:
In Linux, if I make the first line #!/path/to/Python, all I have to do
to execute the program is type ./FileName (assuming my pwd is the same
as FileName). what's the Windows equivalent?
Earl

On Mon, 2005-03-07 at 13:36, F. Petitjean wrote:
Le Mon, 07 Mar 2005 13:25:35 -0700, Earl Eiland a écrit :
How does one make a Python program auto-execute in Windows?

Earl


write a virus ? :-)

What do you mean by « auto-execute » ?

Regards



Look at the 'pathext' variable under the system's environmental
variables. Add .py and .pyw to that and you're good to go.
Jul 18 '05 #5
Earl Eiland wrote:
How does one make a Python program auto-execute in Windows?


Use any of the mechanisms to make an arbitrary program auto-execute
(do you want on boot, on login, or what?), and use
c:\pythonXY\python.exe as the executable name; use the script name
as the first argument.

Regards,
Martin
Jul 18 '05 #6
O.K. I stand corrected. "auto-execute is the wrong term.
Earl

On Mon, 2005-03-07 at 14:03, rbt wrote:
Earl Eiland wrote:
How does one make a Python program auto-execute in Windows?

Earl


No program (python or other) can just arbitrarily execute. A user has to
click it or a cron-like utility (Task Scheduler) has to execute it at a
set time. registry entries (such as run) can execute programs too. Also,
proper Windows services can be configured to start at boot.

Again, nothing can just arbitrarily execute. If it could, viruses would
be a *nightmare*


Jul 18 '05 #7

Earl Eiland wrote:
How does one make a Python program auto-execute in Windows?

Earl


You need to have files with .py or .pyo or .py registered to open with
the python interpreter. In Windows Explorer, choose the menu item
Tools->Folder Options and select the File Types tab to see how
registered file types are set up.

On my system, for the extension .py, the "open" action has an
application string of C:\Python23\python.exe "%1" %*. For .pyw files
it's C:\Python23\pythonw.exe "%1" %*.

I can double click on a .py file and it executes, or use the command
prompt.

I believe if you install the Activestate distribution it sets up the
file registrations automatically.

Bill

Jul 18 '05 #8
Bill wrote:
I can double click on a .py file and it executes, or use the command
prompt.

I believe if you install the Activestate distribution it sets up the
file registrations automatically.


As does the standard Windows distribution from python.org.

-Peter
Jul 18 '05 #9

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

Similar topics

2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
3
by: Christian McArdle | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.os.ms-windows.programmer.64bit This is a formal Request For Discussion (RFD) to create comp.os.ms-windows.programmer.64bit as an unmoderated...
1
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. I'm having trouble getting the code that I've written to work, can anyone shed some light as to where I'm...
0
by: Scott Davies | last post by:
Hi, I'm looking for some help on a small program that I'm trying to develop in VB.NET. The program I'm trying to develop needs to be able to do the following: - Select remote server -...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
2
by: sambo251 | last post by:
After running a few updates I get this very annoying "Windows Installer" error #1706 that will ne go away! It keeps saying that it cannot find the file "instantsharedevices.msi", that it is on...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.