欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程语言 > python >内容正文

python

玩玩IronPython

发布时间:2025/3/15 python 31 豆豆
生活随笔 收集整理的这篇文章主要介绍了 玩玩IronPython 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

感觉比POWERSHELL强多了,爽多了。也自然多了。。。。

C#,JAVA, PYTHON, C ,汇编,我都要了解一下呀。

现在感觉C++介入较少,可能我还没有想到结合职业的应用吧。

空闲的时候,作为一个兴趣,也要进去C++去看一下的。。

前年购了陈良乔的书的,但看着没啥感觉。。

1 #!/usr/bin/python 2 # -*- coding: utf-8 -*- 3 4 5 import clr 6 clr.AddReference("System.Windows.Forms") 7 clr.AddReference("System.Data") 8 clr.AddReferenceByPartialName("System.Drawing") 9 10 from System.Collections import * 11 from System.Windows.Forms import * 12 from System import * 13 from System.Drawing import * 14 15 16 class HelloWord(Form): 17 def __init__(Word): 18 Word.Text='hello' 19 Word.ClientSize=Size(600,455) 20 # 添加个button 21 myButton =Button() 22 myButton.Text="say Hellon" 23 myButton.Location =Point(12,136) 24 myButton.Click += Word.myButton_Click 25 Word.Controls.Add(myButton) 26 27 28 29 30 # 定义事件 31 def myButton_Click(Word, *args): 32 MessageBox.Show("hello word","welcome") 33 34 35 Application.Run(HelloWord())

准备结合VS2012学习一下。

IndentationError: unindent does not match any outer indentation level

这是缩进错误,收藏。

SyntaxError: Non-ASCII character '\xcc' in file c:\ipython\myFistPython.py on line 18, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

这是编码错误,用定义CODING编码方式解决:

#!/usr/bin/python
# -*- coding: utf-8 -*-

收录。。。。

 

转载于:https://www.cnblogs.com/aguncn/archive/2013/05/02/3054457.html

总结

以上是生活随笔为你收集整理的玩玩IronPython的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。