Embarassingly Simple Issue (Solved...)

Ok… I feel like a total idiot for having to ask this.

I had a completely ingenious idea last night, to generate EGG files by modifying a base egg file of a cube. I manually screwed with the EGG file until I understood the format well, and made a program to change how high each corner of the cube is, in order to be used as terrain by a random terrain generator. (Brilliant, no? xD)

Anywho, upon trying to write the output of this lovely little script, I am presented with a stupid Errno 2:

Here’s my code:


Ironically, there is a nearly identical piece of code reading the template mesh from the same folder, except in read mode. Should not the “w” argument make it create the file if not present!?

Read this on the Panda Filename Syntax:
Use a / instead of a .

This isn’t even a panda script though, just straight python! This is completely separate from my game…

In that case, you should double the backslash, because in Python (like in C) a single backslash is an escape character. Or, just use a forward slash anyway (Windows understands forward slashes just fine).


Ah yeah, that’s why… It’s been a long time since I dealt with external files in python, rofl.

I’m not some python nub either, been doing this for some time…