Re: Create files and directories from Django 1.2.1

2010-08-21 Thread Doug Blank
On Mon, Aug 16, 2010 at 8:51 PM, Mike Dewhirst wrote: > On 16/08/2010 10:22pm, Doug Blank wrote: >> >> On Mon, Aug 16, 2010 at 7:23 AM, Mark Mooij  wrote: >>> >>> Allright I tried a couple of things with your suggested appraoch: >>> > > > >> >> I doubt it. You shouldn't really do this: >> >> kmlp

Re: Create files and directories from Django 1.2.1

2010-08-16 Thread Mike Dewhirst
On 16/08/2010 10:22pm, Doug Blank wrote: On Mon, Aug 16, 2010 at 7:23 AM, Mark Mooij wrote: Allright I tried a couple of things with your suggested appraoch: I doubt it. You shouldn't really do this: kmlpath = "%s/%s" % (basepath, game_id) I suggested this to avoid having to cast game

Re: Create files and directories from Django 1.2.1

2010-08-16 Thread Doug Blank
On Mon, Aug 16, 2010 at 9:49 AM, Mark Mooij wrote: > Hi Doug, > > Thanks for your reply. I tried your suggestion: > .. > import createKML > .. > def createKML(id, basepath=os.getcwd()): >   ... >   try: >        kmlpath = os.path.join(basepath, "templates") >        kmlpath = os.path.join(kmlpath,

Re: Create files and directories from Django 1.2.1

2010-08-16 Thread Mark Mooij
Hi Doug, Thanks for your reply. I tried your suggestion: .. import createKML .. def createKML(id, basepath=os.getcwd()): ... try: kmlpath = os.path.join(basepath, "templates") kmlpath = os.path.join(kmlpath, "maps") kmlpath = os.path.join(kmlpath, str(id)) if

Re: Create files and directories from Django 1.2.1

2010-08-16 Thread Doug Blank
On Mon, Aug 16, 2010 at 7:23 AM, Mark Mooij wrote: > Allright I tried a couple of things with your suggested appraoch: > > - I printed all the strings used to define paths and files, this all > seems correct. > > - The os.mkdir() command is passed without raising an error, but > without creating t

Re: Create files and directories from Django 1.2.1

2010-08-16 Thread Mark Mooij
Allright I tried a couple of things with your suggested appraoch: - I printed all the strings used to define paths and files, this all seems correct. - The os.mkdir() command is passed without raising an error, but without creating the directory either, this results in an "IOError: No such file o

Re: Create files and directories from Django 1.2.1

2010-08-15 Thread Mike Dewhirst
On 16/08/2010 12:57pm, Mike Dewhirst wrote: On 16/08/2010 1:06am, Mark Mooij wrote: Hi Mike, Thanks for your reply. I haven't changed anything else, I am processing the MS updates, but I don't think this is the problem, as this all worked fine before the migration to 1.2.1, also if I call the s

Re: Create files and directories from Django 1.2.1

2010-08-15 Thread Mike Dewhirst
On 16/08/2010 1:06am, Mark Mooij wrote: Hi Mike, Thanks for your reply. I haven't changed anything else, I am processing the MS updates, but I don't think this is the problem, as this all worked fine before the migration to 1.2.1, also if I call the script directly (outside Django) it works fine

Re: Create files and directories from Django 1.2.1

2010-08-15 Thread Mark Mooij
Hi Mike, Thanks for your reply. I haven't changed anything else, I am processing the MS updates, but I don't think this is the problem, as this all worked fine before the migration to 1.2.1, also if I call the script directly (outside Django) it works fine. My view looks like this: .. import creat

Re: Create files and directories from Django 1.2.1

2010-08-14 Thread Mike Dewhirst
On 15/08/2010 12:10am, Mark Mooij wrote: Hi all, I recently migrated from Django 1.1.1 to 1.2.1. In 1.1.1 I had an application which imports an external python script in which a directory and some files are created. Since the migrate this doesn't work anymore, I get a number of IOErrors because

Create files and directories from Django 1.2.1

2010-08-14 Thread Mark Mooij
Hi all, I recently migrated from Django 1.1.1 to 1.2.1. In 1.1.1 I had an application which imports an external python script in which a directory and some files are created. Since the migrate this doesn't work anymore, I get a number of IOErrors because the files (and directory) that should be cr