Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36035
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'syntax': 0.03; 'output': 0.04; '"""': 0.05; '"c"': 0.07; 'python': 0.09; '"a"': 0.09; 'imported': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'def': 0.10; '"b"': 0.16; 'a.py': 0.16; 'b.py': 0.16; 'clear.': 0.16; 'dictionary,': 0.16; 'instantiate': 0.16; 'paste.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:start': 0.16; 'wrote:': 0.17; 'code,': 0.18; 'module': 0.19; 'import': 0.21; 'thanks.': 0.21; 'sorry,': 0.22; 'header :User-Agent:1': 0.26; 'guess': 0.27; 'errors.': 0.27; 'interface': 0.27; 'header:X-Complaints-To:1': 0.28; 'way?': 0.29; 'skip:_ 10': 0.29; 'class': 0.29; 'classes': 0.30; 'error': 0.30; 'file': 0.32; 'running': 0.32; 'print': 0.32; 'getting': 0.33; 'received:comcast.net': 0.33; 'problem': 0.33; 'to:addr:python- list': 0.33; 'described': 0.35; 'follows:': 0.35; 'received:org': 0.36; 'really': 0.36; 'but': 0.36; 'method': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'help': 0.40; 'save': 0.61; 'more.': 0.62; 'provide': 0.62; 'information': 0.63; 'header:Reply-To:1': 0.68; 'reply-to:no real name:2**0': 0.72; 'subject:this': 0.84; 'do:': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Kene Meniru <Kene.Meniru@illom.org> |
| Subject | Re: Can't seem to start on this |
| Followup-To | gmane.comp.python.general |
| Date | Thu, 03 Jan 2013 00:32:21 -0500 |
| Organization | illom.org |
| References | <kc31l4$27v$1@ger.gmane.org> <50E50D08.201@lightbird.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="ISO-8859-1" |
| Content-Transfer-Encoding | 7Bit |
| X-Gmane-NNTP-Posting-Host | c-69-143-75-245.hsd1.md.comcast.net |
| User-Agent | KNode/4.4.7 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | Kene.Meniru@illom.org |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.18.1357191154.2939.python-list@python.org> (permalink) |
| Lines | 70 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1357191154 news.xs4all.nl 6925 [2001:888:2000:d::a6]:52195 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:36035 |
Followups directed to: gmane.comp.python.general
Show key headers only | View raw
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.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Can't seem to start on this Kene Meniru <Kene.Meniru@illom.org> - 2013-01-03 00:32 -0500
csiph-web