← Back to team overview

yade-users team mailing list archive

Re: [Question #231437]: question about YADE doing work with PYTHON

 

Question #231437 on Yade changed:
https://answers.launchpad.net/yade/+question/231437

Description changed to:
Dear all users:
     There is now a very long script for me to run my simulation, So I want to divide it into some small py modules and use "import" command to call these modules one by one. At the first, I have employed some small cases to test steps. There are two py modules that can be used, one is the basic command mudule, which can be described as that(named exam.py):
###################################################################################################
def print():

    print ('hello')
###################################################################################################
Another is executive module, which can be described as that(named test.py):
###################################################################################################
import exam

exam.print()

print ('hello')
###################################################################################################

My procedures can be shown one bu one as:
(1).start the terminal of Ubuntu and specify the path of folder including these two scripts.
(2).In this shell, input "yade-stable test.py". And the shell notices that "no modules ex"
(3).Then in this shell, input "python test.py". Nothing is wrong at this time and the shell shows that:
####################################################################################################
hello
hello
##################################################################################################

I do not know what is wrong with my operations and how can I do only for
my purpose. Seeking your help!

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.