POV-Ray : Newsgroups : povray.windows : Python, subprocess, error! : Re: Python, subprocess, error! Server Time
6 Nov 2024 00:44:47 EST (-0500)
  Re: Python, subprocess, error!  
From: Mr
Date: 30 Jul 2014 05:45:01
Message: <web.53d8bded4d559dd816086ed00@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 29.07.2014 21:24, schrieb LanuHum:
> > Hellow!
> > I want to make a render in a shadow mode for a preview of materials in Blender
> > In Linux - no problem, preview very good
> > In Windows don't work
> > http://blender-3d.ru/forum/index.php?action=dlattach;topic=753.0;attach=2930;image
>
> It does tell you what's wrong:
>
> "Cannot open INI file 'C:\povray\preview/Preview.ini'."
>
> Make sure the file is indeed at that location.

oh, it looks like something is wrong with the slash/backslash\ handling in the
report.  Can you let me know if the last version does work for you?

wheneverpossible using the os.path module methods to concatenate, truncate or
whatever one has to do with paths makes sure it works more smoothly across
platforms. possibly one slash should be removed from the hardwritten filename
and left to be handled by the python's os.path methods, for instance current
version is:


 workDir=os.path.dirname(__file__)
 previewDir=os.path.join(workDir, "preview")

 ## Make sure Preview directory exists and is empty
 if not os.path.isdir(previewDir):
 os.mkdir(previewDir)

 iniPrevFile=os.path.join(previewDir, "Preview.ini")
 inputPrevFile=os.path.join(previewDir, "Preview.pov")


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.