# Sample code to create SVG file, using Processing 4.1.1 with Python mode

**URL:** https://discourse.processing.org/t/sample-code-to-create-svg-file-using-processing-4-1-1-with-python-mode/43828
**Category:** Processing.py
**Created:** [February 4, 2024, 4:54pm UTC](https://discourse.processing.org/t/sample-code-to-create-svg-file-using-processing-4-1-1-with-python-mode/43828 "2024-02-04T16:54:24Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)
#### Post date: [February 5, 2024, 1:09am UTC](https://discourse.processing.org/t/sample-code-to-create-svg-file-using-processing-4-1-1-with-python-mode/43828/4 "2024-02-05T01:09:32Z")

</div>

> [@proc8888](#):
>
> I have an error when I tried to revert back to this 3.5.4 older version.

Recently I’ve moved my “processing-3.5.4” app folder from a Win 8.1 laptop to another 1 w/ Win 10 and it works the same.

However, b/c you also have Processing 4, you’re gonna need to have separate sketchbook folders for both P3 & P4.

Here’s a way to do it on Windows:

- 1st, close all running Processing instances, so they won’t overwrite the “preferences.txt” file we’re gonna edit later.

- Go to folder `%USERPROFILE%\Documents` and create a subfolder named `code` or another name of your liking.

- inside subfolder `code`, create 2 subfolders; 1 for “Processing 3” and another for “Processing 4”.

- BtW, in my laptop I’ve got 4 subfolders named: `P1`, `P2`, `P3`, `P4`. B/c I’ve got all Processing versions!

- Annotate the path of those folders b/c we’ll need them in this next 2nd step.

- It’s very important to have separate sketchbooks for each of those major versions due to library incompatibility among them.

- Now go to folder `%APPDATA%\Processing` and open the “preferences.txt” file there using some text editor, like Notepad.

- Go to the bottom of “preferences.txt” and try to find these 3 entries:

- Those 3 entries represent the paths of our sketchbook folders for Processing versions 2, 4 and 3 respectively.

- Use the paths you’ve annotated earlier on those config entries and save the file.

If you’ve followed those instructions right, each Processing major version will use its own sketchbook, so libraries installed for 1 major version won’t crash the other.

P.S.: You can move the contents of the sketchbook folder your “Processing 4” was using to its newest folder.

However, only your own sketches, not the subfolders `libraries`, `modes` nor `tools`; b/c it can happen they already contain mixed versions of both Processing 3 & 4 inside them!

---

_[View the full topic](https://discourse.processing.org/t/sample-code-to-create-svg-file-using-processing-4-1-1-with-python-mode/43828)._
