Hi,
For this simple 2 line python script:
import sysconfig print(sysconfig._getuserbase())
my python-2.7 outputs C:\Users\sisyphus\AppData\Roaming\Python
I am seeking a win32 python-2.7 that, for the same script, would output forward slashes in place of those backslashes.
Anyone know where I might obtain such a beast ?

Alternatively, is there a file somewhere inside my existing python-2.7 distro that I could hack such that those backslashes are replaced by forward slashes ?

Cheers,
Rob

Just to explain a little:

My current building (in the msys2 shell) of gobject-introspection (needed for the perl module Glib-Object-Introspection) fails to run to completion. It dies with:
./libtool: line 5999: cd: C:_32Python27/lib: No such file or directory
Clearly, a path of C:\_32\Python27/lib has been delivered to the build process - and I'm fairly sure that those backslashes come straight from python itself. Certainly, I haven't specified any paths that contain a backslash.
Now, the msys2 shell will understand /c/_32/Python27 and C:/_32/Python27 but it regards the backslashes in C:\_32\Python27 as escapes.

Here's a quick demo of this:
sisyphus@Owner-PC311012 MINGW64 ~ $ ls /c/_32/Python27 DLLs include libs NEWS.txt pythonw.exe tcl w9xpopen.exe Doc Lib LICENSE.txt python.exe README.txt Tools sisyphus@Owner-PC311012 MINGW64 ~ $ ls C:/_32/Python27 DLLs include libs NEWS.txt pythonw.exe tcl w9xpopen.exe Doc Lib LICENSE.txt python.exe README.txt Tools sisyphus@Owner-PC311012 MINGW64 ~ $ ls C:\_32\Python27 ls: cannot access C:_32Python27: No such file or directory
So ... I'm thinking that if I can get python to deliver paths that contain only forward slashes then this problem will be solved.

Until then, all is *not* necessarily lost. The build does proceed long enough to create the girepository library - which might just turn out to be all that Glib-Object-Introspection needs.
In any case, it would be nice to get the damn process to work as it should (even if only to enable installation by running make install, instead of the manual copy'n'pasting that's currently needed).

In reply to [OT++] Seeking Win32 Python Wisdom by syphilis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.