Connecting Tech Pros Worldwide Forums | Help | Site Map

Can you introduce some book about python?

fdsl ysnh
Guest
 
Posts: n/a
#1: Jul 19 '05
--- python-list-request@python.org写道:
[color=blue]
> Send Python-list mailing list submissions to
> python-list@python.org
>
> To subscribe or unsubscribe via the World Wide Web,
> visit
> http://mail.python.org/mailman/listinfo/python-list
> or, via email, send a message with subject or body
> 'help' to
> python-list-request@python.org
>
> You can reach the person managing the list at
> python-list-owner@python.org
>
> When replying, please edit your Subject line so it
> is more specific
> than "Re: Contents of Python-list digest..."[color=green]
> > Today's Topics:[/color]
>
> 1. Re: appending key-value pairs to a dict (Peter
> Hansen)
> 2. Re: Is Python suitable for a huge, enterprise
> size app?
> (Paul Rubin)
> 3. Re: appending key-value pairs to a dict (Brian
> Beck)
> 4. Re: Comparing 2 similar strings? (Skip
> Montanaro)
> 5. Re: Is Python suitable for a huge, enterprise
> size app?
> (Paul Rubin)
> 6. Re: buffer_info error (ashtonn@gmail.com)
> 7. Re: appending key-value pairs to a dict (James
> Stroud)
> 8. From the call hook, how do I know more
> precisely what is
> called? (Vijay Kumar)
> 9. Re: PyGame and Rotozoom (Sorry if OT) (Lee
> Harr)
> 10. Re: buffer_info error (Jp Calderone)
> 11. Re: appending key-value pairs to a dict (Roy
> Smith)
> 12. Re: Is Python suitable for a huge, enterprise
> size app?
> (Dave Brueck)
> 13. Re: Process monitoring (John Abel)[color=green]
> > 发件人: Peter Hansen <peter@engcorp.com>[/color]
> 收件人: python-list@python.org
> 日期: Fri, 20 May 2005 16:12:17 -0400
> 主题: Re: appending key-value pairs to a dict
>
> rbt wrote:[color=green]
> > I know how to setup an empty list and loop thru[/color]
> something... appending[color=green]
> > to the list on each loop... how does this work[/color]
> with dicts?[color=green]
> >
> > I'm looping thru a list of files and I want to put[/color]
> the file's name and[color=green]
> > its sha hash into a dict on each loop.[/color]
>
> Whereas with a list you would call "append" in the
> loop, with a
> dictionary you simply use an indexed-assignment type
> of access:
>
> mydict = {}
> for filename in some_list_of_filenames:
> hash =
> sha.sha(open(filename).read()).hexdigest() # or
> whatever
> mydict[filename] = hash
>
> -Peter
>[color=green]
> > 发件人: Paul Rubin <http://phr.cx@NOSPAM.invalid>[/color]
> 收件人: python-list@python.org
> 日期: 20 May 2005 13:12:50 -0700
> 主题: Re: Is Python suitable for a huge, enterprise
> size app?
>
> Dave Brueck <dave@pythonapocrypha.com> writes:[color=green]
> > One thing from your experience that did resonate[/color]
> with me is that,[color=green]
> > except for ftplib and occasionally urllib (for[/color]
> basic, one-shot GETs),[color=green]
> > we don't use any of the standard library's[/color]
> "protocol" modules - partly[color=green]
> > because we had to implement our own HTTP libraries[/color]
> for performance and[color=green]
> > scalability reasons anyway, and partly because we[/color]
> had trouble figuring[color=green]
> > out e.g. all the ins and outs of[/color]
> urllib/urllib2/httplib.
>
> What do you use for HTTPS? And did you use the
> Cookie module in your
> HTTP servers? You may have had problems without
> even being aware of
> them (until recently if you used Cookie with its
> default settings, any
> attacker could completely take over your server by
> sending you
> carefully concoted cookies). I'm not trying to be
> contentious here,
> just mentioning a couple further cases of where
> problems aren't
> visible from far away but are there when you look
> close.
>[color=green]
> > 发件人: Brian Beck <exogen@gmail.com>[/color]
> 收件人: python-list@python.org
> 日期: Fri, 20 May 2005 16:14:17 -0400
> 主题: Re: appending key-value pairs to a dict
>
> rbt wrote:[color=green]
> > I know how to setup an empty list and loop thru[/color]
> something... appending[color=green]
> > to the list on each loop... how does this work[/color]
> with dicts?[color=green]
> >
> > I'm looping thru a list of files and I want to put[/color]
> the file's name and[color=green]
> > its sha hash into a dict on each loop.[/color]
>
> Like so:
>
> d = {}
> for filename in files:
> d[sha_func(filename)] = filename
>
>
> Or like so:
>
> d = dict([(sha_func(filename), filename) for
> filename in files])
>
> --
> Brian Beck
> Adventurer of the First Order
>[color=green]
> > 发件人: Skip Montanaro <skip@pobox.com>[/color]
> *送: python-list@python.org
> 收件人: Steve Holden <steve@holdenweb.com>
> 日期: Fri, 20 May 2005 15:16:49 -0500
> 主题: Re: Comparing 2 similar strings?
>
>
> Steve> (is this the same as 'Conchobar'?)
>
> No, that's a trendy pub in Key West...
>
> <wink>
>
> Skip
>[color=green]
> > 发件人: Paul Rubin <http://phr.cx@NOSPAM.invalid>[/color]
> 收件人: python-list@python.org
> 日期: 20 May 2005 13:15:48 -0700
> 主题: Re: Is Python suitable for a huge, enterprise
> size app?
>
> "Fredrik Lundh" <fredrik@pythonware.com> writes:[color=green]
> > this has been reported before, and it won't get[/color]
> fixed (unless you're[color=green]
> > volunteering to add Python-compatible garbage[/color]
> collection to Tk, that is).
>
> Yeah, I think I understand what the issue is. I can
> think of some
> kludgy possible fixes but I assume they've been
> thought about already
> and rejected. The workaround of making the
> application save an extra
> reference isn't too bad, but all relevant docs that
> say anything about
> these images should mention the requirement
> emphatically.
>[color=green]
> > 发件人: "ashtonn@gmail.com" <doodle4@gmail.com>[/color]
> 收件人: python-list@python.org
> 日期: 20 May 2005 13:18:33 -0700
> 主题: Re: buffer_info error
>
> i am filling in a packet with source and destination
> address and using
> the buffer_info call to pass on the address to an
> underlying low level
> call.
>
> The src and dest are strings, but buffer_info
> expects an array. How do
> i deal with this?
>
>[color=green]
> > 发件人: James Stroud <jstroud@mbi.ucla.edu>[/color]
> 收件人: python-list@python.org
> 日期: Fri, 20 May 2005 13:20:48 -0700
> 主题: Re: appending key-value pairs to a dict
>
> On Friday 20 May 2005 01:04 pm, rbt wrote:[color=green]
> > I know how to setup an empty list and loop thru[/color]
> something... appending[color=green]
> > to the list on each loop... how does this work[/color]
> with dicts?[color=green]
> >
> > I'm looping thru a list of files and I want to put[/color]
> the file's name and[color=green]
> > its sha hash into a dict on each loop.
> >
> > Many thanks,
> >
> > rbt[/color]
>
> Simple assignment.
>
> adict[filename] = an_sha_hash
>
>
>
> --
> James Stroud
> UCLA-DOE Institute for Genomics and Proteomics
> Box 951570
> Los Angeles, CA 90095
>
> http://www.jamesstroud.com/
>[color=green]
> > 发件人: Vijay Kumar <getvijay@gmail.com>[/color]
> *送: vsuryade@cs.nmsu.edu
> 收件人: python-list@python.org
> 日期: Fri, 20 May 2005 14:21:33 -0600
> 主题: From the call hook, how do I know more
> precisely what is called?
>
> Hi,
>
> I wrote a trace function using the profiling and
> tracing hooks
> provided by the python interpreter.
>
> The Python interpreter reports the calls occuring in
> the source
> program to my trace function.
>
> How can I know whether the call happened is a
> function call or method
> call and if it is a method call what is its self
> object and/or class
> is?.
>
> I receive a frame object from the interpreter for
> every call.
>
> Thanks,
> Vijay.
>[color=green]
> > 发件人: Lee Harr <lee@example.com>[/color]
> 收件人: python-list@python.org
> 日期: Fri, 20 May 2005 20:38:45 GMT
> 主题: Re: PyGame and Rotozoom (Sorry if OT)
>
> On 2005-05-20, J. W. McCall <jmccall@houston.rr.com>
> wrote:[color=green]
> > I'm not sure if this is off-topic, since it[/color]
> doesn't deal with Python[color=green]
> > itself, but here goes:
> >
> > I'm messing around with writing a simple "game"[/color]
> where the player (a[color=green]
> > crudely drawn smiley face) moves by rotating and[/color]
> moving back or forward[color=green]
> > (think Resident Evil, but from an always-above[/color]
> view). After much[color=green]
> > hacking, I have it working where left and right[/color]
> rotate the player sprite[color=green]
> > and up always moves the sprite whichever direction[/color]
> it's facing, while[color=green]
> > down is reverse. I'm using[/color]
> pygame.transform.RotoZoom().[color=green]
> >
> > My problem is that it doesn't rotate smoothly.[/color]
> When it rotates, the[color=green]
> > corners of the image (just a plain white[/color]
> background) look like they're[color=green]
> > hitting some barrier and making it move around.[/color]
> Think of an empty box[color=green]
> > turned diagonally (so that it looks like a[/color]
> diamond, with its open end[color=green]
> > facing you), and a cube in that box being turned[/color]
> while it's resting in[color=green]
> > the bottom corner. I want it to rotate smoothly[/color]
> around its center, it's[color=green]
> > it's not doing that.
> >
> > I'm guessing that it has something to do with me[/color]
> not setting up a Rect[color=green]
> > right, but I'm not sure. Maybe this is a[/color]
> limitation of Rotozoom/Rotate?[color=green]
> >
> > Any advice would be greatly appreciated. And yes,[/color]
> I'm a rank PyGame newbie.[color=green]
> >[/color]
>
>
>
> You might want to try pygsear:
> http://www.nongnu.org/pygsear/
>
> It has a RotatedImage class which takes care of
> rotating
> things for you. See the examples roti.py and
> wings.py
> for some use of rotated image sprites.
>[color=green]
> > 发件人: Jp Calderone <exarkun@divmod.com>[/color]
> 收件人: python-list@python.org
> 日期: Fri, 20 May 2005 20:45:00 GMT
> 主题: Re: buffer_info error
>
> On 20 May 2005 13:18:33 -0700, "ashtonn@gmail.com"
> <doodle4@gmail.com> wrote:[color=green]
> >i am filling in a packet with source and[/color]
> destination address and using[color=green]
> >the buffer_info call to pass on the address to an[/color]
> underlying low level[color=green]
> >call.
> >
> >The src and dest are strings, but buffer_info[/color]
> expects an array. How do[color=green]
> >i deal with this?[/color]
>
> What's the low-level call you're invoking?
>
> Jp
>[color=green]
> > 发件人: roy@panix.com (Roy Smith)[/color]
> 收件人: python-list@python.org
> 日期: 20 May 2005 16:50:39 -0400
> 主题: Re: appending key-value pairs to a dict
>
> rbt <rbt@athop1.ath.vt.edu> wrote:[color=green]
> >I know how to setup an empty list and loop thru[/color]
> something... appending[color=green]
> >to the list on each loop... how does this work with[/color]
> dicts?[color=green]
> >
> >I'm looping thru a list of files and I want to put[/color]
> the file's name and[color=green]
> >its sha hash into a dict on each loop.[/color]
>
> You just assign values to keys. If the key doesn't
> exist, it's
> created automagically. You want something like
> this:
>
> shaDict = {}
> for fileName in fileNameList:
> hash = generateShaHash (fileName)
> shaDict[hash] = fileName
>[color=green]
> > 发件人: Dave Brueck <dave@pythonapocrypha.com>[/color]
> 收件人: python-list@python.org
> 日期: Fri, 20 May 2005 15:07:05 -0600
> 主题: Re: Is Python suitable for a huge, enterprise
> size app?
>
> Paul Rubin wrote:[color=green]
> > Dave Brueck <dave@pythonapocrypha.com> writes:
> >[color=darkred]
> >>One thing from your experience that did resonate[/color][/color]
> with me is that,[color=green][color=darkred]
> >>except for ftplib and occasionally urllib (for[/color][/color]
> basic, one-shot GETs),[color=green][color=darkred]
> >>we don't use any of the standard library's[/color][/color]
> "protocol" modules - partly[color=green][color=darkred]
> >>because we had to implement our own HTTP libraries[/color][/color]
> for performance and[color=green][color=darkred]
> >>scalability reasons anyway, and partly because we[/color][/color]
> had trouble figuring[color=green][color=darkred]
> >>out e.g. all the ins and outs of[/color][/color]
> urllib/urllib2/httplib.[color=green]
> >
> >
> > What do you use for HTTPS?[/color]
>
> Hi Paul,
>
> m2crypto (plus some patches to make asynchronous SSL
> do what we needed).
>[color=green]
> > And did you use the Cookie module in your
> > HTTP servers? You may have had problems without[/color]
> even being aware of[color=green]
> > them (until recently if you used Cookie with its[/color]
> default settings, any[color=green]
> > attacker could completely take over your server by[/color]
> sending you[color=green]
> > carefully concoted cookies).[/color]
>
> Are you referring to the use of pickle for cookie
> serialization? In any case, we
> didn't use Cookie.py from the stdlib (on the
> servers, nearly everything related
> to URLs & HTTP was custom-built, with the exception
> of urlparse, for the
> aforemenioned reasons).
>
> -Dave
>[color=green]
> > 发件人: John Abel <johnfabel@btinternet.com>[/color]
> *送: python-list@python.org
> 日期: Fri, 20 May 2005 22:24:14 +0100
> 主题: Re: Process monitoring
>
> gsteff wrote:
>[color=green]
> >Hey, I'm working on a Python program that will[/color]
> launch some other[color=green]
> >non-Python process using os.spawn (in the[/color]
> os.P_NOWAIT mode) and then[color=green]
> >basically wait for it to finish (while doing some[/color]
> other stuff in the[color=green]
> >interim). Normally, the new process will signal[/color]
> that it's done by[color=green]
> >writing to a file, but I'd like to also find out if[/color]
> the new process[color=green]
> >died unexpectedly. Anyone know any preferrable[/color]
> ways to do this?[color=green]
> >
> >Greg Steffensen
> >
> >
> >[/color]
> If you're using 2.4, have a look at the subprocess
> module.
>
> J
>[color=green]
> > --[/color]
> http://mail.python.org/mailman/listinfo/python-list[/color]
I am a beginner,Can you introduce some book about
python? I am a student of china

