# Getting started with python for creating custom modules

**URL:** <https://discourse.slicer.org/t/getting-started-with-python-for-creating-custom-modules/26899>\
**Category:** Development\
**Tags:** extensions-manager, python\
**Created:** [December 23, 2022, 1:15pm UTC](https://discourse.slicer.org/t/getting-started-with-python-for-creating-custom-modules/26899 "2022-12-23T13:15:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@Tobias](https://discourse.slicer.org/u/Tobias)\
**Post date:** [December 23, 2022, 1:15pm UTC](https://discourse.slicer.org/t/getting-started-with-python-for-creating-custom-modules/26899/1 "2022-12-23T13:15:10Z")

</div>

Hi,  
We use 3D slicer and markup as a tool in education and also a combination of different datasets and markup during the examination of students.

Some students think it is a bit difficult to do this manually, hence I am staring the process to develop an extension that should combine choosing the dataset as well as handling markups.

I have started with the extention wizard that gives you the ability to choose between different datasets (but to threshold).

If anyone could give me some advice on the following it would be very appreciated:

1. where do I find a list of the commands that slicer cand respond to? For instance after choosing a dataset in the dropdown list. I want it to be the active one in slicer
2. Is there a way to load parts from a different module easily into another? In that case is there a resource on how to make this calls?

I would of course also be very thankful for any other advice to get me going.

---

<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:** [December 24, 2022, 5:16am UTC](https://discourse.slicer.org/t/getting-started-with-python-for-creating-custom-modules/26899/2 "2022-12-24T05:16:51Z")

</div>

> [@Tobias](#):
>
> where do I find a list of the commands that slicer cand respond to? For instance after choosing a dataset in the dropdown list. I want it to be the active one in slicer

Hundreds of thousands of commands are available in Slicer (entire Qt, VTK, SimpleITK library, Python core libraries, etc. are already bundled and you can install any number of additional Python packages), so giving an exhaustive list is impossible.

I would recommend to start with the [PerkLab bootcamp’s Slicer programming tutorial](https://github.com/PerkLab/PerkLabBootcamp/blob/master/Doc/day3_2_SlicerProgramming.pptx?raw=true). There are also a number of Slicer tutorials on youtube - see for example [these](https://www.youtube.com/playlist?list=PLTuWbByD80TORd1R-J7j7nVQ9fot3C2fK).

> [@Tobias](#):
>
> Is there a way to load parts from a different module easily into another? In that case is there a resource on how to make this calls?

Yes, there are lots of reusable widgets. You can find instructions [here](https://slicer.readthedocs.io/en/latest/developer_guide/python_faq.html#how-to-find-a-python-function-for-any-slicer-features) for finding any Slicer feature that you want to use in Python.

If you don’t find anything in tutorials or examples in the script repository then you can also always ask here.
