#python - Mon 2 Apr 2007 between 00:10 and 00:25

Ploujpython on planes? I think I've heard everything now - http://developers.slashdot.org/developers/07/04/01/176239.shtml
joao_afkPlouj: April the 1st i you did not notice it.
synxI realized something important about python yesterday, and programming in general.
Every variable is global. Every freaking variable is global.
Even if you have a variable on the stack in C, you can still access the same location on the stack anywhere else in the program, provided you know where it is.
So python variables are all global, because that's how computers work, not because of some special python thing.
gpolowell, there is a thing called scope too
some other day you will learn about this one
synxThe keyword global itself only keeps new local variables from overlapping the one in context. It should be nocreatelocalvariableonassign, but I guess 'global' has a catchy ring to it.
Sure, well scope is one strategy to plan restriction of access to variables. So in languages with scope sure the variable might change unpredictably, as other functions use that area of the stack. But it's still global.
reportingsjrIf anyone here has ever done 3d game programming in java, what would you recommend as the best 3d rendering engine for a game?
synxOpenGL is pretty much the standard when it comes to 3D rendering engines. It's not a cakewalk, but it is pretty powerful.
reportingsjrDoes most everyone has opengl?
reportingsjrI would like this to be cross platform
bytecolorit's portable
gpoloah ok, ignore then
synxE v e r y o n e has OpenGl.
reportingsjroh, ok
Sorry, I'm brand new to this block. I am a php programmer :)
bytecolorsee: Quake
reportingsjrI think I might use Soya3d
snarferHow do I loop the contents of a file into a dictionary>
This is what I have so far:
synxYou might want to look into the pygame module. It uses SDL, but works pretty seamlessly with OpenGL in some cases.
snarfer: Depends on the file format.
gpolofor line in file..
reportingsjrsynx, well I thought it was mainly 2d, I did look into it though
synxsnarfer: You need a file format that has a set of key,value pairs, or else you can't make a dictionary.
delsvrI'm looking to build a tuple interactively. How should I initialize the variable?
er, not interactively. dynamically.
synxreportingsjr: OpenGL is the 3D part. It can render on an SDL surface though, among other things.
gpolosnarfer, you did split already, not what else you want ?
reportingsjrwell, what would be easier to make a 3d game with?
synxsnarfer: Oh, so your format is one record per line, with key: value comma separated?

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