I have some Python code which I am finding difficult to read and I don't really want to learn the Python syntax if I can help it.
Can someone point me to a Python to C# converter?
I have some Python code which I am finding difficult to read and I don't really want to learn the Python syntax if I can help it.
Can someone point me to a Python to C# converter?
I'd rather suspect that such a tool doesn't exist. And if it did, it's output would be harder for a C# programmer to read than the input would be.
A better choice would be to uses IronPython to compile the Python and then use it from c#. if those guys did there job right, you should get all the intellisense you need to never look at the python. OTHO moding the code might be a pain.
You can try to compile your python app using IronPython (http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython) to .NET, this should be possible without or just minor changes. This way you can make use of alle the .NET features from python.
Then you can decompile your IronPython assembly with an .NET decompiler like Lutz Roeders Reflector (http://www.red-gate.com/products/reflector) which can decompile whole Assemblies into Visual Studio projects. This way you can convert from ANY .NET Langauge into one of the supported languages of this program (C#.VB.NET,MC++,Delphi,Chrome)
I would think in the time it takes you to figure out a way to do such a conversion with output that is actually useful, you could learn Python enough to follow the code. It has one of the simplest syntaxes of any language and some people even refer to it as "executable pseudo-code."
You might also learn something else along the way...
Thanks a lot for all the suggestions and comments guys! I think I'm just going to have bite the bullet and learn enough Python to get by ... yes it's part of being a programmer, and I know it should be fairly straightforward, but I wanted to just understand the code and not get distracted by the syntax ...
Unfortunately not in the direction you want, but there's a C# to Python converter on developer fusion that might help you learn the syntax?