User Tag List

Results 1 to 6 of 6

Thread: read python script output

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    read python script output

    Hi, is it possible to call a python script from MMF and read its output when it finishes? I tryiend to use the pipe object, but it seems not to work on this situation...

    In fact... what about a pyhton extension in the same shape as the dotNet one? This would be awesome!

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: read python script output

    Try the Console object.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: read python script output

    I faced the very same problem with the console object... I'm currently make my mmf application communicate with my python scripts using a mysql server, but getting the output from the script would be great...

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    2,023
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: read python script output

    what commands are you using to return values?

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export ModuleXNA Export Module
    Fusion 2.5 (Steam)
    Mathias's Avatar
    Join Date
    Jun 2006
    Location
    Copenhagen, Denmark
    Posts
    1,083
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: read python script output

    Quote Originally Posted by Chokito
    Hi, is it possible to call a python script from MMF and read its output when it finishes? I tryiend to use the pipe object, but it seems not to work on this situation...

    In fact... what about a pyhton extension in the same shape as the dotNet one? This would be awesome!
    You need to call the Python interpreter with unbuffered output (python.exe -u script.py).

    Also, it is possible to use a Python wrapper/implementation in dotNet (respectively "Python for .NET" and "IronPython", the later being less compatible with native Python libraries).

    I wrote something for IronPython before, but you should be able to do it easily yourself.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jun 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: read python script output

    That was perfect! The -u option made it work!

Similar Threads

  1. Python not working correctly when exported (and Python with iOS)
    By iOSC in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th April 2013, 12:10 PM
  2. Python Object - Get Python Variables from MMF2
    By DizzyDoo in forum Python Scripting
    Replies: 2
    Last Post: 26th December 2011, 01:57 PM
  3. retrieve data from python script
    By cel in forum Python Scripting
    Replies: 2
    Last Post: 8th July 2010, 09:40 PM
  4. getting output from cmd
    By MechatheSlag in forum dotNet Scripting
    Replies: 3
    Last Post: 31st May 2009, 06:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •