AttributeError: LineLogic instance has no attribute 'probe'

2015-07-27 Thread Abder-Rahman Ali
Hello,

I'm quite puzzled with an error I'm having in my code.

In the class ---> LineLogic

I have the following portion of code:

def __init__(self):
  self.probe = vtk.vtkProbeFilter()

probe.SetInputConnection(line.GetOutputPort())
probe.SetSourceData(volumeNode.GetImageData())
probe.Update()

In another class ---> LineLogicTest

I had the following portion of code:

logic = LineLogic()
probe = logic.probe
data = probe.GetOutput().GetPointData().GetScalars()

When I try running the program, I get the following error:

AttributeError: LineLogic instance has no attribute 'probe'

How can I solve this error?

Thanks.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Hi

2015-07-27 Thread Christopher Mullins
>
> I downloaded files(Python 2.7.10 - 2015-05-23
> ) to setup on your
> website.
> (also got the version of x64 because of my cpu)
> But when I try to install it, there is an error.
> The error is "There is a problem with this Windows Installer package. A
> DLL required for this install to complete could not be run. Contact your
> support personnel or package vendor."
>

According to this link, it could be a permissions issue [1].

[1]
http://superuser.com/questions/478631/dll-could-not-be-run-for-msi-installers
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Questions - July 25, 2015

2015-07-27 Thread Matt Wheeler
I'll just answer the one part I don't feel has had enough attention yet,
all other parts chopped...

On Sat, 25 Jul 2015 10:39 E.D.G.  wrote:

Posted by E.D.G. July 25,

2015

6. What is Python's version of the DOS level "System" command that many
programs use as in:

system "open notepad.exe"

You can use the subprocess module from the standard library for this but...


7. What is Python's version of the SendKey command that many programs use to
send information to an active Windows program as in:

SendKey("Message to be printed on the Notepad screen")

or

SendKey(Right Arrow Key)

 pywinauto would be my recommendation here. It can be used to automate
sending of keys and button presses, filling in text fields etc., all within
the context of a "connected" application...

8. What commands does Python use to send to, and retrieve information from,
the Windows clipboard?


...And it has an interface for manipulating the clipboard,
pywinauto.clipboard

Behind the scenes it makes heavy use of the PyWin32 library, and it hides a
lot of the complexity you would have to deal with quite nicely.

http://pywinauto.github.io/ has examples and docs.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Questions - July 25, 2015

2015-07-27 Thread Laura Creighton
In a message of Sun, 26 Jul 2015 18:58:14 -0500, "E.D.G." writes:

>   This is an indirect URL for a potentially important computer program 
>that I feel needs to be developed.  Unfortunately, although Python could be 
>used to create PC or Mac versions of the program I don't think that those 
>programs would run on Internet server computers.  But I don't yet know 
>enough about Python to be able to tell if that is the case or not.

Sure they will.  That thing about the Affordable Health Care Act
you mentioned -- do you know how this got _fixed_?  People in this
community, notably Alex Gaynor went and turned the lot into a
Django Python app.  He's now working for the US department of
Veteran Affairs, turning more things into Django apps so that
veterans can get their claims processed in weeks (they are aiming
for days) rather than 6-8 months which was the norm before he
got their.  His plan is to speed up the US government with Python
one agency at a time.

There are many techniques you can use to make your Python code fast.
I think we are much better off in that regard than the Perl users are.
If you need better than CPython performance, you might be able to just
use numpy numerical arrays and get the improvement you need.  Or you
might just stop using CPython, and use PyPy, which is a completely
different implementation and which has a JIT that gives
rather good performance, often on the order of pure C code.
see http://speed.pypy.org/

Or you can use Cython http://cython.org/ to make C extensions out of
the part of your python code you would like to run faster.  Or maybe
there already is a C or Fortran library that already does what you
want, you just want to use it in your code.  There are techniques for
just doing this -- and if the library is well known then chances are
somebody else has already made python bindings for it so you can just
use it with CPython.

I wouldn't worry about speed.

