Understanding coding - gscreen/gmoccapy.py

More
01 Sep 2015 17:50 - 01 Sep 2015 17:50 #61987 by racedirector
Ok, I am starting to get into my gui developement and have been looking at gscreen.py and gomoccapy.py. Most of I understand although I am not an "official" type python developer (have programmed in the past though) however I am a little confused by these statements in the mentioned files:
from gscreen import emc_interface
from gscreen import mdi
from gscreen import preferences

and
# as now we know the libdir path we can import our own modules
from gmoccapy import widgets  # a class to handle the widgets
from gmoccapy import player  # a class to handle sounds
from gmoccapy import notification  # this is the module we use for our error handling
from gmoccapy import preferences  # this handles the preferences
from gmoccapy import getiniinfo  # this handles the INI File reading so checking is done in that module
from gmoccapy import dialogs  # this takes the code of all our dialogs

What I am not understanding is how can things be imported from the file I am looking at, namely gscreen.py or gmoccapy.py? I understand things like importing linuxcnc as it is a library but this has me confused and I hope someone can shed some light on it if it is possible.

Cheers
Last edit: 01 Sep 2015 17:50 by racedirector.

Please Log in or Create an account to join the conversation.

More
01 Sep 2015 18:17 #61988 by racedirector
Found them... in pyshared. All good now. pyshared/<app name>/ is a library of files for that particular app. Very similar to what I am used to only framed differently

Please Log in or Create an account to join the conversation.

More
08 Sep 2015 04:07 #62222 by newbynobi
You are wellcome.

Norbert

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum