Python论坛  - 讨论区

标题:[python-chinese] DirectPython的硬件加速

2008年01月16日 星期三 13:52

Question wanliyou在gmail.com
星期三 一月 16 13:52:27 HKT 2008

Hi,

   刚装了个for 2.4系列的DirectPython打开sample一看貌似硬件加速没开,很慢。各位有这个问题么?我的机器跑DirectX
SDK里的sample没问题的。

-- 
>: ~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20080116/184f9b63/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月16日 星期三 14:05

tairan wang python在tairan.net
星期三 一月 16 14:05:18 HKT 2008

´òËãÓÃÒ»¸öpythonдһ¸öÃüÁîÐеijÌÐò£¬²»ÖªµÀ´¦ÀíµÄ²ÎÊýµÄÂß¼­ÈçºÎÉè¼Æ¡£Çë¸øЩÌáʾ£¡:)

Thanks

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20080116/29bfdf51/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月16日 星期三 18:26

Question wanliyou在gmail.com
星期三 一月 16 18:26:55 HKT 2008

大家看得到我的post么?最近在好几个  mail_list  发帖/回帖都被人理,难道我的邮箱地址被定性为垃圾邮件了?

2008/1/16 Question <wanliyou at gmail.com>:

> Hi,
>
>    刚装了个for 2.4系列的DirectPython打开sample一看貌似硬件加速没开,很慢。各位有这个问题么?我的机器跑DirectX
> SDK里的sample没问题的。
>
> --
> >: ~




-- 
>: ~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20080116/9787d143/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月16日 星期三 19:11

Jiahua Huang jhuangjiahua在gmail.com
星期三 一月 16 19:11:08 HKT 2008

python 标准库里有 getopt 模块,
去看 pydoc getopt  吧

2008/1/16 tairan wang <python at tairan.net>:
>
> 打算用一个python写一个命令行的程序,不知道处理的参数的逻辑如何设计。请给些提示!:)
>
> Thanks
>

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]
zy

zy

2008年01月16日 星期三 19:12

Lich_Ray solo.lich在gmail.com
星期三 一月 16 19:12:52 HKT 2008

²Î¿¼Unix¾­µä³ÌÐò£¬±ÈÈç ls ¡£

ÔÚ08-1-16£¬tairan wang <python在tairan.net> дµÀ£º
>
> ´òËãÓÃÒ»¸öpythonдһ¸öÃüÁîÐеijÌÐò£¬²»ÖªµÀ´¦ÀíµÄ²ÎÊýµÄÂß¼­ÈçºÎÉè¼Æ¡£Çë¸øЩÌáʾ£¡:)
>
> Thanks
>
> ------------------------------
> Express yourself instantly with MSN Messenger! MSN Messenger<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 
Ray Stinger, nickname Lich_Ray
God is in his heaven, all's right with the world.
-------------------------------------------------
let focus = 'computing' in where:
http://lichray.javaeye.com
let focus = 'computing' in here:
http://lichray.bokeland.com
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20080116/fbc85983/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月16日 星期三 19:21

Jiahua Huang jhuangjiahua在gmail.com
星期三 一月 16 19:21:10 HKT 2008

你是说设计参数?

不如首先看 python 怎么处理参数的

usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
[ 多个短参数/--长参数]  [文件/命令]  [其他选项]

两杠开头的为长参数,类似
--encode utf8 或 --encode=utf8

单杠开头的为短参数,或长参数缩写,类似
-d utf8 或 -d=utf8

第一个非 - 开头的为文件/命令

文件/命令后的 是其他参数



贴个实例:
$ zshelve
commandline tool for zshelve databases

Usage: zshelve  FILE  dump                    Dump the data tree
       zshelve  FILE  keys                    List of keys
       zshelve  FILE  get          KEY        Dump value for key
       zshelve  FILE  set          KEY VALUE  Set db[key] = value
       zshelve  FILE  has_key      KEY        True if database has the key
       zshelve  FILE  search_key   KEY        Search key
       zshelve  FILE  search_value VALUE      Search value

2008/1/16 tairan wang <python at tairan.net>:
>
> 打算用一个python写一个命令行的程序,不知道处理的参数的逻辑如何设计。请给些提示!:)
>
> Thanks
>

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月16日 星期三 19:27

Jiahua Huang jhuangjiahua在gmail.com
星期三 一月 16 19:27:19 HKT 2008

建议你改用 "python. cn" <python-cn at googlegroups.com> 这个地址

而 Web 界面则是
http://groups.google.com/group/python-cn

2008/1/16 Question <wanliyou at gmail.com>:
> 大家看得到我的post么?最近在好几个  mail_list  发帖/回帖都被人理,难道我的邮箱地址被定性为垃圾邮件了?
>
>

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月16日 星期三 19:48

Question wanliyou在gmail.com
星期三 一月 16 19:48:32 HKT 2008

Hi,

   刚装了个for 2.4系列的DirectPython打开sample一看貌似硬件加速没开,很慢。各位有这个问题么?我的机器跑DirectX
SDK里的sample没问题的。

=================================================================
To Jiahua Huang:
谢谢提醒。

2008/1/16 Jiahua Huang <jhuangjiahua at gmail.com>:

