#python - Tue 20 Feb 2007 between 00:04 and 00:28

NY Lost Funds



deltabs = re.sub('([a-z])([A-Z])', lambda m: m.group(1) + '_' + m.group(2).lower(), s)
bjweeksquestion, on linux I installed a python module to my home dir, what do I have to change for python to see it so I can import it?
joe4444Bjweeks, you could make a symlink in site-packages that points to it
but there could be an issue with permissions... i haven't tried it that way
bjweekswell, I don't have root on this box
Nedlinpopohey guys
joe4444then you'll probably have to ask your host for help
sreeramBjweeks: set PYTHONPATH env var
joe4444...or set pythonpath
bjweekssreeram: thanks
Nedlinpoposo i'm shocked that if(3<6<8): works as well as if(3<9<8) and if(3<2<8)
is that a documented feature anywhere
sreeramNedlinpopo: yes, conditionals can be chained
Nedlinpoposreeram: yeah, but i'm amazed they don't eval on a stack like in C and result in incorrect comparisons
sreeramNedlinpopo: what stack are you referring to?
Nedlinpopoyou can implement arithmetic entirely with comparisons by pushing the value of teh operations on a stack when you hit an operator with higher precedence
that's how C does it
alusis there a method like buffer() for appending strings instead of creating windows to them?
like iovec
sreeramNedlinpopo, thats just how the parser handles operator precedence
Nedlinpopo, in python (a < b < c) is transformed to (a< b) and (b < c)
Nedlinpopoyeah in C it's not like that. Python is the smart way
it makes me happy
in C you would have (a<b)<c because of equal precedence of the < operator
sreeramright, and the result of (a < b) which is a boolean value is compared with c, which ofcourse is wrong
Nedlinpoporight, so when i just tried it in python i was extremely happy to find it work right
SevenInchBreadalus, creating windows to them?
well... StringIO creates a file-like interface over a string... except it can be modified in place.
from cStringIO import StringIO
alusso say I have 40 strings/buffers of varying length. I'd like create one buffer which represents all of them in a particular order
using StringIO, I would have to copy all of the bytes, when really I just need a list of 40 pointers (buffers)
sreeramalus: just put the strings in a list
alusI do know how to implement iovec.
is there nothing like this already?
ironfroggyjust create the StringIO and write the 40 strings into it
synxI'm thinking about making a cute fighting game, in 2D for ease of modding. Anyone know a good file format for thingies?
I'm thinking like a zip archive with the sprite info and the physics and such as files within.
ironfroggySVG?
triplah_wyou could write the whole game in svg
but yes, svg would also be good for storing stuff in

Page: 2 9 16 23 30 37 44 51 58 65 72 

IrcArchive

NY Lost Funds