If you want to reimplement your webscraping Perl program in Python, I
suggest you start with this library http://scrapy.org/ rather than
reinventing things from scratch.  The scrapy community is very happy to
get code with new techniques which they add to the library, and then
we all benefit.

Laura

-- 
https://mail.python.org/mailman/listinfo/python-list


ANN: Python Meeting Düsseldorf - 29.07.2015

2015-07-27 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a local user group
 meeting in Düsseldorf, Germany]



ANKÜNDIGUNG

 Python Meeting Düsseldorf

 http://pyddf.de/

   Ein Treffen von Python Enthusiasten und Interessierten
in ungezwungener Atmosphäre.

  Mittwoch, 29.07.2015, 18:00 Uhr
  Raum 1, 2.OG im Bürgerhaus Stadtteilzentrum Bilk
Düsseldorfer Arcaden, Bachstr. 145, 40217 Düsseldorf

Diese Nachricht ist auch online verfügbar:
http://www.egenix.com/company/news/Python-Meeting-Duesseldorf-2015-07-29



NEUIGKEITEN

 * Bereits angemeldete Vorträge:

   Charlie Clark
   "Eine Einführung in das Routing von Pyramid"

   Marc-Andre Lemburg
   "Python Idioms - Tipps und Anleitungen für besseren Python Code"
   "Bericht von der EuroPython 2015"

   Weitere Vorträge können gerne noch angemeldet werden: [email protected]

 * Startzeit und Ort:

   Wir treffen uns um 18:00 Uhr im Bürgerhaus in den Düsseldorfer
   Arcaden.

   Das Bürgerhaus teilt sich den Eingang mit dem Schwimmbad
   und befindet sich an der Seite der Tiefgarageneinfahrt der
   Düsseldorfer Arcaden.

   Über dem Eingang steht ein großes “Schwimm’'in Bilk”
   Logo. Hinter der Tür direkt links zu den zwei Aufzügen,
   dann in den 2. Stock hochfahren. Der Eingang zum Raum 1
   liegt direkt links, wenn man aus dem Aufzug kommt.

   Google Street View: http://bit.ly/11sCfiw



EINLEITUNG

Das Python Meeting Düsseldorf ist eine regelmäßige Veranstaltung in
Düsseldorf, die sich an Python Begeisterte aus der Region wendet:

 * http://pyddf.de/

Einen guten Überblick über die Vorträge bietet unser YouTube-Kanal,
auf dem wir die Vorträge nach den Meetings veröffentlichen:

 * http://www.youtube.com/pyddf/

Veranstaltet wird das Meeting von der eGenix.com GmbH, Langenfeld,
in Zusammenarbeit mit Clark Consulting & Research, Düsseldorf:

 * http://www.egenix.com/
 * http://www.clark-consulting.eu/



PROGRAMM

Das Python Meeting Düsseldorf nutzt eine Mischung aus Open Space
und Lightning Talks, wobei die Gewitter bei uns auch schon mal
20 Minuten dauern können ;-).

Lightning Talks können vorher angemeldet werden, oder auch
spontan während des Treffens eingebracht werden. Ein Beamer mit
XGA Auflösung steht zur Verfügung. Folien bitte als PDF auf USB
Stick mitbringen.

Lightning Talk Anmeldung bitte formlos per EMail an [email protected]



KOSTENBETEILIGUNG

Das Python Meeting Düsseldorf wird von Python Nutzern für Python
Nutzer veranstaltet. Um die Kosten zumindest teilweise zu
refinanzieren, bitten wir die Teilnehmer um einen Beitrag
in Höhe von EUR 10,00 inkl. 19% Mwst, Schüler und Studenten
zahlen EUR 5,00 inkl. 19% Mwst.

Wir möchten alle Teilnehmer bitten, den Betrag in bar mitzubringen.



ANMELDUNG

Da wir nur für ca. 20 Personen Sitzplätze haben, möchten wir
bitten, sich per EMail anzumelden. Damit wird keine Verpflichtung
eingegangen. Es erleichtert uns allerdings die Planung.

Meeting Anmeldung bitte formlos per EMail an [email protected]



WEITERE INFORMATIONEN

