Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36033
| From | Kene Meniru <Kene.Meniru@illom.org> |
|---|---|
| Subject | Can't seem to start on this |
| Followup-To | gmane.comp.python.general |
| Date | 2013-01-02 23:32 -0500 |
| Organization | illom.org |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16.1357187576.2939.python-list@python.org> (permalink) |
Followups directed to: gmane.comp.python.general
This sounds so simple but being new to python I am finding it hard to get started. I want to create a module which I will call "B". There will be other modules called "C", "D", etc, which will most likely be imported in "B". Then I want the user to import "B" ONLY into another file I will call "A" in which commands such as the following will be entered: snap_size = 10 LinearMark(name) LinearMark.put(name, length, rotation, (x,y,z)) The file "A" allows the user to enter commands that provide global variables as well as to use classes provided in modules "C", "D", etc, in the manner shown in the sample above. For example snap_size is a global setting. LinearMark(name) creates a linear mark of the provided name. LinearMark.put(...) places the LinearMark object using the provided parameters, etc. How can I make this possible? I am guessing I have to instantiate the classes in file "B" but typing LinearMark(name) in file "A" generates an error. Eventually I will provide a gui but I want to separate usage so there is no dependence on the gui to run this application. Please help.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Can't seem to start on this Kene Meniru <Kene.Meniru@illom.org> - 2013-01-02 23:32 -0500
csiph-web