call Simulation Inspection

Asked by huanghe on 2011-02-20

Hi,there
when I read the Yade Document bzr2595, I find that there are some interfaces in yade simulation, such as Yade, Primary view, Simulation Inspection. And the Yade Controller can be invoked by yade.qt.Controller(), so I wonder how can I call Simulation Inspection out, what should I input, ask for your kind help, thank you very much!

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Anton Gladky
Solved:
2011-02-22
Last query:
2011-02-22
Last reply:
2011-02-22

yade.qt.Inspector()
You can call Inspertor from a Controller (Yade) window by click on a Inspect button.
(but I don't know if Inspector exist in bzr2595).

huanghe (kmy2009) said : #2

Just like the answer says, I tryed input "yade.qt.Inspector()", but it doesn't work, next is the result,
"Yade [4]: yade.qt.Inspector()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)

/usr/lib/yade-0.50/py/yade/__init__.pyc in <module>()
----> 1
      2
      3
      4
      5

AttributeError: 'module' object has no attribute 'Inspector'"

And, there isn't a Inspect button in Controller window in my yade, so I wonder what the reason is.

Another question, I want to edit the source code of some simulation in yade, how can I make it?

Need for your help, thank you very much!
PS: the information of my yade is as follows.

Welcome to Yade 0.50
TCP python prompt on localhost:9000, auth cookie `esdayc'
TCP info provider on localhost:21000

Well... so, Yade 0.50 haven't Simulation Inspector. Please, update to 0.6.x version, (or to trunk version).
And, what do you mean when to say "I want to edit the source code of some simulation in yade"?
Yade's models is a python scripts. You can see examples in examples dir. In order to edit that scripts you can use any text editor.

huanghe (kmy2009) said : #4

Firstly, thank you very much for your kind answer!

As for the edit of source code, I can just open the XXX.py document and then be able to edit them.

Because I am a newbie in Ubuntu, so I still ask for your help.

I find that there is a "yade-0.60.tar.bz2 (md5, sig) " at the website "https://launchpad.net/yade/+download"

so I download it and then I don't know how to install or update my yade to 0.60, so what should I input in the terminal to make it.

Thank you very much!

Anton Gladky (gladky-anton) said : #5

Hi,

I would recommend you to read yade documentation, installation section [1], it is written there how to install yade from source code.

If you decide to use 0.60 release, it is better to use 0.60.1 version [2] for now.
Also you can use pre-built packages, available on yade ppa [3]:

Anton

[1] https://www.yade-dem.org/doc/installation.html
[2] http://launchpad.net/yade/trunk/0.60/+download/yade-0.60.1.tar.bz2
[3] https://launchpad.net/~yade-pkg/+archive/stable

huanghe (kmy2009) said : #6

Thank you very much for your detailed answer !

As for part one which is the installation section. I did what the website says.

At first, things went well for the "Package" part. However, when I go to the "Download" part, I have download the "yade-0.60.1.tar.bz2 (md5, sig)", and uncompressed it. But when I type "bzr checkout lp:yade" into the terminal, it says "Permission denied (publickey). bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist. " So I don't know how to solve it, this maybe important.

As for part two which is the use of 0.60.1 version, I have download this version, but I have no idea to install it, so I wonder you can help me with this because I know little about the operation of Ubuntu.

As for part there which is about use of ppa, I have input these lines into the terminal,"sudo add-apt-repository ppa:yade-pkg/stable","sudo apt-get update", I don't know if it's OK now. Then I followed the lines of "Technical details about this PPA ", input these lines into the terminal,"deb http://ppa.launchpad.net/yade-pkg/stable/ubuntu lucid main deb-src http://ppa.launchpad.net/yade-pkg/stable/ubuntu lucid main",but the terminal says, "can not find the command 'deb' and 'deb-src'", I've no idea if this influences the further use of yade. You mean that I may install yade-0.60 in the way of ppa, I don't know how it operate. I do find that there exits a yade-0.60 version of lucid7 which uploaded by you, I don't know if it's OK for my system.

I know little about yade, but I am eager to learn it.

PS: The information of my Ubuntu is as follow.
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04.2 LTS
Release: 10.04
Codename: lucid

Additionally, my system language is not English but Chinese, I don't know if it matters for the normal use of yade.

Best Anton Gladky (gladky-anton) said : #7

Hi,

1. If you have downloaded yade-0.60.1.tar.bz2 and unpacked it, you _do not_ need to use any other bzr commands any more. Just go to "compilation" section [1].

2.
sudo add-apt-repository ppa:yade-pkg/stable
sudo apt-get update
sudo apt-get install yade-0.60

Those commands are enough to get working yade.
After that you can start the program, typing:
yade-0.60

[1] https://www.yade-dem.org/doc/installation.html#compilation

huanghe (kmy2009) said : #8

Thank you very much for your kind answer!

I am very exited to find my yade-0.60 works all owning for your help! Many thanks!

Still a little question, what does the line "sudo add-apt-repository ppa:yade-pkg/stable" mean? Because I used to type "sudo apt-get install yade-0.60" in the terminal, it didn't work, I wonder what the reason is.

Thank you very much for help a lot!

Anton Gladky (gladky-anton) said : #9

sudo add-apt-repository ppa:yade-pkg/stable
This line adds repository to your system, you have to do it just once
and you will be able to get all available updates automatically.
If the new yade version appears in this repository, you can install it
from Synaptic, aptitude or whatever you use.

sudo apt-get install yade-0.60
installs yade on your machine. You can install several yade versions at once.

Anton

On Tue, Feb 22, 2011 at 3:01 AM, huanghe
<email address hidden> wrote:
> Question #146069 on Yade changed:
> https://answers.launchpad.net/yade/+question/146069
>
>    Status: Answered => Open
>
> huanghe is still having a problem:
> Thank you very much for your kind answer!
>
> I am very exited to find my yade-0.60 works all owning for your help!
> Many thanks!
>
> Still a little question, what does the line "sudo add-apt-repository ppa
> :yade-pkg/stable" mean? Because I used to type "sudo apt-get install
> yade-0.60" in the terminal, it didn't work, I wonder what the reason is.
>
> Thank you very much for help a lot!
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

huanghe (kmy2009) said : #10

Thanks Anton Gladky, that solved my question.

huanghe (kmy2009) said : #11

Thank you very much for helping me, I have learned a lot from your answers.