Python and Trelis/Cubit

General topics about Trelis/Cubit, such as localization, GUI, etc.

Python and Trelis/Cubit

Postby Trelis User » Tue Mar 05, 2013 9:05 am

I’m trying to run a python script to make a cubit grid. Some online
examples say I need to “import cubit”, but when I try this I get an
error message saying “no module named cubit”. I poked around a little
bit, but didn't find a cubit module for python on my machine.
Trelis User
 
Posts: 6
Joined: Wed Jan 09, 2013 12:58 pm

Re: Python and Trelis/Cubit

Postby csimsoft Moderator » Tue Mar 05, 2013 9:09 am

In order for python to find Trelis or Cubit, you'll need to add the path to the
cubit.py file to your PYTHONPATH. For example, if the cubit.py file is
in /projects/cubit/bin, then you'd do:

export PYTHONPATH=/projects/cubit/bin:$PYTHONPATH

after that you should be able to start python and successfully import cubit.
csimsoft
csimsoft Moderator
 
Posts: 237
Joined: Tue Feb 14, 2012 5:59 pm
Location: American Fork, UT


Return to General Topics

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron

Search / Mark

User Control Panel

Login

Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 50 on Mon Feb 23, 2015 7:54 pm

Users browsing this forum: Google [Bot] and 1 guest