# Air2 NativeProcess -- launching Python scripts

**URL:** <https://forum.kirupa.com/t/air2-nativeprocess-launching-python-scripts/310159>\
**Category:** Uncategorized\
**Created:** [June 3, 2010, 2:00am UTC](https://forum.kirupa.com/t/air2-nativeprocess-launching-python-scripts/310159 "2010-06-03T02:00:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anogar](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Anogar](https://forum.kirupa.com/u/Anogar)\
**Post date:** [June 3, 2010, 2:00am UTC](https://forum.kirupa.com/t/air2-nativeprocess-launching-python-scripts/310159/1 "2010-06-03T02:00:39Z")

</div>

**Edit:** I gave up on Python and wrote the stdout interface with a C++ Win32 Console .exe file. It works fine. Bleegghh. 😑

**Old post:**

I’m trying to communicate with a Python script. It is not going well. ☹

So, first off, I can’t get the ■■■■■■ thing to launch for the life of me – so I’m focusing on that issue. I can get CERTAIN .exe files to launch, but not all of them. If I bundle putty.exe (lol) in a folder called NativeProcess it works fine, but I can’t launch python.exe from my computer. ☹

Check this out:

```auto
var file:File = File.applicationDirectory;
if (Capabilities.os.toLowerCase().indexOf("win") > -1)
{
        //file = file.resolvePath("NativeProcess/putty.exe"); //:: This works...
        //file = file.resolvePath("NativeProcess/test.py"); //:: This is what I really want, and it doesn't work...
	//file = file.resolvePath("C:/Windows/notepad.exe"); //:: This works too... 
	file = file.resolvePath("C:/Python31/python.exe"); //:: This does not work :( 
}

log(file.nativePath);

var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = file;

var process:NativeProcess = new NativeProcess();
process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
process.start(nativeProcessStartupInfo);

```