Weitere Informationen finden Sie auf der Webseite des Meetings:

http://pyddf.de/

Mit freundlichen Grüßen,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jul 27 2015)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> mxODBC Plone/Zope Database Adapter ...   http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...http://python.egenix.com/

2015-07-29: Python Meeting Duesseldorf ...  2 days to go

: Try our mxODBC.Connect Python Database Interface for free ! ::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Questions - July 25, 2015

2015-07-27 Thread tjohnson
#6: I don't know what your colleague will think, but I've read too many 
negative things about Eric (lots of dependencies, poor documentation, etc.) to 
ever try it. For a powerful Free Python IDE, I'd recommend either Eclipse with 
PyDev (what I use), or PyCharm.
-- 
https://mail.python.org/mailman/listinfo/python-list


amfast - serialising back which was deserialised - trying to produce same output

2015-07-27 Thread Rafał Rajko-Nenow
Hi, 

I think it's really amfast issue, and has not much in common with mitmproxy, 
but last days this problem became urgent to me so I'm asking here hoping that 
anyone succeeded this before. 

I am using mitmdump with some inline scripts to track AMF serialised flex 
remoting traffic. 
As I'm deserialising big amounts od data, I'm using amfast instead of slower 
pyamf, trying to avoid performance issues. 

One way used to limit amount of data I need to deserialize was to look for 
existence of some particular patterns (eg. variable names) in serialized binary 
data, and deserializing only payloads who match. 

as cons of this approach I can't provide amfast decoder with data context, and 
this forced me to deserialize payloads using amfast.decoder.decode_packet() 
nowadays I am struggling trying to alter AMF data passing by. 
I've tried decoding traffic and then encoding it again as described here 
https://code.google.com/p/amfast/wiki/EncodeAndDecode 
but each time I tried, originally serialised (untouched) payloads differs from 
those serialised by me. (even without applying any changes to data) 





# EXAMPLE: 

coded_content = just_captured_untouched_allready_serialised_payload 

from amfast.decoder import Decoder 
from amfast.encoder import Encoder 

# Decode an AMF Packet... 
dec = Decoder(amf3=True) 
packet_obj = dec.decode_packet(coded_content) 

# ...and encode it again 
enc = Encoder(amf3=True) 
encoded_back = encoder.encode_packet(packet_obj) 

 now, suprisingly, 'coded_content' differs from 'encoded_back' a bit 



any ideas? 

I'm looking forward to your reply. 
Ralph Rajko-Nenow 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Which GUI?

2015-07-27 Thread Todd
On Sun, Jul 26, 2015 at 7:19 PM, Paulo da Silva <
[email protected]> wrote:

> On 26-07-2015 05:47, blue wrote:
> > Hi .
> > I tested all. Now I think the PySide can more.
>
> No python3!
> Besides ... any differences to pyqt4?
> Thanks
>

pyside has supported python 3 for a long time now.

As for differences, the main difference is the license.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: AttributeError: LineLogic instance has no attribute 'probe'

2015-07-27 Thread John Gordon
In  Abder-Rahman Ali 
 writes:

> In the class ---> LineLogic

> def __init__(self):
>   self.probe = vtk.vtkProbeFilter()

> In another class ---> LineLogicTest

> logic = LineLogic()
> probe = logic.probe
> data = probe.GetOutput().GetPointData().GetScalars()

> When I try running the program, I get the following error:

> AttributeError: LineLogic instance has no attribute 'probe'

Since you haven't posted the actual complete code, we can only guess
at the problem.

My guess is that you have two different definitions of the LineLogic
class, one of them lacking the probe attribute.

-- 
John Gordon   A is for Amy, who fell down the stairs
[email protected]  B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Questions - July 25, 2015

2015-07-27 Thread mm0fmf via Python-list

On 27/07/2015 01:18, Mark Lawrence wrote:

On 27/07/2015 00:12, Ned Batchelder wrote:

On Sunday, July 26, 2015 at 5:15:31 PM UTC-4, mm0fmf wrote:

On 26/07/2015 20:17, E.D.G. wrote:


[around 90 lines snipped]



Am I the only person thinking Troll?


