# Access to a loadable module from the python console

**URL:** https://discourse.slicer.org/t/access-to-a-loadable-module-from-the-python-console/1038
**Category:** Development
**Created:** [September 11, 2017, 10:31pm UTC](https://discourse.slicer.org/t/access-to-a-loadable-module-from-the-python-console/1038 "2017-09-11T22:31:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![laurapascal](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@laurapascal](https://discourse.slicer.org/u/laurapascal)
#### Post date: [September 11, 2017, 10:31pm UTC](https://discourse.slicer.org/t/access-to-a-loadable-module-from-the-python-console/1038/1 "2017-09-11T22:31:27Z")

</div>

Hi everyone!

I am trying to create a scripted module using [Sequences](https://www.slicer.org/wiki/Documentation/Nightly/Extensions/Sequences) extension. I was wondering if, from the python console, there is a way to use a loadable module in the same way than a CLI (`slicer.cli.run(slicer.modules.<cli-module-name>,parameters)`), or if there is a way to access the interface in order to specify the inputs and click on the buttons in the same way than a scripted module (`slicer.modules.<scripted-module-name>Widget`) ?

Any help will be appreciated! Thanks in advance!  
Laura

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [September 11, 2017, 11:19pm UTC](https://discourse.slicer.org/t/access-to-a-loadable-module-from-the-python-console/1038/2 "2017-09-11T23:19:32Z")

</div>

All classes of Sequences extension are available in Python. Sequence registration module is a good example showing how to create and manipulate sequences: [https://github.com/moselhy/SlicerSequenceRegistration/blob/master/SequenceRegistration/SequenceRegistration.py](https://github.com/moselhy/SlicerSequenceRegistration/blob/master/SequenceRegistration/SequenceRegistration.py)

---

<div class="post-metadata">

### Author: ![dpgood](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@dpgood](https://discourse.slicer.org/u/dpgood)
#### Post date: [September 26, 2017, 9:52pm UTC](https://discourse.slicer.org/t/access-to-a-loadable-module-from-the-python-console/1038/3 "2017-09-26T21:52:38Z")

</div>

Try this: [Documentation/Nightly/Developers/Python scripting - Slicer Wiki](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Python_scripting#How_to_access_a_scripted_module_from_python_scripts)

![](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/1X/2485d26919316b1d80aa60f5ca8e2cb5bc0275fe.jpg)

---

<div class="post-metadata">

### Author: ![laurapascal](https://avatars.discourse-cdn.com/v4/letter/l/ba8739/32.png) [@laurapascal](https://discourse.slicer.org/u/laurapascal)
#### Post date: [October 3, 2017, 2:53pm UTC](https://discourse.slicer.org/t/access-to-a-loadable-module-from-the-python-console/1038/4 "2017-10-03T14:53:03Z")

</div>

Thank you so much for your help. I managed to create a sequence and to run it by using the _vtkMRMLSequenceNode_ and _vtkMRMLSequenceBrowserNode_ classes ! I have unfortunately an issue about these particular classes, so I opened another topic [here](https://discourse.slicer.org/t/modification-of-models-color-in-a-vtkmrmlsequencenode/1166).
