Issue 89 in dicompyler: Calling dicompyler as class fails without wx installed

7 views
Skip to first unread message

dicom...@googlecode.com

unread,
Apr 1, 2014, 4:58:20 PM4/1/14
to dicompyle...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 89 by scott.p....@gmail.com: Calling dicompyler as class fails
without wx installed
http://code.google.com/p/dicompyler/issues/detail?id=89

What steps will reproduce the problem?
1. Try to import a dicompyler module from within another python code, i.e.,
>>> from dicompyler import dvhcalc

What is the expected output? What do you see instead?

File "Test.py"
from dicompyler import dvhcalc
File ".../dicompyler/__init__.py"
from main import start, __version__
File ".../dicompyler/main.py"
import wx
ImportError: No module named wx

What version of the product are you using? On what operating system?

Dicompyler 0.4.1-1 on solaris (Pinnacle box)

Please provide any additional information below.

In file __init__.py, please consider moving all import commands to within
the '__main__' code, as follows:

if __name__ == '__main__':
from main import start, __version__
import dicompyler.main()
dicompyler.main.start()

That way, one can use dicompyler as a class in other codes without having
to install wx. Thank you.

Attachments:
__init__.py 456 bytes

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

dicom...@googlecode.com

unread,
Apr 1, 2014, 10:26:51 PM4/1/14
to dicompyle...@googlegroups.com
Updates:
Status: Accepted
Owner: bastula
Labels: -Type-Defect Type-Enhancement

Comment #1 on issue 89 by bastula: Calling dicompyler as class fails
Thank you for the suggestion and code changes. I will consider this for the
next version as this change would be helpful for non-gui users.

dicom...@googlecode.com

unread,
Apr 4, 2014, 7:44:39 AM4/4/14
to dicompyle...@googlegroups.com

Comment #2 on issue 89 by pedroarg...@gmail.com: Calling dicompyler as
I´m having the same problem! ImportError: No module named wx!

dicom...@googlecode.com

unread,
Apr 6, 2014, 3:01:23 PM4/6/14
to dicompyle...@googlegroups.com

Comment #3 on issue 89 by bastula: Calling dicompyler as class fails
dicompyler by itself was not intended to be used standalone without a GUI.
However, it might be considered spinning off the DICOM parser and related
modules into a separate package. That way those tools can be used by GUI
and non-GUI projects.
Reply all
Reply to author
Forward
0 new messages