# \[SOLVED\] Does anyone know of a way to build Python code through Sublime Text 3?

**URL:** <https://discourse.processing.org/t/solved-does-anyone-know-of-a-way-to-build-python-code-through-sublime-text-3/8438>\
**Category:** Processing.py\
**Created:** [February 16, 2019, 6:12am UTC](https://discourse.processing.org/t/solved-does-anyone-know-of-a-way-to-build-python-code-through-sublime-text-3/8438 "2019-02-16T06:12:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![REal](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@REal](https://discourse.processing.org/u/REal)\
**Post date:** [February 16, 2019, 6:12am UTC](https://discourse.processing.org/t/solved-does-anyone-know-of-a-way-to-build-python-code-through-sublime-text-3/8438/1 "2019-02-16T06:12:55Z")

</div>

I’m just starting to learn Processing, and I wanted to learn it using Python, but I’m used to the sublime text 3 environment. I just set up the Sublime Text 3 Processing package, but I can’t seem to figure out how to make it build Python Processing code instead of Java Processing code. In the mean time I’ve been just opening the .pyde file with Sublime Text and coding that way, but it would be very cool if I could also use Sublime Text to build my codes as well. Many thanks in advance!

---

<div class="post-metadata">

**Author:** ![tabreturn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tabreturn/32/3697_2.png) [@tabreturn](https://discourse.processing.org/u/tabreturn)\
**Post date:** [February 16, 2019, 12:05pm UTC](https://discourse.processing.org/t/solved-does-anyone-know-of-a-way-to-build-python-code-through-sublime-text-3/8438/2 "2019-02-16T12:05:39Z")

</div>

I had a quick crack at this and managed to get it working using the Sublime build system.

1. Download the command line version of Processing.py here:  
[https://py.processing.org/tutorials/command-line/](https://py.processing.org/tutorials/command-line/)  
I’m on a Mac at the moment, so I grabbed this file:  
[http://py.processing.org/processing.py-macosx.tgz](http://py.processing.org/processing.py-macosx.tgz)

2. Extract the file wherever you please, but take note of the folder path.

3. Then, in Sublime, create a new build system ( **Tools \> Build System \> New Build System…** ). Add the code below and save it as “Processing.py.sublime-build”, or whatever name makes sense to you (of course, you’ll have to substitute the /PATH/TO/YOUR/FOLDER/ part).

```auto
{
    "cmd": ["java", "-jar", "/PATH/TO/YOUR/FOLDER/processing-py.jar", "$file"],
    "file_regex": "^[]*File \"(...*?)\", line ([0-9]*)",
}

```

1. Create a new file in Sublime. First save it; using a .pyde file extension would make sense. Add some Processing.py code – maybe something simple, like a rectangle.

2. Activate your new build system ( **Tools \> Build System \> Processing.py** ).

3. Use **Tools \> Build** (or **⌘B** ) to run the sketch.

Let me know if you run into any problems.

---

<div class="post-metadata">

**Author:** ![REal](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@REal](https://discourse.processing.org/u/REal)\
**Post date:** [February 18, 2019, 8:15am UTC](https://discourse.processing.org/t/solved-does-anyone-know-of-a-way-to-build-python-code-through-sublime-text-3/8438/3 "2019-02-18T08:15:41Z")

</div>

Hi! Thank you for the reply! I made the new build system for Sublime and tried executing a .pyde program, but I got a `java.awt.HeadlessException` error. I tried executing the program through the terminal via `java -jar processing-py-natives-linux-amd64.jar ~/Path/To/File/testing_Processing_py.pyde` and I get a `no main manifest attribute, in processing-py-natives-linux-amd64.jar` which makes me think its an issue with my version of Java. I did, however, successfully execute my program using `processing-py.sh`.

Edit: I got it working! I used [this tutorial from Stack Overflow](https://stackoverflow.com/questions/21343529/all-my-java-applications-now-throw-a-java-awt-headlessexception) to try and combat the `java.awt.HeadlessException` error message and added a pom.xml file sourced from [this tutorial](http://roufid.com/no-main-manifest-attribute-in-app-jar/) to the same directory my `processing-py.jar` file was located and that did the trick! Thank you so much for your time @tabreturn !

---

<div class="post-metadata">

**Author:** ![Gopython](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@Gopython](https://discourse.processing.org/u/Gopython)\
**Post date:** [September 7, 2019, 9:39am UTC](https://discourse.processing.org/t/solved-does-anyone-know-of-a-way-to-build-python-code-through-sublime-text-3/8438/4 "2019-09-07T09:39:52Z")

</div>

Even I was also facing the no main manifest attribute,in processing-py-natives-linux-amd64.jar error  
I have made it working using [this tutorial](https://javahungry.blogspot.com/2019/05/solved-no-main-manifest-attribute-in-jar.html). Thank you for all the details and replies.
