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 8254051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:04:43+00:00 2026-06-08T01:04:43+00:00

How do I have to configure so that I don’t have to type python

  • 0

How do I have to configure so that I don’t have to type python script.py but simply script.py in CMD on Windows?

I added my python directory to %PATH% that contains python.exe but still scripts are not run correctly.

I tried it with django-admin.py Running django-admin.py startproject mysite gives me
Type 'django-admin.py help <subcommand>' for help on a specific subcommand.
Using python in front of it processes the command correctly.

What’s the problem here?

  • 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-08T01:04:44+00:00Added an answer on June 8, 2026 at 1:04 am
    C:\> assoc .py=Python
    C:\> ftype Python="C:\python27\python.exe %1 %*"
    

    Or whatever the relevant path is – you can also set command line args using ftype.


    In order to make a command recognized without having to give the suffix (.py), similar to how it works for .exe files, add .py to the semi-colon separated list of the (global) PATHEXT variable.

    ETA 2017-07-27

    Seems like this is still getting eyeballs, wanted to elevate a useful comment for Win10 users (from @shadowrunner):

    For me to get it work under Win10 the actual command was (note the placement of the quotes):

    C:\> ftype Python="c:\Anaconda2\python.exe" "%1" %*
    

    ETA 2019-02-01

    Talk about evergreen!

    First of all, if you’re newly installing Python, I highly recommend reviewing the answer by @NunoAndré .

    Secondly, to clarify something from a recent comment, please note: you must do both parts (assoc and ftype), or use a pre-existing association label in the ftype command.

    By default, at least for Python 3.7 under Windows 8.1, the association for .py is Python.File, so performing the ftype command I wrote above will not work correctly unless the association is first changed. Or you can just use ftype and give the default association instead. Up to you.

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

Sidebar

Related Questions

I have an xml file that I want to configure using a bash script.
I have an R package on github that uses a configure script (since some
Quite new to this but i have created a SQL script that groups by
I have 3rd parties libraries that don't placed under /usr/lib. I defined their path
Is is possible ot configure Chainsaw to read log files that have been customized
I have a little problem with autoconf, I know that you can use configure.ac
I have IIS 7.5 that configure for work with x64 applications. I want use
I have a WCF service that is hosted in a windows application. The service
I have an BufWritePre hook added to my .vimrc that trims trailing whitespace before
I have my first app, not that big, but it is the first step.

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.