Problem - Win32 Programming



Hi ..

I'm a newbie to python win32 programming. I was just reading Python
Programming on Win32 and I was trying to run this program:

# SimpleCOMServer.py - A sample COM server - almost as small as they
come!
#
# We expose a single method in a Python COM object.
class PythonUtilities:
_public_methods_ = [ 'SplitString' ]
_reg_progid_ = "PythonDemos.Utilities"
# NEVER copy the following ID
# Use "print pythoncom.CreateGuid()" to make a new one.
_reg_clsid_ = "{41E24E95-D45A-11D2-852C-204C4F4F5020}"

def SplitString(self, val, item=None):
import string
if item != None: item = str(item)
return string.split(str(val), item)

# Add code so that when this script is run by
# Python.exe, it self-registers.
if __name__=='__main__':
print "Registering COM server..."
import win32com.server.register
win32com.server.register.UseCommandLine(PythonUtilities)


I am using Python 2.5 and it says:

Traceback (most recent call last):
File "E:/PyEN/PythonUtilities.py", line 20, in <module>
import win32com.server.register
ImportError: No module named win32com.server.register

.



Relevant Pages

  • Re: [Python-Dev] The baby and the bathwater (Re: Scoping, augmented assignment, fast locals &#
    ... but on a *space* of programs of identical function, as of manner of probing recent features and modules of Python that I manage to apply to it. ... parent lexical scope, be performed on the object bound to a parent scope ... I guess not in the manner of someone who started programming when programs had to fit in a couple dozen kbytes. ... intersection of the file tagged "arrogant would-be mind-readers", and of the file tagged "you are late on the normal trajectory if you did not reproduce my own oh-so-significant mistakes", both well-populated already, although I forgot who I put in them. ...
    (comp.lang.python)
  • Re: [Python-Dev] The baby and the bathwater (Re: Scoping, augmented assignment, fast locals &#
    ... Python 3.x development has started already, so it's not so much a "fairy ... of your approach when using the Python programming language. ... the mistake I mention, both in personal code, as well as code I was ... Nobody forces any school to present closures to beginners. ...
    (comp.lang.python)
  • Re: Attack a sacred Python Cow
    ... The fact that a function is defined within a class statement doesn't ... It's bad programming, but the world is full of bad programmers, and we ... It's also a way to make Python more complicated than it needs to be. ... def fun(self, cat): ...
    (comp.lang.python)
  • Re: Any maths or science fans using Solaris? (related to Mathematica on Solaris)
    ... Sage is based around the Python language, but glues together lots of open-source maths software - a list is at ... Automatically Tuned Linear Algebra Software ... Convex optimization, linear programming, least squares, etc. ... Cython: C-Extensions for Python ...
    (comp.unix.solaris)
  • Re: Perl Vs Python: Blind Folks
    ... perl's ";" etc. makes writing python programs perhaps very device ... is roughly one fourth of what it is with speech. ... Most screen readers primarily output stuff using highly intelligible, ... This means some major difficulties in programming in any language. ...
    (comp.lang.perl.misc)