I'm just learning python and decided to make a real super simple program on a PC using wxwidget. I wrote the code and saved it in .py format. What next to do so that the program starts when it starts up, otherwise I click on the file and enter the command line and crash?

import wx app = wx.App() wnd = wx.Frame(None, wx.ID_ANY, "I'm the title") wnd.Show(True) app.MainLoop() 
  • one
    Run the application from the command line. - ArchDemon

1 answer 1

The first method is via the command line. Sequencing:

1) Open command prompt ( cmd for Win or terminal for MacOS / Linux)

2) using the cd command, go to the directory with your script

3) run it with the command > python script_name.py

The second way through various IDE and text editors. For example, open the script in Sublime Text 3 and press ctrl + B (cmd + B on the poppy)