Python Script Tutorial: Getting Started

From KratosWiki
Jump to: navigation, search

The first step n order to interact with Kratos' python structure is to create a system variable on the python path to Kratos. That is, to establish a link between python and Kratos. To do this, you need to have them installed first.

To create the path on Windows 7 and having installed Kratos through GiD, follow these steps:

  • Go to Start Menu > Right click on Computer > Properties > Advanced System Settings > Environment Variables
  • On System variables, click New
  • Write the variable name as PYTHONPATH
  • On Variable value you need to paste the Kratos path of your computer:
    • Go to the GiD folder. For example, it culd be in C:\Program Files\GiD
    • Inside the GiD folder, you should follow \problemtypes\kratos.gid\Kratos\kratos.gid\kratos. There are many subfolders here and can be confusing. The correct one is just when you can see the KratosMultiphysics folder.
    • Copy the current path and paste it as variable name
  • Click Accept. Now you can go to the next tutorial.
Personal tools