#apache #archlinux #asterisk #centos #debian #gentoo #haskell #kde #kubuntu #lisp #math #mysql #perl #python #ruby-lang #rubyonrails #suse #ubuntu #vim #wikipedia 0 1 2 3 4 5 6 7 8 9 10 11 12
Top Prev 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 Next
#python
<chopin> i need to convert text to html ... not cgi escape, but ... like & --> & ... is there a python module for this?
<nemesis128> in ctypes, I would like to prototype a function to accept a pointer to a double. Is it possible?
<luks> nemesis128: myfunc.argtypes = [ctypes.POINTER(ctypes.c_double)]
<luks> I haven't tested it, but I think it should work
<nemesis128> Im going to try
<nemesis128> luks, seems to work! thx
<angerman> what are the python naming conventions for classes?
<Almondega> setblocking(0) dont work with msg = con.recv(1024)
<Almondega> 'The socket operation could not complete without blocking')
<Almondega> how to resolve this ?
<Zal> angerman according to PEP8, classes are conventionally named in CapsWordsCase
<masterdriverz> angerman: CamelCase i think
<angerman> Zal, masterdriverz thanks
<saint-takeshi> i'm thinking about teaching myself python to code a graphically light network based role playing
<saint-takeshi> game
<sgorilla80> does python sometimes think your in a dumb terminal
<sgorilla80> and not deal with arrow keys, or other control characters
<Zal> sgorilla80 if you don't have readline support, that could happen
<sgorilla80> oh i need to install readline support and recompile
<Zal> yep
<sgorilla80> its kind of annoying without it
<makkalot> Hi is it possible to change a particular line in place in a file ,without rewriting all the file again?
<Zal> makkalot nope (unless the "lines" are all fixed-length)
<makkalot> Zal:ok if all are fixed you can go there (with seek )an change it,i know this one.Do editors we use work like that?
<Zal> makkalot most editors I know of buffer the file in memory, and overwrite the entire file on save
<makkalot> I see thank you very much Zal
<sipher> for key in keys() isn't returning keys in the order they were written. The docs say that shouldn't happen no? (It's the same order every time though..)
<Zal> sipher dictionaries are not ordered.
<sipher> mmk. I'll use a list then
<Blacksitox> nas :)
<Anusien> How do I convert an integer into a string? I need to concat an int and a string and save it in an output buffer
<chopin> Anusien: str(x)
<Anusien> What imports do I need for that? I tried it and Python said hell no
<gma> Anusien: no imports required
<Anusien> wait, no. I tried string(2).
<Anusien> *forehead slap* Thanks
<chopin> haha
<Anusien> By the way, is there a good resource for really learning python? I understand the syntax, but I haven't really grokked the language yet. I still write Python like it were C++
<chopin> Anusien: dive into Zope / Plone world -- fire by trial!
<chopin> switch fire and trial
<chopin> :-D
<josepharmbruster> Anusien: dive into the turbogears world :-)
<Anusien> What do you mean by dive into <foo> world?
<sipher> There's a book "Dive into Python"
<josepharmbruster> Anusien: I think the best way to learn Python, is to code in it.. and look at what others have coded.
<sipher> Yeah, pick a task and use the docs a lot
<Anusien> Alright. What is Zope/Plone and Turbogears?
<sipher> app server, CMS, framework
<josepharmbruster> Anusien: check out wiki.python.org/moin/BeginnersGuide that should get you started
<sipher> s/framework/web framework
Previous Page Next Page