hexagon logo

Simple input in python script

Hello everyone, i am learning python, and trying simple programs using python in Adams.
My problem is how to ask for input string:
 
Something like:
name=input()
 
is giving error such:
 
File "<string>", line 1, in <module>
EOFError: EOF when reading a line
 
or macros in adams python should be just script without input?
 
Jozef
  • Hi Chris,
     
    Yes: that Qt method should work just fine. We're not going to officially support all of these Qt calls from Python but it is all documented in places like this:
    where you can see that there are methods for:
    • getInt()
    • getDouble()
    • getText()
     
    At a higher level we recognize that it needs to be easier to:
    • Get input into a python script, preferably from a nice (qt?) dialog box.
    • pass info back/forth from cmd to python.
     
    I'm not the person who can promise anything here, but I can forward your thoughts to our Product Development and Product Management groups. They understand this need and your input will be another vote to get this done..
     
    Thanks,
    Kent