C# 代码转换到Python
下载地址:http://pan.baidu.com/s/1dDAZJxv
SharpDevelop 3.1 now supports converting C# and VB.NET code to IronPython. It can convert a single file or an entire project. The code to convert between these languages is still under development and has some limitations.
Converting an Individual File
To convert a C# or VB.NET file, open it in SharpDevelop's text editor, then from Tools menu select Convert code to Python.
The code conversion is limited to converting classes so it will not convert an arbitary piece of code that is not inside a class.
Converting a Project
To convert a C# or VB.NET project, open it in SharpDevelop, then from the Project menu select Convert From C# to Python.
Once converted the project will most likely not compile straight away due to limitations in the implementation. At the time of writing converting a project has the following limitations:
- Project's Main File is not set.
- No code generated to call the project's Main entry method.
- Namespace imports do include all the used classes.
Code Conversion Internals
Converting code to IronPython was originally supported in SharpDevelop 2.2 and was based on converting code to aMicrosoft CodeDOM and then getting IronPython 1.0 to generate the Python code. In IronPython 2.0 this CodeDOM support was removed so the code conversion feature was removed from SharpDevelop 3.0 since that was using IronPython 2.0. In SharpDevelop 3.1 the code conversion has been rewritten to no longer use the CodeDOM support. It now works by executing the following simple steps:
- The C# or VB.NET code is parsed using SharpDevelop's parsing library NRefactory and an abstract syntax tree (AST) is generated.
- A visitor class then walks this AST and generates Python code which is added to a StringBuilder.
- Once the visit is complete the generated Python code is then displayed or saved to disk.
C# 代码转换到Python的更多相关文章
- urllib2模块中文翻译与学习 - Python 2.7.8官方文档
总结 目的 打开指定网址 要求 了解需要处理的网站的操作流程 数据包的构造与提交 对可能的响应处理选择合适的处理器(模块内的各种 *Handler()) 核心 urllib.urlencode(que ...
- Github上的python开源项目
Python开源项目,期待大家和我们一起共同维护 github排名榜单 https://github.com/trending github搜索榜单:https://github.com/search ...
- 学习 Python,这 22 个包怎能不掌握?
如今全球各个行业内 Python 的使用状况怎么样呢? 很多人学习python,不知道从何学起.很多人学习python,掌握了基本语法过后,不知道在哪里寻找案例上手.很多已经做案例的人,却不知道如何去 ...
- Scratch3 二次开发系列
Scratch3.0来啦!!! Scratch做为图像化编程的首选语言,拖过积木块搭建实现动画游戏的制作.Scratch3添加了音乐.画笔.视频侦测.文字朗读.翻译等选择性下载扩展积木,可实现积 ...
- 爬虫05 /js加密/js逆向、常用抓包工具、移动端数据爬取
爬虫05 /js加密/js逆向.常用抓包工具.移动端数据爬取 目录 爬虫05 /js加密/js逆向.常用抓包工具.移动端数据爬取 1. js加密.js逆向:案例1 2. js加密.js逆向:案例2 3 ...
- 对 js加密数据进行爬取和解密
对 js加密数据进行爬取和解密 分析: 爬取的数据是动态加载 并且我们进行了抓包工具的全局搜索,没有查找到结果 意味着:爬取的数据从服务端请求到的是加密的密文数据 页面每10s刷新一次,刷新后发现数据 ...
- 用 VS Code 搞Qt6:使用 PySide 6
一般来说,用C++写 Qt 应用才是正宗的,不过,为了让小学生也能体验 Qt 的开发过程,或者官方为了增加开发者人数,推出了可用 Python 来编程的 Qt 版本.此版本命名比较奇葩,叫 PySid ...
- Python和JavaScript间代码转换4个工具-乾颐堂
Python 还是 JavaScript?虽然不少朋友还在争论二者目前谁更强势.谁又拥有着更为光明的发展前景,但毫无疑问,二者的竞争在 Web 前端领域已经拥有明确的答案.立足于浏览器平台,如果放弃 ...
- Python和JavaScript间代码转换4个工具
Python 还是 JavaScript?虽然不少朋友还在争论二者目前谁更强势.谁又拥有着更为光明的发展前景,但毫无疑问,二者的竞争在 Web 前端领域已经拥有明确的答案.立足于浏览器平台,如果放弃 ...
随机推荐
- Remote Desktop Connection Manager 多个远程管理
http://www.microsoft.com/en-us/download/details.aspx?id=21101 Remote Desktop Connection Manager 多个远程 ...
- redis 网络流程图 <一>
本来一直想好好读下redis源码.可是每次读了一点就不读了. 主要是没坚持每天都读. 隔几天看.就忘记前面的流程.就越来越不想看了. 很是蛋疼.这个还是要坚持读完的.打算这段时间都源码的时候.都大 ...
- OpenRisc-44-or1200的pipeline整体分析
引言 我们在前面分析了ORPSoC,or1200_top,和or1200_cpu的整体架构,在最近,我们也分析了or1200的pipeline(流水线)中的两级,EX级和IF级. 但是,我们还没有从宏 ...
- 解决Qt5.7.0 cannot find -lGL
很久没用Qt了,这次要做一个协议编辑器,在ubuntu 14.04上安装了最新版本的Qt 5.7.0.界面改用扁平化风格,第一感觉还不错.按默认步骤创建了一个gui程序,编译运行,报了一个错:cann ...
- 手游架构-REST架构
REST架构风格是全新的针对Web应用的开发风格,是当今世界最成功的互联网超媒体分布式系统架构,它使得人们真正理解了Http协议本来面貌.随着 REST架构成为主流技术,一种全新的互联网网络应用开发的 ...
- Myeclipse7.5 下载 安装 注冊 注冊码 100%成功
myeclipse7.5启动画面 1.下载Myeclipse官方原版 官方原版:或者 http://downloads.myeclipseide.com/downloads/products/ewor ...
- Linux下Weblogic域的创建过程
环境介绍:操作系统 :Redhat 5.5Weblogic :英文版 8.1.6 Weblogic安装目录 :/weblogic 一.域的建立执行下面语句进入weblogic的bin目录: cd /w ...
- 百度之星资格赛 hdu 4826 Labyrinth 动态规划
/********************* Problem Description 是一仅仅喜欢探险的熊.一次偶然落进了一个m*n矩阵的迷宫,该迷宫仅仅能从矩阵左上角第一个方格開始走,仅仅有走到右上 ...
- MODULE_DEVICE_TABLE
1. MODULE_DEVICE_TABLE (usb, skel_table);该宏生成一个名为__mod_pci_device_table的局部变量,该变量指向第二个参数.内核构建时,depmod ...
- mybatis一对多,多对一
假设两张表 person对order为一对多 实体类 person package com.kerwin.mybatis.pojo; import java.util.List; public cla ...