__________________________________________________ _______
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://cn.rd.yahoo.com/mail_cn/tag/y...sic.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://cn.rd.yahoo.com/mail_cn/tag/y...mage.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1...event/mail_1g/

rdsteph@mac.com
Guest
 
Posts: n/a
#2: Jul 19 '05

re: Can you introduce some book about python?


You m,igth try my page of Python Book reviews at
http://www.awaretek.com/book.html

Ron Stephens


fdsl ysnh wrote:[color=blue]
> --- python-list-request@python.org鍐欓亾:
>[color=green]
> > Send Python-list mailing list submissions to
> > python-list@python.org
> >
> > To subscribe or unsubscribe via the World Wide Web,
> > visit
> > http://mail.python.org/mailman/listinfo/python-list
> > or, via email, send a message with subject or body
> > 'help' to
> > python-list-request@python.org
> >
> > You can reach the person managing the list at
> > python-list-owner@python.org
> >
> > When replying, please edit your Subject line so it
> > is more specific
> > than "Re: Contents of Python-list digest..."[color=darkred]
> > > Today's Topics:[/color]
> >
> > 1. Re: appending key-value pairs to a dict (Peter
> > Hansen)
> > 2. Re: Is Python suitable for a huge, enterprise
> > size app?
> > (Paul Rubin)
> > 3. Re: appending key-value pairs to a dict (Brian
> > Beck)
> > 4. Re: Comparing 2 similar strings? (Skip
> > Montanaro)
> > 5. Re: Is Python suitable for a huge, enterprise
> > size app?
> > (Paul Rubin)
> > 6. Re: buffer_info error (ashtonn@gmail.com)
> > 7. Re: appending key-value pairs to a dict (James
> > Stroud)
> > 8. From the call hook, how do I know more
> > precisely what is
> > called? (Vijay Kumar)
> > 9. Re: PyGame and Rotozoom (Sorry if OT) (Lee
> > Harr)
> > 10. Re: buffer_info error (Jp Calderone)
> > 11. Re: appending key-value pairs to a dict (Roy
> > Smith)
> > 12. Re: Is Python suitable for a huge, enterprise
> > size app?
> > (Dave Brueck)
> > 13. Re: Process monitoring (John Abel)[color=darkred]
> > > 鍙戜欢浜: Peter Hansen <peter@engcorp.com>[/color]
> > 鏀朵欢浜: python-list@python.org
> > 鏃ユ湡: Fri, 20 May 2005 16:12:17 -0400
> > 涓婚: Re: appending key-value pairs to a dict
> >
> > rbt wrote:[color=darkred]
> > > I know how to setup an empty list and loop thru[/color]
> > something... appending[color=darkred]
> > > to the list on each loop... how does this work[/color]
> > with dicts?[color=darkred]
> > >
> > > I'm looping thru a list of files and I want to put[/color]
> > the file's name and[color=darkred]
> > > its sha hash into a dict on each loop.[/color]
> >
> > Whereas with a list you would call "append" in the
> > loop, with a
> > dictionary you simply use an indexed-assignment type
> > of access:
> >
> > mydict = {}
> > for filename in some_list_of_filenames:
> > hash =
> > sha.sha(open(filename).read()).hexdigest() # or
> > whatever
> > mydict[filename] = hash
> >
> > -Peter
> >[color=darkred]
> > > 鍙戜欢浜: Paul Rubin <http://phr.cx@NOSPAM.invalid>[/color]
> > 鏀朵欢浜: python-list@python.org
> > 鏃ユ湡: 20 May 2005 13:12:50 -0700
> > 涓婚: Re: Is Python suitable for a huge, enterprise
> > size app?
> >
> > Dave Brueck <dave@pythonapocrypha.com> writes:[color=darkred]
> > > One thing from your experience that did resonate[/color]
> > with me is that,[color=darkred]
> > > except for ftplib and occasionally urllib (for[/color]
> > basic, one-shot GETs),[color=darkred]
> > > we don't use any of the standard library's[/color]
> > "protocol" modules - partly[color=darkred]
> > > because we had to implement our own HTTP libraries[/color]
> > for performance and[color=darkred]
> > > scalability reasons anyway, and partly because we[/color]
> > had trouble figuring[color=darkred]
> > > out e.g. all the ins and outs of[/color]
> > urllib/urllib2/httplib.
> >
> > What do you use for HTTPS? And did you use the
> > Cookie module in your
> > HTTP servers? You may have had problems without
> > even being aware of
> > them (until recently if you used Cookie with its
> > default settings, any
> > attacker could completely take over your server by
> > sending you
> > carefully concoted cookies). I'm not trying to be
> > contentious here,
> > just mentioning a couple further cases of where
> > problems aren't
> > visible from far away but are there when you look
> > close.
> >[color=darkred]
> > > 鍙戜欢浜: Brian Beck <exogen@gmail.com>[/color]
> > 鏀朵欢浜: python-list@python.org
> > 鏃ユ湡: Fri, 20 May 2005 16:14:17 -0400
> > 涓婚: Re: appending key-value pairs to a dict
> >
> > rbt wrote:[color=darkred]
> > > I know how to setup an empty list and loop thru[/color]
> > something... appending[color=darkred]
> > > to the list on each loop... how does this work[/color]
> > with dicts?[color=darkred]
> > >
> > > I'm looping thru a list of files and I want to put[/color]
> > the file's name and[color=darkred]
> > > its sha hash into a dict on each loop.[/color]
> >
> > Like so:
> >
> > d = {}
> > for filename in files:
> > d[sha_func(filename)] = filename
> >
> >
> > Or like so:
> >
> > d = dict([(sha_func(filename), filename) for
> > filename in files])
> >
> > --
> > Brian Beck
> > Adventurer of the First Order
> >[color=darkred]
> > > 鍙戜欢浜: Skip Montanaro <skip@pobox.com>[/color]
> > 鎶勯: python-list@python.org
> > 鏀朵欢浜: Steve Holden <steve@holdenweb.com>
> > 鏃ユ湡: Fri, 20 May 2005 15:16:49 -0500
> > 涓婚: Re: Comparing 2 similar strings?
> >
> >
> > Steve> (is this the same as 'Conchobar'?)
> >
> > No, that's a trendy pub in Key West...
> >
> > <wink>
> >
> > Skip
> >[color=darkred]
> > > 鍙戜欢浜: Paul Rubin <http://phr.cx@NOSPAM.invalid>[/color]
> > 鏀朵欢浜: python-list@python.org
> > 鏃ユ湡: 20 May 2005 13:15:48 -0700
> > 涓婚: Re: Is Python suitable for a huge, enterprise
> > size app?
> >
> > "Fredrik Lundh" <fredrik@pythonware.com> writes:[color=darkred]
> > > this has been reported before, and it won't get[/color]
> > fixed (unless you're[color=darkred]
> > > volunteering to add Python-compatible garbage[/color]
> > collection to Tk, that is).
> >
> > Yeah, I think I understand what the issue is. I can
> > think of some
> > kludgy possible fixes but I assume they've been
> > thought about already
> > and rejected. The workaround of making the
> > application save an extra
> > reference isn't too bad, but all relevant docs that
> > say anything about
> > these images should mention the requirement
> > emphatically.
> >[color=darkred]
> > > 鍙戜欢浜: "ashtonn@gmail.com" <doodle4@gmail.com>[/color]
> > 鏀朵欢浜: python-list@python.org
> > 鏃ユ湡: 20 May 2005 13:18:33 -0700
> > 涓婚: Re: buffer_info error
> >
> > i am filling in a packet with source and destination
> > address and using
> > the buffer_info call to pass on the address to an
> > underlying low level
> > call.
> >
> > The src and dest are strings, but buffer_info
> > expects an array. How do
> > i deal with this?
> >
> >[color=darkred]
> > > 鍙戜欢浜: James Stroud <jstroud@mbi.ucla.edu>[/color]
> > 鏀朵欢浜: python-list@python.org
> > 鏃ユ湡: Fri, 20 May 2005 13:20:48 -0700
> > 涓婚: Re: appending key-value pairs to a dict
> >
> > On Friday 20 May 2005 01:04 pm, rbt wrote:[color=darkred]
> > > I know how to setup an empty list and loop thru[/color]
> > something... appending[color=darkred]
> > > to the list on each loop... how does this work[/color]
> > with dicts?[color=darkred]
> > >
> > > I'm looping thru a list of files and I want to put[/color]
> > the file's name and[color=darkred]
> > > its sha hash into a dict on each loop.
> > >
> > > Many thanks,
> > >
> > > rbt[/color]
> >
> > Simple assignment.
> >
> > adict[filename] = an_sha_hash
> >
> >
> >
> > --
> > James Stroud
> > UCLA-DOE Institute for Genomics and Proteomics
> > Box 951570
> > Los Angeles, CA 90095
> >
> > http://www.jamesstroud.com/
> >[color=darkred]
> > > 鍙戜欢浜: Vijay Kumar <getvijay@gmail.com>[/color]
> > 鎶勯: vsuryade@cs.nmsu.edu
> > 鏀朵欢浜: python-list@python.org
> > 鏃ユ湡: Fri, 20 May 2005 14:21:33 -0600
> > 涓婚: From the call hook, how do I know more
> > precisely what is called?
> >
> > Hi,
> >
> > I wrote a trace function using the profiling and
> > tracing hooks
> > provided by the python interpreter.
> >
> > The Python interpreter reports the calls occuring in
> > the source
> > program to my trace function.
> >
> > How can I know whether the call happened is a
> > function call or method
> > call and if it is a method call what is its self
> > object and/or class
> > is?.
> >
> > I receive a frame object from the interpreter for
> > every call.
> >
> > Thanks,
> > Vijay.
> >[color=darkred]
> > > 鍙戜欢浜: Lee Harr <lee@example.com>[/color]
> > 鏀朵欢浜: python-list@python.org
> > 鏃ユ湡: Fri, 20 May 2005 20:38:45 GMT
> > 涓婚: Re: PyGame and Rotozoom (Sorry if OT)
> >
> > On 2005-05-20, J. W. McCall <jmccall@houston.rr.com>
> > wrote:[color=darkred]
> > > I'm not sure if this is off-topic, since it[/color]
> > doesn't deal with Python[color=darkred]
> > > itself, but here goes:
> > >
> > > I'm messing around with writing a simple "game"[/color]
> > where the player (a[color=darkred]
> > > crudely drawn smiley face) moves by rotating and[/color]
> > moving back or forward[color=darkred]
> > > (think Resident Evil, but from an always-above[/color]
> > view). After much[color=darkred]
> > > hacking, I have it working where left and right[/color]
> > rotate the player sprite[color=darkred]
> > > and up always moves the sprite whichever direction[/color]
> > it's facing, while[color=darkred]
> > > down is reverse. I'm using[/color]
> > pygame.transform.RotoZoom().[color=darkred]
> > >
> > > My problem is that it doesn't rotate smoothly.[/color]
> > When it rotates, the[color=darkred]
> > > corners of the image (just a plain white[/color]
> > background) look like they're[color=darkred]
> > > hitting some barrier and making it move around.[/color]
> > Think of an empty box[color=darkred]
> > > turned diagonally (so that it looks like a[/color]
> > diamond, with its open end[color=darkred]
> > > facing you), and a cube in that box being turned[/color]
> > while it's resting in[color=darkred]
> > > the bottom corner. I want it to rotate smoothly[/color]
> > around its center, it's[color=darkred]
> > > it's not doing that.
> > >
> > > I'm guessing that it has something to do with me[/color]
> > not setting up a Rect[color=darkred]
> > > right, but I'm not sure. Maybe this is a[/color]
> > limitation of Rotozoom/Rotate?[color=darkred]
> > >
> > > Any advice would be greatly appreciated. And yes,[/color]
> > I'm a rank PyGame newbie.[color=darkred]
> > >[/color]
> >
> >
> >
> > You might want to try pygsear:
> > http://www.nongnu.org/pygsear/
> >
> > It has a RotatedImage class which takes care of
> > rotating
> > things for you. See the examples roti.py and
> > wings.py
> > for some use of rotated image sprites.
> >[color=darkred]
> > > 鍙戜欢浜: Jp Calderone <exarkun@divmod.com>[/color]
> > 鏀朵欢浜: python-list@python.org
> > 鏃ユ湡: Fri, 20 May 2005 20:45:00 GMT
> > 涓婚: Re: buffer_info error
> >
> > On 20 May 2005 13:18:33 -0700, "ashtonn@gmail.com"
> > <doodle4@gmail.com> wrote:[color=darkred]
> > >i am filling in a packet with source and[/color]
> > destination address and using[color=darkred]
> > >the buffer_info call to pass on the address to an[/color]
> > underlying low level[color=darkred]
> > >call.
> > >
> > >The src and dest are strings, but buffer_info[/color]
> > expects an array. How do[color=darkred]
> > >i deal with this?[/color]
> >
> > What's the low-level call you're invoking?
> >
> > Jp
> >[color=darkred]
> > > 鍙戜欢浜: roy@panix.com (Roy Smith)[/color]
> > 鏀朵欢浜: python-list@python.org
> > 鏃ユ湡: 20 May 2005 16:50:39 -0400
> > 涓婚: Re: appending key-value pairs to a dict
> >
> > rbt <rbt@athop1.ath.vt.edu> wrote:[color=darkred]
> > >I know how to setup an empty list and loop thru[/color]
> > something... appending[color=darkred]
> > >to the list on each loop... how does this work with[/color]
> > dicts?[color=darkred]
> > >
> > >I'm looping thru a list of files and I want to put[/color]
> > the file's name and[color=darkred]
> > >its sha hash into a dict on each loop.[/color]
> >
> > You just assign values to keys. If the key doesn't
> > exist, it's
> > created automagically. You want something like
> > this:
> >
> > shaDict = {}
> > for fileName in fileNameList:
> > hash = generateShaHash (fileName)
> > shaDict[hash] = fileName
> >[color=darkred]
> > > 鍙戜欢浜: Dave Brueck <dave@pythonapocrypha.com>[/color]
> > 鏀朵欢浜: python-list@python.org
> > 鏃ユ湡: Fri, 20 May 2005 15:07:05 -0600
> > 涓婚: Re: Is Python suitable for a huge, enterprise
> > size app?
> >
> > Paul Rubin wrote:[color=darkred]
> > > Dave Brueck <dave@pythonapocrypha.com> writes:
> > >
> > >>One thing from your experience that did resonate[/color]
> > with me is that,[color=darkred]
> > >>except for ftplib and occasionally urllib (for[/color]
> > basic, one-shot GETs),[color=darkred]
> > >>we don't use any of the standard library's[/color]
> > "protocol" modules - partly[color=darkred]
> > >>because we had to implement our own HTTP libraries[/color]
> > for performance and[color=darkred]
> > >>scalability reasons anyway, and partly because we[/color]
> > had trouble figuring[color=darkred]
> > >>out e.g. all the ins and outs of[/color]
> > urllib/urllib2/httplib.[color=darkred]
> > >
> > >
> > > What do you use for HTTPS?[/color]
> >
> > Hi Paul,
> >
> > m2crypto (plus some patches to make asynchronous SSL
> > do what we needed).
> >[color=darkred]
> > > And did you use the Cookie module in your
> > > HTTP servers? You may have had problems without[/color]
> > even being aware of[color=darkred]
> > > them (until recently if you used Cookie with its[/color]
> > default settings, any[color=darkred]
> > > attacker could completely take over your server by[/color]
> > sending you[color=darkred]
> > > carefully concoted cookies).[/color]
> >
> > Are you referring to the use of pickle for cookie
> > serialization? In any case, we
> > didn't use Cookie.py from the stdlib (on the
> > servers, nearly everything related
> > to URLs & HTTP was custom-built, with the exception
> > of urlparse, for the
> > aforemenioned reasons).
> >
> > -Dave
> >[color=darkred]
> > > 鍙戜欢浜: John Abel <johnfabel@btinternet.com>[/color]
> > 鎶勯: python-list@python.org
> > 鏃ユ湡: Fri, 20 May 2005 22:24:14 +0100
> > 涓婚: Re: Process monitoring
> >
> > gsteff wrote:
> >[color=darkred]
> > >Hey, I'm working on a Python program that will[/color]
> > launch some other[color=darkred]
> > >non-Python process using os.spawn (in the[/color]
> > os.P_NOWAIT mode) and then[color=darkred]
> > >basically wait for it to finish (while doing some[/color]
> > other stuff in the[color=darkred]
> > >interim). Normally, the new process will signal[/color]
> > that it's done by[color=darkred]
> > >writing to a file, but I'd like to also find out if[/color]
> > the new process[color=darkred]
> > >died unexpectedly. Anyone know any preferrable[/color]
> > ways to do this?[color=darkred]
> > >
> > >Greg Steffensen
> > >
> > >
> > >[/color]
> > If you're using 2.4, have a look at the subprocess
> > module.
> >
> > J
> >[color=darkred]
> > > --[/color]
> > http://mail.python.org/mailman/listinfo/python-list[/color]
> I am a beginner,Can you introduce some book about
> python? I am a student of china
>
> __________________________________________________ _______
> Do You Yahoo!?
> 150涓囨洸MP3鐤媯鎼滐紝甯︽偍闂叆闊充箰娈垮*
>[/color]
http://cn.rd.yahoo.com/mail_cn/tag/y...sic.yisou.com/[color=blue]
> 缇庡コ鏄庢槦搴旀湁灏芥湁锛屾悳閬嶇編鍥俱佽壋鍥惧 岄叿鍥
>[/color]
http://cn.rd.yahoo.com/mail_cn/tag/y...mage.yisou.com[color=blue]
> 1G灏辨槸1000鍏嗭紝闆呰檸鐢甸偖鑷姪鎵╁锛
>[/color]
http://cn.rd.yahoo.com/mail_cn/tag/1...event/mail_1g/

Heiko Wundram
Guest
 
Posts: n/a
#3: Jul 19 '05

re: Can you introduce some book about python?


Am Samstag, 21. Mai 2005 08:59 schrieb rdsteph@mac.com:[color=blue]
> <snip>[/color]

Quoting a senseless quote, bravo!

...

wasting-bandwith-sure-is-fun-over-ISDN-'ly yours,

--
--- Heiko.
see you at: http://www.stud.mh-hannover.de/~hwundram/wordpress/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBCjvoOf0bpgh6uVAMRAv+MAJsFZIET+fn6+EuJqz+TMn Aq9HD0qQCff46s
w4icSkQnMmtnq9IjMpA0e7A=
=UQEK
-----END PGP SIGNATURE-----

saddle@gmail.com
Guest
 
Posts: n/a
#4: Jul 19 '05

re: Can you introduce some book about python?


if u r come from china, maybe python.cn is a good start :)

Closed Thread