Blender 2.5 import problem

I am converting all my game scripts into 2.50, but I ran into a problem, in 1 of the scripts it has:

import Blender

but I guess that is no longer there? Was it renamed or was it replaced?

Heres the full script:

###
gl = GameLogic
cont = gl.getCurrentController()
own = cont.owner

pos = own.position
objName = own.name[2:]

nodes = {}
nodelist = []

###
print ("Generating")
import Blender


###
class node:
    def __init__(self,name,list,pos,next=[]):
        self.name = name
        self.pos = pos
        self.next = next
        list[name] = self


def strf(f):
    return str(int(f*10))


def namepoint(v):
    name = strf(v.co[0])+","+strf(v.co[1])+","+strf(v.co[2])
    return name


###

def trpoint(point,offset=pos):
    return [point[0]-offset[0],point[1]-offset[1],point[2]-offset[2]]

me = Blender.NMesh.GetRawFromObject(objName)
num = 0

###
for f in me.faces:
    for v in f.v:
        num += 1
        name = namepoint(v)
        if name not in nodes.keys():
            nodes[name] = node(name,nodes,trpoint(v.co))
        
            nodes[name].next = []
    
        for v2 in f.v:
            
            if name != namepoint(v2) and namepoint(v2) not in nodes[name].next:
                nodes[name].next.append(namepoint(v2))

gl.nodes = nodes

### Done ###
print ('Finished!!')

Scripting in 2.50 is completely different from a fundamental basis. The API is also not complete; right now the devs are working on Operators.

I have the same problem now: how can i convert the py-nodes to blender 2.5? I am not able to import nodes. I tried

import bpy
from bpy import *

doesn’t work.

To import bpy.ops.node is not possible. I don’t know why, because this modul is in the documentation of blender 2.57b

How can i solve the problem?

Greatings…

http://img192.imageshack.us/img192/7969/whatsthati.png

or from text editor :


import bpy
print(dir(bpy.ops.node))