Menu

#153 Often doesn't see absolute identity of path of edited files

open
nobody
pythonwin (177)
5
2004-10-08
2004-09-30
kxroberto
No

Often after some programming session I have multiple
instances of an edited file in the windows list with
little differences in file name: Upper/lower case
differences, "programme/xy..." & "progra~1/xy" differences

somehow PythonWin doesn't see the identity of those
files. PyWin should maybe use
os.path.normcase(os.path.normpath(os.path.abspath(x)))
somewhere in the framework code ?

I rare cases edited code gets lost. But most times the
auto-reload feature prevents more severe losses (unless
I disable auto-reaload !)

Robert

Discussion

  • kxroberto

    kxroberto - 2004-09-30
    • priority: 5 --> 8
     
  • Mark Hammond

    Mark Hammond - 2004-10-08

    Logged In: YES
    user_id=14198

    Can you please tell me how to reproduce this - I can not.
    Whatever case I use to open the file, I never get the same
    file opened twice.

    I can reproduce the problem with "progra~1"

     
  • Mark Hammond

    Mark Hammond - 2004-10-08
    • priority: 8 --> 5
     
  • kxroberto

    kxroberto - 2004-10-08

    Logged In: YES
    user_id=972995

    I checked to reproduce:
    I open a file - exited pywin - re-run - 1: select from
    menu/file/history 2: open-context-edit the same file from
    explorer => 2 windows

    .py / Edit command in Explorer
    C:\PYTHON23\pythonwin.exe "%1" (Uses DDE)

    the file path of all the different window instances is
    correctly always the same, but multiple windows with
    described problem:

    >>> a=win32ui.GetApp()
    >>>
    a.frame.MDIGetActive()[0].GetEditorView().GetDocument().GetPathName()
    'C:\\devel\\TURBOM~1\\tea_dscore.py'
    #switch to next window
    >>>
    a.frame.MDIGetActive()[0].GetEditorView().GetDocument().GetPathName()
    'C:\\devel\\TURBOM~1\\tea_dscore.py'
    #switch to next window
    >>>
    a.frame.MDIGetActive()[0].GetEditorView().GetDocument().GetPathName()
    'C:\\devel\\TURBOM~1\\tea_dscore.py'
    >>>

     
  • kxroberto

    kxroberto - 2004-10-16

    Logged In: YES
    user_id=972995

    Now its seems to be pinned down:

    the problem is always with files where the file base name or
    one or more folder names are longer than 8 characters and
    when the file is opened twice or more by
    explorer/right-click/Edit (DDE) . Maybe its a DDE only
    problem. Yet opening form explorer is a main method for
    opening . Also when explorer opend and then
    Menu/File/<history> opened

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.