win32com: use not possible as normal user

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sibylle Koczian

    win32com: use not possible as normal user

    Hello,

    I've installed Python 2.4 and the win32 extensions, using administrator
    rights, under Windows XP in "C:\Program me". As this is a directory
    without spaces I didn't expect any problems. But now I can't _use_
    win32com as a normal user, because normal users can't write there:

    PythonWin 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]
    on win32.
    Portions Copyright 1994-2004 Mark Hammond (mhammond@skipp inet.com.au) -
    see 'Help/About PythonWin' for further copyright information.[color=blue][color=green][color=darkred]
    >>> import win32com.client[/color][/color][/color]
    ....[color=blue][color=green][color=darkred]
    >>> import wdclass
    >>> kal = wdclass.easyWor d()[/color][/color][/color]
    Traceback (most recent call last):
    File "<interacti ve input>", line 1, in ?
    File "h:\eigene dateien\abt\kal ender\wdclass.p y", line 10, in __init__
    self.wdApp = win32com.client .Dispatch('Word .Application')
    File
    "C:\Programme\P ython24\Lib\sit e-packages\win32c om\client\__ini t__.py",
    line 96, in Dispatch
    return __WrapDispatch( dispatch, userName, resultCLSID, typeinfo,
    UnicodeToString , clsctx)
    File
    "C:\Programme\P ython24\Lib\sit e-packages\win32c om\client\__ini t__.py",
    line 38, in __WrapDispatch
    klass = gencache.GetCla ssForCLSID(resu ltCLSID)
    File
    "C:\Programme\P ython24\Lib\sit e-packages\win32c om\client\genca che.py",
    line 179, in GetClassForCLSI D
    mod = GetModuleForCLS ID(clsid)
    File
    "C:\Programme\P ython24\Lib\sit e-packages\win32c om\client\genca che.py",
    line 222, in GetModuleForCLS ID
    mod = GetModuleForTyp elib(typelibCLS ID, lcid, major, minor)
    File
    "C:\Programme\P ython24\Lib\sit e-packages\win32c om\client\genca che.py",
    line 262, in GetModuleForTyp elib
    AddModuleToCach e(typelibCLSID, lcid, major, minor)
    File
    "C:\Programme\P ython24\Lib\sit e-packages\win32c om\client\genca che.py",
    line 575, in AddModuleToCach e
    _SaveDicts()
    File
    "C:\Programme\P ython24\Lib\sit e-packages\win32c om\client\genca che.py",
    line 64, in _SaveDicts
    f = open(os.path.jo in(GetGenerateP ath(), "dicts.dat" ), "wb")
    IOError: [Errno 13] Permission denied:
    'C:\\Programme\ \Python24\\lib\ \site-packages\\win32 com\\gen_py\\di cts.dat'[color=blue][color=green][color=darkred]
    >>>[/color][/color][/color]

    Do I have to move my Python installation to another directory with write
    permissions for normal users? Or is there a simpler way? This might not
    be a problem for users with english Windows installations who can get
    bitten anyway by the space in "program files". But in my german
    installation I never had a reason to install Python outside of "Programme" .

    Thanks for any help,
    Koczian
    --
    Dr. Sibylle Koczian
    Universitaetsbi bliothek, Abt. Naturwiss.
    D-86135 Augsburg
    e-mail : Sibylle.Koczian @Bibliothek.Uni-Augsburg.DE
  • Dennis Lee Bieber

    #2
    Re: win32com: use not possible as normal user

    On Fri, 12 Aug 2005 11:01:13 +0200, Sibylle Koczian
    <Sibylle.Koczia n@Bibliothek.Un i-Augsburg.de> declaimed the following in
    comp.lang.pytho n:
    [color=blue]
    > Hello,
    >
    > I've installed Python 2.4 and the win32 extensions, using administrator
    > rights, under Windows XP in "C:\Program me". As this is a directory[/color]

    XP Pro or XP Home?

    XP (both) protect the default program directory and a few
    others. I have a number of applications that have required me to change
    the permissions for directories so my user account can run them. On XP
    Home, I believe this was a simple "share" flag. XP Pro has a much more
    complex security system that has always taken me two or three tries to
    get right (and I still seem to have one application that runs from the
    admin account, but gives me a REGISTRY error from my user account).
    [color=blue]
    > Do I have to move my Python installation to another directory with write
    > permissions for normal users? Or is there a simpler way? This might not
    > be a problem for users with english Windows installations who can get
    > bitten anyway by the space in "program files". But in my german
    > installation I never had a reason to install Python outside of "Programme" .
    >[/color]
    I think the default Python install is to use something like
    Python2.x as the directory, and to place it in the drive root -- to
    avoid problems with the spaces and protected nature of M$ directories.
    If I sound vague there, it is because I have an "unused" Plone
    installation, and to avoid conflicts between the "all-in-one" Plone and
    ActiveState's PythonWin, I installed Plone on my data partition, and
    installed ActiveState over Plone's Python (don't ask, I don't remember
    how I did that either -- but it is one reason I'm a version or two
    behind on both).
    --[color=blue]
    > =============== =============== =============== =============== == <
    > wlfraed@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
    > wulfraed@dm.net | Bestiaria Support Staff <
    > =============== =============== =============== =============== == <
    > Home Page: <http://www.dm.net/~wulfraed/> <
    > Overflow Page: <http://wlfraed.home.ne tcom.com/> <[/color]

    Comment

    • Tim Roberts

      #3
      Re: win32com: use not possible as normal user

      Sibylle Koczian <Sibylle.Koczia n@Bibliothek.Un i-Augsburg.de> wrote:[color=blue]
      >
      >I've installed Python 2.4 and the win32 extensions, using administrator
      >rights, under Windows XP in "C:\Program me". As this is a directory
      >without spaces I didn't expect any problems. But now I can't _use_
      >win32com as a normal user, because normal users can't write there:[/color]

      Right. To use win32com, the site-packages\win32c om\gen_py directory must
      be writable. You shouldn't have to change the whole c:\Programme tree; you
      should be able to make just that one subdirectory writable by all.
      --
      - Tim Roberts, timr@probo.com
      Providenza & Boekelheide, Inc.

      Comment

      Working...