Re: Can't seem to start on this

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

  1. Kene Meniru

    Kene Meniru Guest

    Mitya Sirenef wrote:


    >
    > Where is snap_size from? Where is LinearMark from? You don't need to
    > instantiate LinearMark in B, do it in A.
    >


    I want to hide as much of the python syntax from the file "A" so the user
    just concentrates on using the classes as illustrated. snap_size is a global
    setting. LinearMark is a class in module "C" described as LMark but with the
    interface class as LinearMark in "B".

    > What error do you get when you instantiate LinearMark in A? Please
    > paste.
    >


    I am no longer getting errors. Am able to use the interface class described
    in "B" as follows:

    class Trogg(object):
    """
    """

    def __init__(self, ogle1, ogle2):
    """
    """
    self.ogle1 = ogle1
    self.ogle2 = ogle2
    print ogle1
    print ogle2


    In "A" I have the following:

    from buildes import Trogg

    Trogg("froken", "groky")


    I now get the proper output from running "A" which is:

    froken
    groky


    I guess if I save the instantiation of each LinearMark in "B" using perhaps
    a dictionary, I will be able to create as many as I want in "A" this way?

    > If LinearMark is imported in from C, you can do:
    >
    > B.py
    > from C import LinearMark
    >
    > A.py
    > from B import LinearMark
    >
    > lmark = LinearMark(name)
    > lmark.put(...)
    >
    > Or do you want to use class method of LinearMark?
    >
    > Since you don't provide any code, it's really hard to tell what you're
    > doing....
    >
    > HTH, -m
    >

    Sorry, my problem is not so clear. I hope the information I have provided
    above will help you understand more. Thanks.
    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. Kene Meniru

    Can't seem to start on this

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

    Re: Can't seem to start on this

    Mitya Sirenef, Jan 3, 2013, in forum: Python
    Replies:
    0
    Views:
    164
    Mitya Sirenef
    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:
    132
    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:
    154
    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:
    153
    D'Arcy J.M. Cain
    Jan 3, 2013
Loading...

Share This Page