Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: Can't seem to start on this (http://www.velocityreviews.com/forums/t956079-re-cant-seem-to-start-on-this.html)

Kene Meniru 01-03-2013 05:32 AM

Re: Can't seem to start on this
 
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.



All times are GMT. The time now is 07:25 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57