IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1822.67 MB
Powered by
Channel Info
Network: freenodeChannel: #python |
Search in www.irclog.org
Log from #python at freenode 2006-05-20
[13:19]<vl77>+squiggly: why don't you start by explaining what exactly it is you want to do?
[13:20]<sfudrrfd>+Well, I'm kind of making it up as I go along
[13:20]<vl77>+DWORD is not a C type anyway.
[13:20]<sfudrrfd>+So that might present a bit of a problem
[13:20]<sfudrrfd>+unsigned 32bit int, tp
[13:20]<zjzdd>+and i disclaim any knowledge of specific standard bits wrt C types before some language lawyer shoots me
[13:20]<vl77>+IIRC, it's a typedef of unsigned long on Win32.
[13:20]<sfudrrfd>+I'm interested in writing a client that can connect to the Battle.net service
[13:21]<ajsyl>+DWORD is 32bit
[13:21]<sfudrrfd>+I did it earlier in Visual Basic, so I understand the protocol
[13:21]<ajsyl>+masm :)
[13:21]<sfudrrfd>+Python is a little overwhelming O_O
[13:22]<sfudrrfd>+getting late, and since nobody wants to help me... sleepytime
[13:22]<sfudrrfd>+night everyone :)
[13:32]<jdrxf>+I need a platform independent package (biased towards Linux) for playing raw audio streams. Does anyone here know of a good candidate? Pymedia looks interesting, but doesn't seem to build on AMD64
[13:34]<mnax9qq>+JDahl: sorry - haven't a clue
[13:35]<sjdv>JDahl, there is pyao, but it does not seem to be maintained anymore. http://www.andrewchatham.com/pyogg/
[13:36]<jdrxf>+what about pygame? I think sdl works on basically any platform nowadays
[13:36]<vl77>+JDahl: there's always ossaudiodev, though it's not all that platform independent (though biased towards Linux :)).
[13:37]<jdrxf>+(I mean, isn't pygame based on libsdl?)
[13:37]<vl77>+http://pysdl.sourceforge.net/ perhaps.
[13:38]<jdrxf>+thanks! for some reason I hadn't spotted pysdl - that might cut it
[13:40]<vl77>+Well, the SF page says it's "... now unmaintained" and recommends pygame, so ...
[13:40]<jdrxf>+oh
[13:40]<vl77>+Pygame should probably work.
[13:41]<vl77>+At least it supports the most popular platforms.
[13:43]<jdrxf>+and it's included in Debian!
[13:44]<vl77>+`apt-cache show python-pyao' might also cut it.
[13:45]<vl77>+If audio output is all you need.
[13:45]<jdrxf>+yes, I only need to play simple uncoded audiostreams
[13:46]<vl77>+Hmm. "Cross-platform" apparently does not include Windows *shrugs*. I suppose you want that too.
[13:47]<jdrxf>+tp76, I certainly wouldn't mind Windows compatibility, but it's not critical
[13:51]<vl77>+I suppose you could write your own library. It's just a few pages of C code required to interface with OSS (Unix) and waveOut (Windows). Oh well. Good luck ;-)
[13:52]<-- svgvsdyzgjvr xrs>/dev/null")
[13:52]<cxzysljrr>+no!! don't use oss, use alsa instead
[13:53]<vl77>+ALSA emulates OSS anyway. OSS is also simpler. He just wants to write some audio data to the device.
[13:55]<cxzysljrr>+emulate like in "module snd_pcm_oss not found"?
[13:57]<jdrxf>+the audio playback in pygame works flawlessly, whereas pyao can't open the device
[13:57]<vl77>+Sure, if you don't compile it with OSS emulation. I'm also not sure if ALSA works on BSD.
[13:57]<sjdv>+of course not
[13:58]<vl77>+Exactly.
[13:58]<vl77>+So OSS.
[14:58]<gfvsvjgg>+hello.
[14:58]<gfvsvjgg>+>>> import yaml
[14:58]<gfvsvjgg>+>>> yaml.dump({'ass':'monkey'})
[14:58]<gfvsvjgg>+'{ass: monkey}\n'
[14:58]<gfvsvjgg>+i was expecting just 'ass: monkey\n'.. what am i missing?
[14:58]<gfvsvjgg>+*newbie*.
[14:59]<gfvsvjgg>+(using http://pyyaml.org/wiki/PyYAML)
[15:06]<gfvsvjgg>+a wall of 291 silent people... :)
[15:06]<gfvsvjgg>+ACTION grabs a smoke. brb.
[15:08]<vgzrajg_>+Can it be true that u'foobar' is slightly faster than just 'foobar'? :/
[15:08]<rgvjnus>+can anyone recommend an irc quizbot?
[15:09]<vgzrajg_>+>>> timeit.Timer("'foobar'").timeit() => 0.29197597503662109
[15:09]<vgzrajg_>+>>> timeit.Timer("u'foobar'").timeit() => 0.27260110855102539
[15:13]<zjzdd>+i get 0.0608 and 0.0763 respectively
[15:14]<vgzzvjzg>+veracon_: that must be one of the most useless things to benchmark :)
[15:16]<gfvsvjgg>+anyone familiar with PyYAML who's got a clue about my question?
[15:17]<c2zjjcs>+elvstone: that's very odd. really.
[15:18]<gfvsvjgg>+kbrooks: you're not ironic right? ;) i'm very new to python..
[15:22]<dyrnnlrd>+anyone interesting in joining a Python Interest Group in Sydney Please checkout #slug (Sydney Linux Users Group) and register your interest by emailing the address found in the topic
[15:24]<dyrnnlrd>+nite all
[15:27]<vgzrajg_>+teratorn: Indeed, but sometimes I just have too much time on my hands. :P
[15:32]<vnx_lrc>+python beginner here, I need to implement __repr__ for a class and I'm looking for a simple way to print a dictionary-style representation given a list of attribute names
[15:33]<jnzu2>+teh_LaC: repr({'attr':self.attr}) ?
[15:36]<edv>+hi !!
[15:37]<vnx_lrc>+Jerub: I was hoping for something along the lines of map(lambda x: x + ':' + value-of-attr-named(x), ['name', 'type', 'size'])
[15:37]<edv>+can't i capture several exceptions on a same except statement ??
[15:39]<edv>+i said: http://deadbeefbabe.org/paste/519
[15:39]<vnx_lrc>+oh, there is a getattr function
[15:39]<vnx_lrc>+nice
[15:40]<cxzysljrr_rpc>+teh_LaC: ', '.join(x+':'+getattr(self,x) for x in ['name', 'type', 'size'])
[15:40]<edv>+cool methods
[15:40]<cxzysljrr_rpc>+teh_LaC: ohh, you found it :)
[15:40]<edv>+cant i do something like: http://deadbeefbabe.org/paste/519
[15:41]<vnx_lrc>+sorry, I should have done more research before asking
[15:41]<c2zjjcs>+teh_LaC: dont apologize
[15:42]<c2zjjcs>+we all learn
[15:42]<vnx_lrc>+:)
[15:44]<vrdn>+(python newbie) whats method do you use to know if a file exists or not?
[15:44]<2fzacmzjym_wm>+os.stat
[15:44]<cxzysljrr_rpc>+os.path.exists
[15:45]<vrdn>+whats the best ? :D
[15:46]<2fzacmzjym_wm>+os.path.exists is probably more readable
[15:46]<2fzacmzjym_wm>+unless its a "C" person reading the code.
[15:46]<zjzdd>+yeah, those C guys can't read english
[15:46]<2fzacmzjym_wm>+and os.path.exists returns True / False
[15:46]<vrdn>+hmmm okay
[15:47]<vrdn>+thanks
[15:47]<2fzacmzjym_wm>+roryy: they only read ansi
[15:47]<2fzacmzjym_wm>+taye: os.stat returns stat data or throws an exception if its not found
[15:47]<vrdn>+ok
[15:47]<vrdn>+with try..except so
[15:48]<2fzacmzjym_wm>+if os.path.exists(file):
[15:48]<2fzacmzjym_wm>+is nicer
[15:48]<vrdn>+yes thx
[15:48]<2fzacmzjym_wm>+so forget my suggestion :)
[15:49]<cxzysljrr_rpc>+hmm, is gvr a C guy? python is implemented using C ;)







