Hi everyone,<br><br>I&#39;m working on making a Debian package for a game I&#39;m working on, and it works fine, but I&#39;ve run into a problem with my script now. The script is placed in /usr/bin so all users on the system have access, but even though it will run fine, I can&#39;t save files to that directory, so the saving feature doesn&#39;t work and the rest of my game is crippled now. Any ideas on how I could progress? I tried appending &quot;~/&quot; to the filename for that copy of the script, but it just makes the terminal window close without warning. Any help would be appreciated.
<br><br><span style="font-family: courier new,monospace;">def savegame(fname):<br>&nbsp;&nbsp;&nbsp; # This part isn&#39;t necessary, I just wanted to see if it would save to the user&#39;s home folder<br style="font-family: courier new,monospace;">
</span><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; if <a href="http://os.name">os.name</a> == &quot;posix&quot;:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fname = &quot;~/&quot; + fname</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; infile = open(fname,&quot;w&quot;)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; # Save the maps</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; mapchanges.append([6,1,rrmap])</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; mapchanges.append([6,2,treemap])</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; picklelist = [choins, inventory, book, mapchanges, event, cdata]
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; pickle.dump(picklelist,infile)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
&nbsp;&nbsp;&nbsp; # Delete the saved maps because they will just get in the way later</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; del mapchanges[len(mapchanges)-1]</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; del mapchanges[len(mapchanges)-1]</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; infile.close()</span><br>
<br>David Millar<br><a href="http://www.thegriddle.net/python/">http://www.thegriddle.net/python/</a><br>