# \#python-cli

**URL:** https://discourse.slicer.org/tag/python-cli/355.md

[Latest](https://discourse.slicer.org/latest.md) · [Categories](https://discourse.slicer.org/categories.md) · [Tags](https://discourse.slicer.org/tags.md)

---

## [Run custom module in virtual environment](https://discourse.slicer.org/t/run-custom-module-in-virtual-environment/35460)

<div class="topic-metadata">

**Author:** [@Franciska](https://discourse.slicer.org/u/Franciska)\
**Replies:** 0\
**Last updated:** [April 12, 2024, 3:05pm UTC](https://discourse.slicer.org/t/run-custom-module-in-virtual-environment/35460 "2024-04-12T15:05:25Z")

</div>

Hi! I would like to create a custom module, just like the BlurImage example. Is it possible to activate a venv in the python script? The venv would be placed in the module’s folder. Thanks!

---

## [Calling cli with specific python path](https://discourse.slicer.org/t/calling-cli-with-specific-python-path/32278)

<div class="topic-metadata">

**Author:** [@Gaelle\_Leroux](https://discourse.slicer.org/u/Gaelle_Leroux)\
**Replies:** 2\
**Last updated:** [October 17, 2023, 8:34pm UTC](https://discourse.slicer.org/t/calling-cli-with-specific-python-path/32278 "2023-10-17T20:34:24Z")

</div>

Hi @lassoan, @jcfr ! We want to run a cli with specific dependencies not compatible with slicerPython, is it possible to specify the python path when we use the slicer.cli.run ? Right now it will run with python-real. …

---

## [Converting DICOM to NRRD on Docker via a Python script](https://discourse.slicer.org/t/converting-dicom-to-nrrd-on-docker-via-a-python-script/21096)

<div class="topic-metadata">

**Author:** [@adouv](https://discourse.slicer.org/u/adouv)\
**Replies:** 7\
**Last updated:** [June 3, 2022, 12:18pm UTC](https://discourse.slicer.org/t/converting-dicom-to-nrrd-on-docker-via-a-python-script/21096 "2022-06-03T12:18:11Z")

</div>

Hello, I would like to start off thanking all of you for the great work with 3D Slicer. It is truly a phenomenal piece of software! The issue we are having requires some description, so I will split this question into tw…

---

## [How to access QVTK... classes in Python](https://discourse.slicer.org/t/how-to-access-qvtk-classes-in-python/18521)

<div class="topic-metadata">

**Author:** [@MarineC](https://discourse.slicer.org/u/MarineC)\
**Replies:** 2\
**Last updated:** [July 6, 2021, 3:00pm UTC](https://discourse.slicer.org/t/how-to-access-qvtk-classes-in-python/18521 "2021-07-06T15:00:14Z")

</div>

Hi everyone ! I need to use a VTK function called QVTKOpenGLStereoWidget in Python. I saw a vtk example where they did this way : from PyQt4 import QtGui from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindow…

---

## [How to exchange data bewteen Slicer instance and Python CLI during runtime](https://discourse.slicer.org/t/how-to-exchange-data-bewteen-slicer-instance-and-python-cli-during-runtime/18357)

<div class="topic-metadata">

**Author:** [@mcfly3001](https://discourse.slicer.org/u/mcfly3001)\
**Replies:** 3\
**Last updated:** [June 27, 2021, 7:21pm UTC](https://discourse.slicer.org/t/how-to-exchange-data-bewteen-slicer-instance-and-python-cli-during-runtime/18357 "2021-06-27T19:21:36Z")

</div>

For my project I need to get the table position of a CT system. To get this information I need to connect via SSH to a server and call a command which will then continously write the table position to the stdout. Connect…

---

## [\[vtkMRMLCommandLineModuleNode.AddObserver()\] Missing Documentation](https://discourse.slicer.org/t/vtkmrmlcommandlinemodulenode-addobserver-missing-documentation/13868)

<div class="topic-metadata">

**Author:** [@strider\_hunter](https://discourse.slicer.org/u/strider_hunter)\
**Replies:** 1\
**Last updated:** [October 6, 2020, 8:21pm UTC](https://discourse.slicer.org/t/vtkmrmlcommandlinemodulenode-addobserver-missing-documentation/13868 "2020-10-06T20:21:09Z")

</div>

Using cliNode = slicer.cli.run() returns a vtkMRMLCommandLineModuleNode that can asynchronously call a CLI module. It is shown here that one can use the cliNode.AddObserver() callback for when the “cliNode is modified”. …
