Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8146961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:11:12+00:00 2026-06-06T14:11:12+00:00

Possible Duplicate: How to make python scripts executable on Windows? Set up Python on

  • 0

Possible Duplicate:
How to make python scripts executable on Windows?
Set up Python on Windows to not type python in cmd

I have a python script under windows. Each time, I need to run using python *.py.

Can I run just as *.py without specify python?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:11:14+00:00Added an answer on June 6, 2026 at 2:11 pm

    Do you want to run it from the command line or the desktop?

    If you set the file association for .py files (this is usually done during the install) you should be able to just double-click on the .py file on the desktop to get it to run.

    I don’t know of a way to avoid typing python with the command line (and this if it’s on the PATH already, otherwise one would have to specify the whole path to the python executable).

    It would be nice if we could do something similar like under Linux/Unix with #/usr/bin/env python directive in the script, but I don’t think this exists for Windows unfortunately.

    You didn’t specify what version of Windows you are running, but in case you are interested in assigning/changing file associations, here are Microsoft’s instructions on doing that with XP. Very similar with other versions of Windows .. googling will bring up a bunch of hits for how to change file associations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Python urllib2 Progress Hook I have a script which uploads a file
Possible Duplicate: How can I make an EXE file from a Python program? i
Possible Duplicate: C# - Make a borderless form movable? Drag borderless windows form by
Possible Duplicate: How to make return key on iphone make keyboard disappear? I have
Possible Duplicate: How can I make XSLT work in chrome? I have this XML
Possible Duplicate: How can I make a horizontal ListView in Android? I have used
Possible Duplicate: c# Make font italic and bold How do i set the font
Possible Duplicate: Why does defining getitem on a class make it iterable in python?
Possible Duplicate: python: how to encrypt a file? I'm trying to make application that
Possible Duplicate: Flatten (an irregular) list of lists in Python I have the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.