# Nature of Code (Random Walker) using Python

**URL:** <https://discourse.processing.org/t/nature-of-code-random-walker-using-python/43236>\
**Category:** Processing.py\
**Created:** [November 17, 2023, 5:53pm UTC](https://discourse.processing.org/t/nature-of-code-random-walker-using-python/43236 "2023-11-17T17:53:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [November 17, 2023, 8:16pm UTC](https://discourse.processing.org/t/nature-of-code-random-walker-using-python/43236/2 "2023-11-17T20:16:11Z")

</div>

Hello @Hsu,

This worked with Processing 3.5.4 in Python mode:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/5/a/5a5706545071394295bb5ec956bcf9248b938d6c.png)

Reference:

> [@Imported class from another tab doesn't work](https://discourse.processing.org/t/imported-class-from-another-tab-doesnt-work/22135/2):
>
> I believe you’ve got instead NameError: global name ‘voronoi’ is not defined, right? Should be instead: from voronoi\_class import voronoi Keyword global should go inside a function instead: [Py.Processing.org/reference/globals.html](http://Py.Processing.org/reference/globals.html) def setup(): # ... global v v = voronoi(100, w, h) println(v.r) It’s customary for class names to be “CamelCase” instead: class Voronoi:

`:)`

---

_[View the full topic](https://discourse.processing.org/t/nature-of-code-random-walker-using-python/43236)._
