python module in run in place simulator.
08 Jan 2015 22:00 #54778
by eslavko
python module in run in place simulator. was created by eslavko
Hello...
I have linuxcnc installed as run in place with simulator in ubuntu 14.04 without rtai. There are no machine attached.
But I wan't to write/test external module in python but python can't find library?
I just do test with example
but got:
I assume that python module should be somehow installed or....
Slavko.
I have linuxcnc installed as run in place with simulator in ubuntu 14.04 without rtai. There are no machine attached.
But I wan't to write/test external module in python but python can't find library?
I just do test with example
import sys
import linuxcnc
try:
s = linuxcnc.stat() # create a connection to the status channel
s.poll() # get current values
except linuxcnc.error, detail:
print "error", detail
sys.exit(1)
for x in dir(s):
if not x.startswith('_'):
print x, getattr(s,x)
but got:
Traceback (most recent call last):
File "emctest.py", line 2, in <module>
import linuxcnc
ImportError: No module named linuxcnc
------------------
(program exited with code: 1)
Press return to continue
I assume that python module should be somehow installed or....
Slavko.
Please Log in or Create an account to join the conversation.
08 Jan 2015 22:32 - 08 Jan 2015 22:32 #54780
by ArcEye
Does RIP-DIR/lib/python/linuxcnc.so exist in a simulator build?
What is your environment set to? (printenv > env.txt)
Replied by ArcEye on topic python module in run in place simulator.
But I wan't to write/test external module in python but python can't find library?
Does RIP-DIR/lib/python/linuxcnc.so exist in a simulator build?
What is your environment set to? (printenv > env.txt)
Last edit: 08 Jan 2015 22:32 by ArcEye.
Please Log in or Create an account to join the conversation.
08 Jan 2015 23:16 #54785
by eslavko
Replied by eslavko on topic python module in run in place simulator.
Hello..
Does RIP-DIR/lib/python/linuxcnc.so exist in a simulator build?
Yes. they exists
Does RIP-DIR/lib/python/linuxcnc.so exist in a simulator build?
Yes. they exists
XDG_VTNR=7
LC_PAPER=sl_SI.UTF-8
pwr_inc=/usr/pwrrt/inc
LC_ADDRESS=sl_SI.UTF-8
XDG_SESSION_ID=c1
SELINUX_INIT=YES
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/slavko
LC_MONETARY=sl_SI.UTF-8
CLUTTER_IM_MODULE=xim
SESSION=ubuntu
GPG_AGENT_INFO=/run/user/1000/keyring-P8ZPtD/gpg:0:1
TERM=xterm
VTE_VERSION=3409
XDG_MENU_PREFIX=gnome-
SHELL=/bin/bash
NEMO_SCRIPT_SELECTED_FILE_PATHS=
WINDOWID=62914572
LC_NUMERIC=sl_SI.UTF-8
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/2151
jdk_home=/usr/local//bin
GTK_MODULES=overlay-scrollbar:unity-gtk-module
pwrp_db=/pwrp/common/db
pwrb_root=/usr/pwrrt
pwr_doc=/usr/pwrrt/doc
USER=slavko
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
LC_TELEPHONE=sl_SI.UTF-8
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
pwrp_load=/pwrp/common/load
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
pwrp_log=/pwrp/common/log
SSH_AUTH_SOCK=/run/user/1000/keyring-P8ZPtD/ssh
SESSION_MANAGER=local/podstresnik:@/tmp/.ICE-unix/2334,unix/podstresnik:/tmp/.ICE-unix/2334
NEMO_SCRIPT_NEXT_PANE_SELECTED_URIS=
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
pwrp_inc=/pwrp/common/inc
DESKTOP_SESSION=ubuntu
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/pwrrt/exe:/pwrp/x86_linux/exe:/usr/local//bin:/home/slavko/avr-gcc/bin
QT_IM_MODULE=ibus
QT_QPA_PLATFORMTHEME=appmenu-qt5
pwrp_exe=/pwrp/x86_linux/exe
LC_IDENTIFICATION=sl_SI.UTF-8
PWD=/home/slavko/xx
NEMO_SCRIPT_SELECTED_URIS=
JOB=dbus
XMODIFIERS=@im=ibus
LANG=en_US.UTF-8
pwrp_lis=/pwrp/x86_linux/lis
GDM_LANG=en_US
pwra_db=/usr/pwrp/adm/db
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
jdk=/usr/local/
LC_MEASUREMENT=sl_SI.UTF-8
COMPIZ_CONFIG_PROFILE=ubuntu
NEMO_SCRIPT_NEXT_PANE_CURRENT_URI=
IM_CONFIG_PHASE=1
pwrp_obj=/pwrp/x86_linux/obj
PWR_BUS_ID=999
pwrp_root=/pwrp
GDMSESSION=ubuntu
pwr_load=/usr/pwrrt/load
SESSIONTYPE=gnome-session
SHLVL=1
HOME=/home/slavko
XDG_SEAT=seat0
NEMO_SCRIPT_NEXT_PANE_SELECTED_FILE_PATHS=
LANGUAGE=en_US
pwr_lib=/usr/pwrrt/lib
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
pwrp_web=/var/www
LOGNAME=slavko
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-fSTOhnSXlE
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/
NEMO_SCRIPT_WINDOW_GEOMETRY=858x853+0+24
QT4_IM_MODULE=xim
pwrp_lib=/pwrp/x86_linux/lib
NEMO_SCRIPT_CURRENT_URI=file:///home/slavko/xx
LESSOPEN=| /usr/bin/lesspipe %s
PKG_CONFIG_PATH=:/usr/local/lib/pkgconfig
pwr_obj=/usr/pwrrt/obj
INSTANCE=
TEXTDOMAIN=im-config
XDG_RUNTIME_DIR=/run/user/1000
DISPLAY=:0.0
XDG_CURRENT_DESKTOP=Unity
GTK_IM_MODULE=ibus
LESSCLOSE=/usr/bin/lesspipe %s %s
LC_TIME=sl_SI.UTF-8
TEXTDOMAINDIR=/usr/share/locale/
pwr_lis=/usr/pwrrt/lis
pwr_exe=/usr/pwrrt/exe
LC_NAME=sl_SI.UTF-8
XAUTHORITY=/home/slavko/.Xauthority
COLORTERM=gnome-terminal
_=/usr/bin/printenv
Please Log in or Create an account to join the conversation.
08 Jan 2015 23:32 #54786
by ArcEye
Replied by ArcEye on topic python module in run in place simulator.
Hi
Well since I can't see any of these in your ENV
TCLLIBPATH=
LD_LIBRARY_PATH=
PYTHONPATH=
I assume you have not run . ./scripts/rip-environment or are executing from outside the shell session that did use that script
I have never used a pure simulator from a RIP, bur can't imagine there is any less need to set the environment for the RIP
regards
Well since I can't see any of these in your ENV
TCLLIBPATH=
LD_LIBRARY_PATH=
PYTHONPATH=
I assume you have not run . ./scripts/rip-environment or are executing from outside the shell session that did use that script
I have never used a pure simulator from a RIP, bur can't imagine there is any less need to set the environment for the RIP
regards
The following user(s) said Thank You: eslavko
Please Log in or Create an account to join the conversation.
08 Jan 2015 23:41 #54788
by eslavko
Replied by eslavko on topic python module in run in place simulator.
hello...
just figured itself that I run scripts/rip-environment in one terminal where I run linuxcnc, but not in the other one where I run python script.
Problem solved. Thanks.
just figured itself that I run scripts/rip-environment in one terminal where I run linuxcnc, but not in the other one where I run python script.
Problem solved. Thanks.
Please Log in or Create an account to join the conversation.
Time to create page: 0.083 seconds