STAAD.Pro Help

OS. Start Your Python Project

This quick set of steps demonstrates how to set up your workspace for a Python project.

  1. In Visual Studio Code, save your new workspace to a convenient location. For example, C:/OS_Py/OpenSTAAD_Python_Tutorial.workspace. The workspace in Visual Studio Code serves as your working folder for saving and executing code.
  2. Create a new file.
  3. Save the file with a ".py" file extension. This automatically instructs Visual Studio Code to interpret the input as Python.
    Note: If you did not previously install the Python extension, then the program prompts you to do so. Also, if you have not previously installed a linter and code completion option, then the program prompts you to do so. These are recommended.
  4. In the main editor window, begin typing commands. For example, type print("Hello World!").
  5. Select the Run tool to execute your code. The terminal will open and display the results.
  6. Save your code.
While having your computer return "Hello World!" may be a classic example of a first program, it is not a very practical tool. However, you now have a file set up to create a more useful OpenSTAAD project in your next example.