# Start Blender with popen in windows 7 [duplicate]

I am trying to start and run a blend file with python3 popen under windows 7, but all I am able to do is start Blender.

blendFile = "D:\_Blender_Files\atrium.blend"
blenderPath = r"C:\Program Files\Blender Foundation\blender-2.71-windows64\blender.exe"
subprocess.Popen([blenderPath, blendFile], stdout=subprocess.PIPE)

• closing, the issue with slash direction is a common beginner mistake, and not specific to Blender. – ideasman42 Jul 15 '14 at 23:23

It's because of the escape character "\" and how python handles it. Windows paths on python scripts are a nightmare. So you have to escape the backslash.

Try :

blendFile = "D:\\_Blender_Files\\atrium.blend"
blenderPath = r"C:\\Program Files\\Blender Foundation\\blender-2.71-windows64\\blender.exe"
subprocess.Popen([blenderPath, blendFile], stdout=subprocess.PIPE)


or with simple slashes (python handles it well) :

blendFile = "D:/_Blender_Files/atrium.blend"

• Dang, you hit the nail, thank You for the fast reply! – Gilles Jul 15 '14 at 13:41