# Python keyboard interrupt?

**URL:** <https://forum.dynamobim.com/t/python-keyboard-interrupt/33389>\
**Category:** Uncategorized\
**Created:** [March 13, 2019, 12:33pm UTC](https://forum.dynamobim.com/t/python-keyboard-interrupt/33389 "2019-03-13T12:33:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![djhballinger](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/djhballinger/32/44414_2.png) [@djhballinger](https://forum.dynamobim.com/u/djhballinger)\
**Post date:** [March 13, 2019, 12:33pm UTC](https://forum.dynamobim.com/t/python-keyboard-interrupt/33389/1 "2019-03-13T12:33:42Z")

</div>

Is there any way to do a keyboard interrupt for a stuck Python loop in a Dynamo graph (similar to CTRL-C in regular Python)?

I need have some while loops in my code, and I’ve tried to build in some safety checks, but if I accidentally click save without my loop being perfect, I end up losing all of my work to have to force-quit out of Dynamo / Revit.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [March 13, 2019, 12:54pm UTC](https://forum.dynamobim.com/t/python-keyboard-interrupt/33389/2 "2019-03-13T12:54:16Z")

</div>

Not sure this exists, but someone could prove me wrong. Either way we need to change something (add the feature or update documentation). Can you make a request at the github site @djhballinger?

---

<div class="post-metadata">

**Author:** ![djhballinger](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/djhballinger/32/44414_2.png) [@djhballinger](https://forum.dynamobim.com/u/djhballinger)\
**Post date:** [March 13, 2019, 6:39pm UTC](https://forum.dynamobim.com/t/python-keyboard-interrupt/33389/3 "2019-03-13T18:39:32Z")

</div>

Thanks @jacob.small. I’ve put in the request here: [https://github.com/DynamoDS/Dynamo/issues/9566](https://github.com/DynamoDS/Dynamo/issues/9566)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [March 13, 2019, 8:42pm UTC](https://forum.dynamobim.com/t/python-keyboard-interrupt/33389/4 "2019-03-13T20:42:27Z")

</div>

Thanks @djhballinger. Looks like it’s already been read and filed into the correct areas. 🙂
