Access functions of a module from another module which itself imports the first module


HOME ยป Web Design

Sorry for the confusing title, I tried to fit as much of the
problem in the title.


The scenario:

I have a
module(say ModuleA) which contains class definitions of
some Tkinter GUI elements.
These elements also have certain
events/functions bound/binded with them(such as
'<Button-1>','<Button-2>'....

/>

Now there's another module(say ModuleB). This is the
main(core of the) program. In this module I import
ModuleA to use its objects. The objects of
ModuleA have a place in an array(say
Array1); and also there is another array(say

My setup


I have two modules installed:


/>
one takes an id and builds a product
collection from this using the id to lookup an
attribute-value pair (mod1)
The other
offers a way of narrowing a search down (mod2)
/>

The true url I am on is
/mod1/page/view/id/<id#>


Desired
outcome


To be able to pass the attribute-value as a
hidden field to the second module


Question



How do I access the object and functions from

Web Design

Let's consider 3 situations:


1) I write a pyhon module
in Eclipse (pydev) and run it Ctrl-F11. The module runs and I don't
have any control or access (AFAIK) to the module variables and
functions.


2) I have defined a python interpreter as an
external tool in Eclipse, so I can run it within Eclipse. It works
fine, but it does not have tab completion.


3) I open my
module with python IDLE (not eclipse) and press f5 (run). It runs on
the IDLE opened window and when it finishes I have all the variables
and functions form the module to play with.


So I have 2
questions:
a) how to enable, if possible, tab compl

Programming Languages

Sorry for the confusing title, I tried to fit as much of the
problem in the title.


The scenario:

I have a
module(say ModuleA) which contains class definitions of
some Tkinter GUI elements.
These elements also have certain
events/functions bound/binded with them(such as
'<Button-1>','<Button-2>'....

/>

Now there's another module(say ModuleB). This is the
main(core of the) program. In this module I import
ModuleA to use its objects. The objects of
ModuleA have a place in an array(say
Array1); and also there is another array(say

Web Design

I have a local module named tokenize.py, masks a
standard library module of the same name. I only discovered this when
I tried to import an external module (sklearn.linear_model), which in
turn does import tokenize and expects to get the standard
library module, but gets my local module instead.


This is
related to How to access a standard-library module in Python when
there is a local module with the same name?, but the setting is
different, because applying the above solution would require modifying
the external module.


An option would be to rename the
local tokenize.py, but I would prefer not to do so as
"tok

Programming Languages

In ajax.py, I have this import statement:


import
components.db_init as db

In
components/db_init.py, I have this import statement:


#
import locals from ORM (Storm)
from storm.locals import * />

And in components/storm/locals.py, it has
this:


from storm.properties import Bool, Int, Float,
RawStr, Chars, Unicode, Pickle
from storm.properties import List,
Decimal, DateTime, Date, Time, Enum
from storm.properties import
TimeDelta
from storm.references import Reference, ReferenceSet,
Proxy
from storm.database import create_database
fro
Programming Languages
So some background information... The device actually does work,
eventually. I turn it off, turn it back on, wait to see if it shows
up, if yes-> it works, else ->turn it off, turn it back on,
repeat;
The messages I get in the syslog are:
class="bbcode_container"> class="bbcode_description">Code:
Oct
26 12:54:35 hws kernel: [240876.491512] usb 3-3.1.3: >new
full-speed USB device number 19 using xhci_hcd
Oct 26 12:54:35
hws kernel: [240876.584808] usb 3-3.1.3: >New USB device found,
idVendor=0763, idProduct=2012
Oct 26 12:54:35 hws kernel:
[240876.584812] usb 3-3.1.3: >New USB device strin
Ubuntu

- Technology - Languages
+ Webmasters
+ Development
+ Development Tools
+ Internet
+ Mobile Programming
+ Linux
+ Unix
+ Apple
+ Ubuntu
+ Mobile & Tablets
+ Databases
+ Android
+ Network & Servers
+ Operating Systems
+ Coding
+ Design Software
+ Web Development
+ Game Development
+ Access
+ Excel
+ Web Design
+ Web Hosting
+ Web Site Reviews
+ Domain Name
+ Information Security
+ Software
+ Computers
+ Electronics
+ Hardware
+ Windows
+ PHP
+ ASP/ASP.Net
+ C/C++/C#
+ VB/VB.Net
+ JAVA
+ Javascript
+ Programming
Privacy Policy - Copyrights Notice - Feedback - Report Violation 2018 © BigHow