1

I have a complex piece of F# client code which successfully accesses some webservices.

The specification of the project has now changed and I wish to manipulate the data extracted from the webservices in python, instead of wasting time and energy on writing a python client I would like to access the F# code from python.

I know that this is possible if the client code was written in C# or c, but how do I do this with F#?

I cant find any reference of anyone doing this on the internet.

Anyone have any ideas?

Franckentien
  • 324
  • 6
  • 21
CuriousPython
  • 51
  • 1
  • 5
  • 2
    What do you mean by accessing the F# code. Do you want to run it? If so you can use subprocess or os.system – Metareven Jan 08 '18 at 13:27
  • Yes, thank you! Thanks for your help. I would like to adjust variables remotely and run the code. Do you know of a good example of where this has been done with F#. – CuriousPython Jan 08 '18 at 13:29
  • 1
    Your description of the problem is merely vague (hence making the question off-topic here), but for sake of starting point, check this 3rd party project: [**Python for .NET**](https://pythonnet.github.io/) (`pythonnet`) is a package that gives Python programmers nearly seamless integration with the .NET 4.0+ Common Language Runtime (CLR) on Windows and Mono runtime on Linux and OSX. – Be Brave Be Like Ukraine Jan 08 '18 at 13:39
  • Sorry, how is it vague? I would like to run code written in F# from python. Thanks to Metareven I now know I should use a subproccess or os.system. I couldnt give specifics because I didn't know where to start and was asking for a starting point and possibly an example. – CuriousPython Jan 08 '18 at 13:45
  • 2
    If you use subprocess or os.system it's like running a terminal inside your python script. You would run your F# code the same way you would from a terminal. Any examples of how to run anything using os.system or subprocess should be sufficient. Try to solve it yourself and post your failing code in the question if you are unable to solve your problem – Metareven Jan 08 '18 at 14:37
  • Thanks to you I have a starting point, so that is my intent. Thanks for the follow up. – CuriousPython Jan 08 '18 at 14:39
  • byebuster, how is copying the first paragraph of the helpful webpage into the comments a starter? Do you have any comments as to how it can be applied? The use of the word merely is also condescending, people come here to learn! –  Jan 10 '18 at 17:19
  • Possible duplicate of [interprocess C# python real time](https://stackoverflow.com/questions/11371448/interprocess-c-sharp-python-real-time) – Clint Jan 26 '18 at 16:56

0 Answers0