Yes.

--Ned.



Was it really necessary to resend all of the original for the sake of a
seven word question and a one word answer?


Yes? ;-)
--
https://mail.python.org/mailman/listinfo/python-list


sys path modification

2015-07-27 Thread neubyr
I am trying to understand sys.path working and best practices for managing
it within a program or script. Is it fine to modify sys.path using
sys.path.insert(0, EXT_MODULES_DIR)? One stackoverflow answer -
http://stackoverflow.com/a/10097543 - suggests that it may break external
3'rd party code as by convention first item of sys.path list, path[0], is
the directory containing the script that was used to invoke the Python
interpreter. So what are best practices to prepend sys.path in the program
itself? Any further elaboration would be helpful.


- thanks, N
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: sys path modification

2015-07-27 Thread Cem Karan
On Jul 27, 2015, at 1:24 PM, neubyr  wrote:

> 
> I am trying to understand sys.path working and best practices for managing it 
> within a program or script. Is it fine to modify sys.path using 
> sys.path.insert(0, EXT_MODULES_DIR)? One stackoverflow answer - 
> http://stackoverflow.com/a/10097543 - suggests that it may break external 
> 3'rd party code as by convention first item of sys.path list, path[0], is the 
> directory containing the script that was used to invoke the Python 
> interpreter. So what are best practices to prepend sys.path in the program 
> itself? Any further elaboration would be helpful. 


Why are you trying to modify sys.path?  I'm not judging, there are many good 
reasons to do so, but there may be safer ways of getting the effect you want 
that don't rely on modifying sys.path.  One simple method is to modify 
PYTHONPATH (https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH) 
instead.

In order of preference:

1) Append to sys.path.  This will cause you the fewest headaches.

2) If you absolutely have to insert into the list, insert after the first 
element.  As you noted from SO, and noted in the docs 
(https://docs.python.org/3/library/sys.html#sys.path), the first element of 
sys.path is the path to the directory of the script itself.  If you modify 
this, you **will** break third-party code at some point.  

Thanks,
Cem Karan
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ImportError: No module named site

2015-07-27 Thread Terry Reedy

On 7/26/2015 10:00 PM, [email protected] wrote:


hi:
 I'm Needing to get python 2.7.10 to cross compile correctly for an
ARM embedded device. When I execute python using shell, it comes out
this error:ImportError: No module named site.I have setted environment
varible:PYTHONHOME and PYTHONPATH. Is there some good idea to sovle this
issue? who can tell me how can I download the
python2.7.10-xcompile.patch file?thanks.
PYTHONHOME='/usr/sbin'. Python installing  dir
PYTHONPATH='/usr/lib' .The reference lib of python dir.
This is the result of executingpython -v:


The stdlib /Lib directory *must* contain a site.py module.  The standard 
version starts with


"""Append module search paths for third-party packages to sys.path.


* This module is automatically imported during initialization. *


This will append site-specific paths to the module search path.
...

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: sys path modification

2015-07-27 Thread Ned Batchelder
On Monday, July 27, 2015 at 1:24:50 PM UTC-4, neubyr wrote:
> I am trying to understand sys.path working and best practices for managing it 
> within a program or script. Is it fine to modify sys.path using 
> sys.path.insert(0, EXT_MODULES_DIR)? One stackoverflow answer - 
> http://stackoverflow.com/a/10097543 - suggests that it may break external 
> 3'rd party code as by convention first item of sys.path list, path[0], is the 
> directory containing the script that was used to invoke the Python 
> interpreter. So what are best practices to prepend sys.path in the program 
> itself? Any further elaboration would be helpful. 

The best practice is not to modify sys.path at all, and instead to install
modules you need to import.  That way they can be imported without resorting
to sys.path fiddling in the first place.

Is there a reason you can't install the modules? Maybe we can help solve that.

--Ned.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ImportError: No module named site

2015-07-27 Thread Laura Creighton
What I want to know is can you import anything else?  If site.py is
just the first thing in a long list of modules, and you cannot find
any of them, which is what I think is the case, and I'd start looking
for problems with the PYTHONPATH then you have a different problem than
if you can find other modules just fine, just, for some reason
not site.py

Laura

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: sys path modification

2015-07-27 Thread neubyr
Modules are installed, but they are in a different directory than standard
modules directory. I considered an option to add a site specific directory,
but I want to make module path application specific rather than installing
it in system-wide directory. virtualenv is one option, but that means
anyone who wants to run this particular script will need to activate
virtualenv each time. I thought allowing application to find/use it's
dependencies would be easier. Are there any other options?

On Mon, Jul 27, 2015 at 12:45 PM, Ned Batchelder 
wrote:

> On Monday, July 27, 2015 at 1:24:50 PM UTC-4, neubyr wrote:
> > I am trying to understand sys.path working and best practices for
> managing it within a program or script. Is it fine to modify sys.path using
> sys.path.insert(0, EXT_MODULES_DIR)? One stackoverflow answer -
> http://stackoverflow.com/a/10097543 - suggests that it may break external
> 3'rd party code as by convention first item of sys.path list, path[0], is
> the directory containing the script that was used to invoke the Python
> interpreter. So what are best practices to prepend sys.path in the program
> itself? Any further elaboration would be helpful.
>
> The best practice is not to modify sys.path at all, and instead to install
> modules you need to import.  That way they can be imported without
> resorting
> to sys.path fiddling in the first place.
>
> Is there a reason you can't install the modules? Maybe we can help solve
> that.
>
> --Ned.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Authenticate users using command line tool against AD in python

2015-07-27 Thread Prasad Katti
I am writing a command line tool in python to generate one time 
passwords/tokens. The command line tool will have certain sub-commands like 
--generate-token and --list-all-tokens for example. I want to restrict access 
to certain sub-commands. In this case, when user tries to generate a new token, 
I want him/her to authenticate against AD server first.

I have looked at python-ldap and I am even able to bind to the AD server. In my 
application I have a function

def authenticate_user(username, password): pass

which gets username and plain-text password. How do I use the LDAPObject 
instance to validate these credentials?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: sys path modification

2015-07-27 Thread Cameron Simpson

On 27Jul2015 14:09, neubyr  wrote:

Modules are installed, but they are in a different directory than standard
modules directory. I considered an option to add a site specific directory,
but I want to make module path application specific rather than installing
it in system-wide directory. virtualenv is one option, but that means
anyone who wants to run this particular script will need to activate
virtualenv each time.


Personally I almost always recommend virtualenv over installing in the system 
areas - the system package manager can fight with you there.


Rather than forcing users to activate the virtualenv, instead provide a trivial 
wrapper script which activates the virtualenv and runs their command, and tell 
them about that, not the direct path to the app:


 #!/bin/sh
 . /path/to/virtualenv/bin/activate
 exec python /path/to/app ${1+"$@"}

If you stick that in (say) /usr/local/bin with a sensible name they need never 
care.



I thought allowing application to find/use it's
dependencies would be easier. Are there any other options?


Well, I actually have an app which imports from a separate location in order to 
support user supplied functions that plug into the app. I wrote an 
"import_module_name" function to support this:


 https://bitbucket.org/cameron_simpson/css/src/tip/lib/python/cs/py/modules.py

which optionally installs a different sys.path for the duration of the import 
operation, then reinstalls the old one again. You can even "pip install 
cs.py.modules", in theory.


Then you could go:

 import_module_name('your.app.modulename', 'YourAppClass', 
['path/to/your/app/lib'] + sys.path)
 app = YourAppClass(...)
 app(args,...)

to suck in the app, instantiate it, and run it. Or some obvious variation on 
that.


There are two caveats I'd provide if you go this route:

 Since the stdlib's importlib provides no overt exclusion, if you have other 
 imports taking place in other threads when you run this it is possible that 
 they may import while your modified sys.path is in place.


 Any time you pull from an exterior place, you need to be sure the exterior 
 place doesn't have unexpected code - if someone untrusted can insert python 
 code into the extra lib path then they may get it imported.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


Error: valueError: ordinal must be >= 1

2015-07-27 Thread ryguy7272
Hello experts.  I'm working in Python > Anaconda > Spyder.

I'm reading a book called 'Python for Finance' and I'm trying to run this 
sample code:


import numpy as np
import pandas as pd
import pandas.io.data as web


sp500 = web.DataReader('^GSPC', data_source='yahoo', start='1/1/2000', 
end='4/14/2014')
sp500.info()

sp500['Close'].plot(grid=True, figsize=(8, 5))

sp500['42d'] = np.round(pd.rolling_mean(sp500['Close'], window=42), 2)
sp500['252d'] = np.round(pd.rolling_mean(sp500['Close'], window=252), 2)

sp500[['Close', '42d', '252d']].tail()

sp500[['Close', '42d', '252d']].plot(grid=True, figsize=(8, 5))

sp500['42-252'] = sp500['42d'] - sp500['252d']
sp500['42-252'].tail()
sp500['42-252'].head()


It seems to work perfectly find when I see the results in the book, but all I'm 
getting is this . . . 
*** ValueError: ordinal must be >= 1
(Pdb) 

Does anyone have any idea what I'm doing wrong?

Thanks, all.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Questions - July 25, 2015

2015-07-27 Thread Rob Gaddi
On Sun, 26 Jul 2015 13:49:57 +0100, BartC wrote:

> How do you actually install Numpy in Windows?
> 
> I had a go a month or two ago and couldn't get anywhere.
> 

As I recall you noodle around with it for a few hours making things that 
look like progress but turn out to be rabbit holes.  Then you break down 
sobbing, go off, get drunk, come back the next day with your head 
pounding, delete your existing installation in a fit of pique, install 
Anaconda's distribution with the whole SciPy stack already built in, and 
have it just magically work.

I suppose you could try skipping the earlier steps, but at that point I 
wouldn't be able to vouch for the process.

-- 
Rob Gaddi, Highland Technology -- www.highlandtechnology.com
Email address domain is currently out of order.  See above to fix.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Error: valueError: ordinal must be >= 1

2015-07-27 Thread Emile van Sebille

On 7/27/2015 4:13 PM, ryguy7272 wrote:



It seems to work perfectly find when I see the results in the book, but all I'm 
getting is this . . .
*** ValueError: ordinal must be >= 1
(Pdb)

Does anyone have any idea what I'm doing wrong?


You've been dropped into the python debugger.  I'd suspect you've hit a 
'import pdb; pdb.set_trace()' or similar line.


You can type in 'l'  (lower case L) to see the context (you may need to 
's' (step) to the appropriate line depending on your version of python.)


Alternately, use 'c' to allow the script to continue processing.

Otherwise, you'll need to complete debugging the code (as indicated by 
the break) or comment out/remove the set_trace.



Emile


--
https://mail.python.org/mailman/listinfo/python-list


Re: AttributeError: LineLogic instance has no attribute 'probe'

2015-07-27 Thread Cameron Simpson

On 27Jul2015 13:43, John Gordon  wrote:

In  Abder-Rahman Ali 
 writes:

In the class ---> LineLogic



def __init__(self):
  self.probe = vtk.vtkProbeFilter()



In another class ---> LineLogicTest



logic = LineLogic()
probe = logic.probe
data = probe.GetOutput().GetPointData().GetScalars()



When I try running the program, I get the following error:



AttributeError: LineLogic instance has no attribute 'probe'


Since you haven't posted the actual complete code, we can only guess
at the problem.

My guess is that you have two different definitions of the LineLogic
class, one of them lacking the probe attribute.


Alternatively, if the code he did quote is accurate, he may have not indented 
the definition of __init__. Example:


 class LineLogic(object):
 ''' doc string
 '''

 def __init__(self):
 ...

This is legal, but wrong. It will result in LineLogic having the default 
initialisation i.e. nothing, as the __init__ function is not part of the class.


But yes, this would all be clearer had the OP posted the code instead of a tiny 
out of context snippet.


Cheers,
Cameron Simpson 
Motorcycling is indeed a delightful pastime.- Honda Rider Training Film
--
https://mail.python.org/mailman/listinfo/python-list