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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:56:41+00:00 2026-06-10T02:56:41+00:00

Sorry, for the vague question, don’t know actually how to ask this nor the

  • 0

Sorry, for the vague question, don’t know actually how to ask this nor the rightful terminologies for it.

How to run a python script/bytecode/.pyc (any compiled python code) without going through the terminal. Basically on Nautilus: “on double click of the python script, it’ll run” or “on select then [Enter], it’ll run!”. That’s my goal at least.

When i check the “Allow executing of file as a program” then press [enter] on the file. It gives me this message:

Could not display “/home/ghelo/Music/arrange.pyc”.
There is no application installed for Python bytecode files.
Do you want to search for an application to open this file?

Using Ubuntu 12.04, by the way and has to be python 2, one of the packages doesn’t work on python 3. If there’s a difference between how to do it on the two version, include it, if it’s not to much t ask, thank you.

I know it doesn’t matter, but it’s a script auto renaming & arranging my music files. Guide me accordingly, stupid idiot 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-10T02:56:42+00:00Added an answer on June 10, 2026 at 2:56 am

    Adding ” #!/usr/bin/env python ” at the top of the .py file works! Hmm, although don’t appreciate the pop-up, but nevermind. 😛

    From PHPUG:

    You do not invoke the pyc file. It’s the .py file that’s invoked. Python is an interpreted language.

    A simpler way to make a python exectuable (explained):

    1) Add #!/usr/bin/env python at the top of your python executable file (eg. main.py) (it uses the default python – eg. if using arch, that’s py3 instead of py2. You can explicitly tell it to run python2/python3 by replacing python with it’s version: ex. python2.7)

    2) Write the code. If the script is directly invoked, __name__ variable becomes equal to the string ‘__main__’ thus the idiom: if __name__ == ‘__main__’:. You can add all the logic that relates to your script being directly invoked in this if-block. This keeps your executable importable.

    3) Make it executable ‘chmod +x main.py’

    4) Call the script: ./main.py args args

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

Sidebar

Related Questions

Sorry, this is a bad question. I don't even know what the title should
Sorry if this question is too vague, but I'd rather not muddy it's point
Sorry that the question of this problem might be a bit vague. I'm trying
Sorry if this question is dumb, I don't think it is because I can't
This may be a silly question and sorry for any confusing sentences.. I don't
(Sorry if it's a trivial question.) I have documents that looks like this (Python
I'm sorry this question is going to be a bit vague because I'm not
First of all, sorry if this question is a little vague and rambling! I'm
Sorry for vague question title. I've got a table containing huge list of, say,
Sorry for the vague question.. but I'm not sure quite what the problem is.

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.