> 建议你改用 "python. cn" <python-cn at googlegroups.com> 这个地址
>
> 而 Web 界面则是
> http://groups.google.com/group/python-cn
>
> 2008/1/16 Question <wanliyou at gmail.com>:
> > 大家看得到我的post么?最近在好几个  mail_list  发帖/回帖都被人理,难道我的邮箱地址被定性为垃圾邮件了?
> >
> >
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese




-- 
>: ~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20080116/11648e96/attachment-0001.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月17日 星期四 12:27

憨狗 hackgou在gmail.com
星期四 一月 17 12:27:34 HKT 2008

copy一段我的,
    try:
        opts, args = getopt.getopt(sys.argv[1:], "hs:t:b:", ["help",
"site=","build=","type="])
        #支持长选项和短选项两个方式,之所短的: "hs:t:b:"表示-h是开关类型的选项,-s,-t,-t是需要提供额外的值。
       #比如: cmd.py -s www.google.com -t homepage -b other_args 或者
       #cmd.py -h 或者 cmd.py --help
       #opts包含(opt,value)这样的选项和值
      #args包含参数列表
    except getopt.GetoptError, err:
        # print help information and exit:
        print str(err) # will print something like "option -a not recognized"
        usage()
        sys.exit(2)
    for o, a in opts:
        if o in ("-h", "--help"):
            usage()
            sys.exit()
        elif o in ("-o", "--output"):
            output = a
        elif o in ("-s","--site") :
            site_alias = a
        elif o in ("-t","--type"):
            build_type = a
        elif o in ("-b","--build"):
            build_number = a
        else:
            assert False, "unhandled option"

        # ...

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月17日 星期四 15:13

tairan wang python在tairan.net
星期四 一月 17 15:13:27 HKT 2008

ÊÕµ½£¡

Thanks



> Date: Thu, 17 Jan 2008 12:27:34 +0800
> From: hackgou在gmail.com
> To: python-chinese在lists.python.cn
> Subject: Re: [python-chinese]	python дÃüÁîÐгÌÐò
> 
> copyÒ»¶ÎÎҵģ¬
>     try:
>         opts, args = getopt.getopt(sys.argv[1:], "hs:t:b:", ["help",
> "site=","build=","type="])
>         #Ö§³Ö³¤Ñ¡ÏîºÍ¶ÌÑ¡ÏîÁ½¸ö·½Ê½,Ö®Ëù¶ÌµÄ£º "hs:t:b:"±íʾ-hÊÇ¿ª¹ØÀàÐ͵ÄÑ¡Ï-s,-t,-tÊÇÐèÒªÌṩ¶îÍâµÄÖµ¡£
>        #±ÈÈ磺 cmd.py -s www.google.com -t homepage -b other_args »òÕß
>        #cmd.py -h »òÕß cmd.py --help
>        #opts°üº¬(opt,value)ÕâÑùµÄÑ¡ÏîºÍÖµ
>       #args°üº¬²ÎÊýÁбí
>     except getopt.GetoptError, err:
>         # print help information and exit:
>         print str(err) # will print something like "option -a not recognized"
>         usage()
>         sys.exit(2)
>     for o, a in opts:
>         if o in ("-h", "--help"):
>             usage()
>             sys.exit()
>         elif o in ("-o", "--output"):
>             output = a
>         elif o in ("-s","--site") :
>             site_alias = a
>         elif o in ("-t","--type"):
>             build_type = a
>         elif o in ("-b","--build"):
>             build_number = a
>         else:
>             assert False, "unhandled option"
> 
>         # ...
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20080117/8413b974/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2008年01月18日 星期五 12:50

shhgs shhgs.efhilt在gmail.com
星期五 一月 18 12:50:38 HKT 2008

难道没人知道optparse吗?



2008/1/17 tairan wang <python在tairan.net>:
>
> 收到!
>
> Thanks
>
>
>
> ________________________________
> > Date: Thu, 17 Jan 2008 12:27:34 +0800
> > From: hackgou在gmail.com
> > To: python-chinese在lists.python.cn
> > Subject: Re: [python-chinese] python 写命令行程序
>
>
> >
> > copy一段我的,
> > try:
> > opts, args = getopt.getopt(sys.argv[1:], "hs:t:b:", ["help",
> > "site=","build=","type="])
> > #支持长选项和短选项两个方式,之所短的: "hs:t:b:"表示-h是开关类型的选项,-s,-t,-t是需要提供额外的值。
> > #比如: cmd.py -s www.google.com -t homepage -b other_args 或者
> > #cmd.py -h 或者 cmd.py --help
> > #opts包含(opt,value)这样的选项和值
> > #args包含参数列表
> > except getopt.GetoptError, err:
> > # print help information and exit:
> > print str(err) # will print something like "option -a not recognized"
> > usage()
> > sys.exit(2)
> > for o, a in opts:
> > if o in ("-h", "--help"):
> > usage()
> > sys.exit()
> > elif o in ("-o", "--output"):
> > output = a
> > elif o in ("-s","--site") :
> > site_alias = a
> > elif o in ("-t","--type"):
> > build_type = a
> > elif o in ("-b","--build"):
> > build_number = a
> > else:
> > assert False, "unhandled option"
> >
> > # ...
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
> ________________________________
> Express yourself instantly with MSN Messenger! MSN Messenger
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2024

    京ICP备05028076号