Can't seem to start on this

Discussion in 'Python' started by Kene Meniru, Jan 3, 2013.

  1. Kene Meniru

    Kene Meniru Guest

    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.
     
    Kene Meniru, Jan 3, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mitya Sirenef

    Re: Can't seem to start on this

    Mitya Sirenef, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    176
    Mitya Sirenef
    Jan 3, 2013
  2. Kene Meniru

    Re: Can't seem to start on this

    Kene Meniru, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    128
    Kene Meniru
    Jan 3, 2013
  3. Mitya Sirenef

    Re: Can't seem to start on this

    Mitya Sirenef, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    141
    Mitya Sirenef
    Jan 3, 2013
  4. Kene Meniru

    Re: Can't seem to start on this

    Kene Meniru, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    161
    Kene Meniru
    Jan 3, 2013
  5. D'Arcy J.M. Cain

    Re: Can't seem to start on this

    D'Arcy J.M. Cain, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    163
    D'Arcy J.M. Cain
    Jan 3, 2013
Loading...

Share This Page