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

  • Home
  • SEARCH
  • 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 8167729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:17:29+00:00 2026-06-06T20:17:29+00:00

Hello Guys! I started learning python GUI development. Let’s say I have this script:

  • 0

Hello Guys! I started learning python GUI development. Let’s say I have this script:

import wx

app = wx.App()

win = wx.Frame(None, title="Simple Editor", size=(410, 335))
bkg = wx.Panel(win)

loadButton = wx.Button(bkg, label="Open")
saveButton = wx.Button(bkg, label="Save")
fileName = wx.TextCtrl(bkg)
contents = wx.TextCtrl(bkg, style=wx.TE_MULTILINE | wx.HSCROLL)

hbox = wx.BoxSizer()
hbox.Add(fileName, proportion=1, flag=wx.EXPAND)
hbox.Add(loadButton, proportion=0, flag=wx.LEFT, border=5)
hbox.Add(saveButton, proportion=0, flag=wx.LEFT, border=5)

vbox = wx.BoxSizer(wx.VERTICAL)
vbox.Add(hbox, proportion=0, flag=wx.EXPAND | wx.ALL, border=5)
vbox.Add(contents, proportion=1, flag=wx.EXPAND | wx.LEFT |wx.BOTTOM | wx.RIGHT, border=5) 

bkg.SetSizer(vbox)
win.Centre()
win.Show()
app.MainLoop()

This script does nothing, just shows windows and etc. To run this script, basically I do from terminal by:

python gui_test.py

How can I run it directly, without invoking terminal, I mean running just clicking with mouse?

  • 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-06T20:17:31+00:00Added an answer on June 6, 2026 at 8:17 pm
    1. Rename gui_test.py -> gui_test.pyw
    2. Double click

    .pyw is the fancy windows way of telling the python script to execute without also opening a console


    For linux systems, make the script executable:

    chmod a+x gui_test.py
    

    Also, don’t forget to include the “shebang” line at the top of any executable script. This allows you to run the script without having to specify the interpreter:

    #!/usr/bin/env python
    

    Then from a terminal:

    ./gui_test.py
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello Guys! Let's say I have some page which I got with this script:
Hello guys I have a map like this http://sinanisler.com/demo/map/ and as you can see
Hello guys i have a problem streaming PDF files with php, i'm using this
hello guys i have this function for focus : fav[jj].setOnFocusChangeListener(new View.OnFocusChangeListener() { public int
hello guys im using this second part of pagination script to show pagination; <?
Hello guys i am new about this implementing facebook into my app.I check developer's
Hello Guys! I want to access some web page through python script. The url
Hello guys i have dataform in silverlight 4 project item source is: ItemsSource={Binding Data,
Hello guys sorry if the question looks stupid to you. i have 3 tables
Hello Guys I am trying to figure out why i am gettings this error

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.