C# - Using method from a Python file
<p>I have two files, a regular python (.py) file and a visual studio C# file (.cs). I want to use a function in the python file which returns a string and use that string in the C# file. </p>

<p>Basically:</p>

<pre><code>#This is the Python file!
def pythonString():
   return "Some String"
</code></pre>

<p>and</p>

<pre><code>//This is the C# file!
namespace VideoLearning
{
    string whatever = pythonString(); // This is from the Python file.
}
</code></pre>

<p>How can I sort of link these two files together? Thanks.</p>

<p>You can also try pythonnet:</p>

<p><a href="http://www.python4.net" rel="nofollow">python4.net</a></p>

c# python .net ironpython python.net