C# to Python converter [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have a large C# library that I need to convert to Python. Python is a customer requirement, I can not use any other language.
Any automatic C# to Python converter?
Edit: I need a pure Python solution. .Net is not an option for me.

Assuming IronPython will meet their requirement, SharpDevelop can do that for you. I have a feeling it will still be quite painful.
Here's a link:
http://community.sharpdevelop.net/blogs/mattward/archive/2009/05/11/ConvertingCSharpVBNetCodeToIronPython.aspx

You should convince your costumer that Python language can interact with .Net using some libraries. It would be a waste of time to re write the whole library in Python and then test the Python code for any bugs.
There is a library called Python for .NET, by which you can call .net classes and functions inside your Python code, you can create a wrapper code for calling the .Net code.
If you write a wrapper class, it would be just like calling Python classes and functions to other Python programmers.

Related

Integrate Python based TensorFlow into a .NET application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
It seems that in order to fully use TensorFlow and associated libraries I need to access it from Python. Utilizing TensorFlow requires building rather complicated graphs which Python helper libraries (e.g. Keras) automate in sophisticated ways. I don't see a way to do that directly from .NET. See for example the respective GitHub discussion about C# support.
My idea is this: The main C# application will call into a Python application to access TensorFlow. That way most code will remain in C# land. I can use CPython which has full support for everything (IronPython does not).
How would I go about "calling into a Python application"? I assume I will need to run python.exe in a child process and make it execute commands. The child process will need to remain running between commands so that I can keep/share objects and data.
How would I best go about doing this? I don't quite know where to start.
Have a look on this:
https://github.com/migueldeicaza/TensorFlowSharp
TensorFlowSharp are .NET bindings to the TensorFlow library. This surfaces the C API as a strongly-typed .NET API for use from C# and F#.

Is there a .NET text diff library from Microsoft? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I would like to use a C# .NET diff/comparison library for text files (C++ to be more precise, but it should not matter).
I have found a lot of libraries in the topic but what I need is a something that is part of the .NET library or it comes from Microsoft. The reason of this restriction is that I do not have to go over our company's long open source tool approval process.
Does C# .NET has such feature?
An example for the usage: I have two slightly different .cpp files. I have to create one .cpp file which will have a #ifdef according to the differences of the two files and we can use one file at two places controlled by a predecessor definition.
There is no such built in functionality in any Microsoft .Net library.

How to implement C# syntax to use with own platform? ECMA Standard [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I want to know, is this possible to use C# language syntax in own platform? I know that C# is ECMA standartized language. So how can it be implemented?
I know there are examples such as Mono & Unity3D who implemented C#.
So for example : One common class library (own, written in C) & C# as a programming language.
The problem is that I never did that before, so I am interested what should I read & where to start. Any other articles about implementing syntax will be good.
If you want to write a compiler for C#, the place to start is the Dragon Book, alongside a copy of the C# 4 spec. It's an awful lot of work though, and not for the faint of heart; you generally need years of experience to write a compiler for something as complicated as C#.
I recommend starting with a smaller language, maybe a trivial language like brainfuck, or looking at existing toy compilers.
imho there are a very few cases when you need to write your on parser / compiler etc.
I would do it in a different way.
First option would be to run .Net from your C application. You can for instance use Mono for that. Here is a description: http://www.mono-project.com/Embedding_Mono
The second option would be to use your c class library directly from C# applications. Check http://www.pinvoke.net/ for example on how to declare them.
One obvious option is to retarget the Mono AOT. This is how MonoTouch works, for example.
The hard route is to implement your own C# parser, compiler and a large part of its standard library.

Convert VB.NET code to C# [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I have three projects written with VB.NET (2005) and have to convert them to C# code. (I know that i don't need to convert codes of .net languages at all). I have no time to rewrite them, need a tool or script to convert.
Note: they are console applications.
Reflector lets you inspect compiled assemblies in several different .Net languages. I've known people to cut and paste the output to convert between languages. Apparently it also has an export feature.
SharpDevelop can do this, but depending you your vb.net code a lot of manual work will remain.
http://converter.telerik.com/
Another option is using Carlos Aguilar's converter. Converts from VB.NET to C# and viceversa.
Experience shows me that different converters are better than others in certain areas so I'd recommend you to use more than one, if possible, and compare their output.
There is a cool .net code conveter tool available online here. Try this if it helps to you.
Free Online .Net Code Converter

Open source C# compilers in C#? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Are there any open source C# compilers written in C#?
I know of Blue, but it was written in 2001 and only supports C# 1:
Mike Stall's 'Blue' C# Compiler
Ideally, I'm looking for one which supports C# 3.0 - but even 2.0 would be fine.
mono's C# compiler is written in C#. If you need to just parse C# source text, you may use NRefactory.
How about the mono C# compiler, which is written in C# itself. You can browse the source here.
Here is another one, but also quite old, from 2002.

Categories