尝试Python更新 [英] Try Python update

查看:46
本文介绍了尝试Python更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

花了一些时间我应该一直在努力工作,尝试使用更好的功能。它现在允许语句,包括多行语句和表达式的
。你不能创建代码

对象,所以它仍然是一个可编程的计算器而不是

任何真实的东西。


我也有一些教程文本(字面上)。我希望

让它更容易阅读教程,并在不久的将来同时与

进行交互。


网址为 http://www.mired.org/home/mwm / try_python /

问题的报告将受到赞赏。


如果您想尝试一个可以保存代码的在线P {ython工具,请尝试

Devan L''at http://www.datamech。 com / devan / trypython / trypython.py


< mike

-

Mike Meyer< ; mw*@mired.org> http://www.mired.org/home/mwm/

独立的WWW / Perforce / FreeBSD / Unix顾问,电子邮件以获取更多信息。

解决方案

酷。我认为这真的是一件好事。如果在没有安装Python的奇怪的Windows机器上,或者在使用没有Python的

PDA时,可以派上用场。

>

这只是一个很好的壮举。 ;-)))


Ron




Mike Meyer写道:< blockquote class =post_quotes>花了一些时间后,我应该一直在睡觉,尝试使用python网站更加实用。它现在允许语句,包括多行语句和表达式。你不能创建代码
对象,所以它仍然是一个可编程的计算器,而不是真正的任何东西。

我有一些教程文本(字面意思)也是。我希望在不久的将来能够更容易地阅读教程并在同一时间与python进行交互。

网址是 http://www.mired.org/home/mwm/try_python/

如果你想尝试一个可以让你保存代码的在线P {ython工具,试试
Devan L''s at a a rel = nofollowhref =http://www.datamech.com/devan/trypython/trypython.pytarget =_ blank> http://www.datamech.com/devan/trypython/trypython.py 。




我的代码使用Python Cookbook中的一个食谱,7.6 Pickling

代码对象。但它仅限于封口。就像在食谱中一样。

所以,你不能在我的封口里写封口。


注意,我的兄弟已经修改了C内部,现在

__subclasses__受到限制,很多很多os和posix命令都受到限制(不是说你可以得到它们) ,因为导入是
坏了!)


" Devan L" <德**** @ gmail.com>写道:

如果你想尝试一个可以保存代码的在线P {ython工具,试试 http://www.datamech.com/devan/trypython/trypython.py 。我的代码使用了Python Cookbook中的一个配方,7.6 Pickling
代码对象。它只限于封口。就像在食谱中一样。
所以,呃,你不能写我的封口。




我不喜欢没有死树版本,在线版本没有b $ b有章节编号。那是< URL:

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/212565>?

在附注中,我的兄弟已经修改了C内部,现在
__subclasses__受到限制,很多很多操作系统和posix命令都受到限制(不是你可以得到它们,因为导入被打破了!)




我通过腌制成对名称来导入工作 - 引用模块的变量名称

以及模块的名称。当它取消列表时,它会重新导入它们并指向它们的相应

变量。如果您执行import

this,则会产生不良影响。它也不适用于包含对

模块的引用的对象。


我尝试了一些限制事情,然后放弃并做了它

外部。没有任何文件的访问权限,但是那些需要运行

处理事物的脚本,以及我确定的其他一些python模块将会很好。通常情况下,树中没有任何东西可以写入。一旦我对它感到满意,我会在某处保存一张树的副本

并设置一个cron作业来刷新定期。


< mike

-

Mike Meyer< mw*@mired.org> http://www.mired.org/home/mwm/

独立的WWW / Perforce / FreeBSD / Unix顾问,电子邮件以获取更多信息。


After spending time I should have been sleeping working on it, the try
python site is much more functional. It now allows statements,
including multi-line statements and expressions. You can''t create code
objects yet, so it''s still more a programmable calculator than
anything real.

I''ve got some of the tutorial text (literally) up as well. I hope to
make it easier to read the tutorial and interact with python at the
same time in the near future.

The url is http://www.mired.org/home/mwm/try_python/. Reports of
problems would appreciated.

If you want to try an online P{ython tool that lets you save code, try
Devan L''s at http://www.datamech.com/devan/trypython/trypython.py.

<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

解决方案

Cool. I think its really a good thing. Could come in handy when one is
on a strange Windows machine with no Python installed, or when using a
PDA that doesn''t have Python etc.

And its just a neat feat. ;-)))

Ron



Mike Meyer wrote:

After spending time I should have been sleeping working on it, the try
python site is much more functional. It now allows statements,
including multi-line statements and expressions. You can''t create code
objects yet, so it''s still more a programmable calculator than
anything real.

I''ve got some of the tutorial text (literally) up as well. I hope to
make it easier to read the tutorial and interact with python at the
same time in the near future.

The url is http://www.mired.org/home/mwm/try_python/. Reports of
problems would appreciated.

If you want to try an online P{ython tool that lets you save code, try
Devan L''s at http://www.datamech.com/devan/trypython/trypython.py.



My code uses one of the recipes from the Python Cookbook, 7.6 Pickling
Code Objects. It''s limited to closures though, just like in the recipe.
So uh, you can''t write closures in mine.

On a side note, my brother has tinkered with the C internals and now
__subclasses__ is restricted and many, many os and posix commands are
restricted (not that you can get them anyways, since importing is
broken!)


"Devan L" <de****@gmail.com> writes:

If you want to try an online P{ython tool that lets you save code, try
Devan L''s at http://www.datamech.com/devan/trypython/trypython.py. My code uses one of the recipes from the Python Cookbook, 7.6 Pickling
Code Objects. It''s limited to closures though, just like in the recipe.
So uh, you can''t write closures in mine.



I don''t have the dead trees version, and the online version doesn''t
have chapter numbers. Is that <URL:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/212565>?
On a side note, my brother has tinkered with the C internals and now
__subclasses__ is restricted and many, many os and posix commands are
restricted (not that you can get them anyways, since importing is
broken!)



I got import to work by pickling pairs of names - the variable name
that references the module, and the name of the module. When it
unpickles the list, it reimports them and points the appropriate
variable at them. This had unwanted effects if you did an "import
this". It also doesn''t work for objects that contain references to
modules.

I tried for a bit to restrict things, then gave up and did it
externally. There''s no access to any files but those required to run
the script that deals with thing, and some other python modules that I
decided would be nice to have. Normally, nothing in the tree is
writable, either. Once I''m happy with it, I''ll save a copy of the tree
somewhere and set up a cron job to "refresh" it at regular intervals.

<mike
--
Mike Meyer <mw*@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.


这篇关于尝试Python更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