Recently in python Category

地址http://code.google.com/p/amfast

  • AmFast is fast and flexible.
  • Map custom classes with ClassDef objects for complete control over serialization/de-serialization.
  • Map NetConnection and RemoteObject headers and messages with invokable Target objects for complete control over callable remote endpoints.
  • NetConnection and RemoteObject authentication protocols are supported by the Target mapping functionality.
  • Data persistence with SqlAlchemy including remotely-loadable lazy-loaded attributes.
  • Actionscript code generation.
  •  

    挺不错的

    今天刚装了下

     

    之前有pyamf

    http://www.actionscript3.cn/magicianzrh/archives/python/pyamf/

     

    Good Luck & Have Fun

     

    Python3.0正式版发布

    | No Comments | No TrackBacks

    http://www.python.org/

    已经发布了

    目前已经有了2.*迁移到3.0的工具,不过我觉得还不如保留在2.6,除非新的东西那就用Python3.0吧

    我还待在2.52,要么就直接跳到3.0算了,忙完这段时间先

     

    Good Luck & Have Fun!

    先把代码包放上来

    FlexLoadFlashLibResource.zip

    其实flex加载外部图片有很多办法,比较爽的就是Embed标签嵌入,不过数量多了也是相当麻烦

    这阵子做点东西,因为资源太多,特别有规则的如果利用BitmapData切图的办法会浪费很多运算,只好在Java中把图片切好,还好,虽然Java有段时间没有去写过,前阵子在用Python,本来也想Python搞定--多爽,哎,历史遗留问题,Java实在太臃肿了

    干这事情主要是Concurrency with Python, Twisted, and Flex,作者是Bruce Eckel,不得不看

    说实话Python写起来真的相当的流利,我很喜欢这种感觉

    配置了好久终于大功告成,给自己做个小记录,怕以后忘记掉

    首先下载好Python安装包http://www.python.org/,可能我的是Windows Server 2008比较悲剧,环境变量得自己添加,习惯性安装在D:\python25,自然在系统环境变量中加入";D:\Python25;D:\Python25\scripts",这对于之后的cmd操作比较方便,不然你得一直打路径

    Django在这http://www.djangoproject.com/,目前已经1.0出来了,可以直接下载压缩包,当然如果有svn工具也可以在cmd中用svn下载和以后的更新

    我下载解压到D:\python25\django中

    cmd中转到D:\python25\django目录,使用python setup.py install进行安装,正常的话在D:\python25\Lib\site-packages\中会有django,同样,需要把";D:\python25\Lib\site-packages\django"添加到环境变量,当然这只是为了方便

    这时候在Python IDLE中如果import django没报错就是安装正常了

    对于PyAMFhttp://pyamf.org/,里面的install文档其实也写得很清楚了,在python目录下,cmd中python ez_setup.py确定你是否安装好easy_install,之后easy_install pyamf会自动联网帮你下载和安装pyamf,当然前提你得联网,不然你得自己手动配置 

    对于Twistedhttp://twistedmatrix.com/trac下载到符合python版本和系统类型的就装吧,win下面的是傻瓜式安装

    假设你安装好了Apache,这个配置太多了,使用apahce得有个mod_python http://www.modpython.org/,只要选好,也是傻瓜式安装,之后在apache的httpd.conf中的LoadModule区域添加"LoadModule python_module modules/mod_python.so"之后重启apache

     

    到这里安装部分就搞定了,测试手段:

    找到你apache设定的localhost地址,我的是E:\myWeb,cmd到那个目录,django-admin.py startproject firsttest,会在myWeb下创建firsttest目录,当然也会有相应的部署文件

    <Location "/firsttest/">
        SetHandler python-program
        PythonPath "['E:\myWeb'] + sys.path"
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE firsttest.settings
        PythonDebug On
    </Location>

    <Location "/media/">
        SetHandler None
    </Location>

    <LocationMatch "\.(jpg|gif|png)$">
        SetHandler None
    </LocationMatch>

    上面的直接添加到httpd.conf中最下面,当然你也可以安装文档中说的放到相应位置,上面黑体加重的是针对不同的项目配置需要修改的地方

    这时候重启Apache,http://localhost/firsttest,出现It works,那就表示一切正常了

    PyAMF的svn中有很多这方面的例子,都蛮不错的,作为参考价值很高

     

    Good Luck & Have Fun!

    一直没有注意到Python已经向手机移动领域发展了,今天无意见看到,原来都发展这么久了

    现在可以在sourceforge里找到了:http://sourceforge.net/projects/pys60/,最新是1.4.1

    下面这个网站大家可以去看看,是个Python for S60的收集站点,看url就知道了http://www.pys60.cn

    所以安装之类的就不说啦,上面的文章看完就差不多了

    不过怎么说用手机打字都是不爽的,上面站点有文章提到电脑模拟手机平台的资料

    Flash Lite3应该开放更多的功能的~~~~

    Good Luck & Have Fun!

    About this Archive

    This page is an archive of recent entries in the python category.

    Openfire is the previous category.

    Silverlight is the next category.

    Find recent content on the main index or look in the archives to find all content.

    3D Live Statistics