Git Product home page Git Product logo

Comments (13)

randomascii avatar randomascii commented on May 3, 2024

My Chromium development machine has two python related directories in the path:

C:\python_27_amd64\files
c:\src\depot_tools

The first one contains python.exe. I'm not sure how that directory got added to my path. Its placement in the path environment variable strongly suggests that I did not add it manually.

I checked on another Chromium developer's machine and they had the exact same paths, on a machine that was set up last week, and they were certain that they did not manually add the paths.

So, perhaps your setup is non-standard? Or perhaps its worth adding the Python directory to your path.

from uiforetw.

Chubab avatar Chubab commented on May 3, 2024

I think if one explicitly installs python on Windows via its installer, it
may automatically add it to PATH.

I didn't explicitly install python because I just use depot_tools'; is
there any way we can make UIForETW fallback to using python.bat if in path?

On Tue, Sep 1, 2015 at 4:27 PM Bruce Dawson [email protected]
wrote:

My Chromium development machine has two python related directories in the
path:

C:\python_27_amd64\files
c:\src\depot_tools

The first one contains python.exe. I'm not sure how that directory got
added to my path. Its placement in the path environment variable strongly
suggests that I did not add it manually.

I checked on another Chromium developer's machine and they had the exact
same paths, on a machine that was set up last week, and they were certain
that they did not manually add the paths.

So, perhaps your setup is non-standard? Or perhaps its worth adding the
Python directory to your path.


Reply to this email directly or view it on GitHub
#53 (comment).

from uiforetw.

randomascii avatar randomascii commented on May 3, 2024

I'm sure we can do something. UIforETW could parse python.bat (just the depot_tools version) and use it to locate python.exe - should be easy enough.

It's just weird that your install doesn't have python in the path. Probably they changed it in the last year to add python.exe to the path - just a guess.

from uiforetw.

Chubab avatar Chubab commented on May 3, 2024

I actually just re-did my setup for Win10 (although I didn't have to
reinstall depot_tools per se as it was on D: and stayed around despite
flashing the OS).

Don't see how I would end up with python in my path without installing it
anyways though?

On Wed, Sep 2, 2015 at 1:26 PM Bruce Dawson [email protected]
wrote:

I'm sure we can do something. UIforETW could parse python.bat (just the
depot_tools version) and use it to locate python.exe - should be easy
enough.

It's just weird that your install doesn't have python in the path.
Probably they changed it in the last year to add python.exe to the path -
just a guess.


Reply to this email directly or view it on GitHub
#53 (comment).

from uiforetw.

randomascii avatar randomascii commented on May 3, 2024

I never installed Python - I assumed that the depot_tools setup process did, somehow, but I'm not sure how/when.

from uiforetw.

randomascii avatar randomascii commented on May 3, 2024

How's this?

c789195

It's somewhat hardcoded - it expects to find a particular syntax to invoke python.exe - but I'm not sure I can make it more generic without knowing what variations of python.bat exist.

I'll probably reduce the indentation level before committing to master, but the nested if statements made testing easier. It does work.

from uiforetw.

Chubab avatar Chubab commented on May 3, 2024

I guess that works, thanks (though I'd think this should be a fallback if
python.exe is not found rather than being first).

Or could you have done a simple search for python.bat the same way you look
for python.exe and invoke python.bat directly (I.e., why is an exe
required?)

Le jeu. 3 sept. 2015 01:17, Bruce Dawson [email protected] a
écrit :

How's this?

c789195
c789195

It's somewhat hardcoded - it expects to find a particular syntax to invoke
python.exe - but I'm not sure I can make it more generic without knowing
what variations of python.bat exist.

I'll probably reduce the indentation level before committing to master,
but the nested if statements made testing easier. It does work.


Reply to this email directly or view it on GitHub
#53 (comment).

from uiforetw.

randomascii avatar randomascii commented on May 3, 2024

I was definitely going to look for python.exe first. For some reason I hadn't considered launching python.bat directly. I guess I'd have to launch cmd.exe /c python.bat or something like that - I'm not sure, but I doubt python.bat can be launched directly. Thanks for the feedback.

from uiforetw.

Chubab avatar Chubab commented on May 3, 2024

Or just ShellExecute the path which apparently works with either .exe or
.bat? (ref.

http://stackoverflow.com/questions/16621911/shellexecute-not-working-with-bat-file

which is ironically titled the opposite of a working solution with
shellexecute :-)).

On Thu, Sep 3, 2015 at 10:55 AM Bruce Dawson [email protected]
wrote:

I was definitely going to look for python.exe first. For some reason I
hadn't considered launching python.bat directly. I guess I'd have to launch
cmd.exe /c python.bat or something like that - I'm not sure, but I doubt
python.bat can be launched directly. Thanks for the feedback.


Reply to this email directly or view it on GitHub
#53 (comment).

from uiforetw.

randomascii avatar randomascii commented on May 3, 2024

I have to capture the output which I don't think ShellExecute supports, because the whole point is to put the output in the trace information window.

I guess I could ShellExecute "python.bat IdentifyChromeProcesses.py >%temp%\identify_output.txt" or something like that. Hmmm - too many possibilities.

from uiforetw.

randomascii avatar randomascii commented on May 3, 2024

Huh. It was way easier than expected. Apparently CreateProcess just works with python.bat. The issue is resolved by this change:

36dff98

I have not yet created a release but the next release will have the change.

from uiforetw.

Chubab avatar Chubab commented on May 3, 2024

Nice :-), thanks!

On Sat, Sep 5, 2015 at 7:03 PM Bruce Dawson [email protected]
wrote:

Huh. It was way easier than expected. Apparently CreateProcess just works
with python.bat. The issue is resolved by this change:

36dff98
36dff98

I have not yet created a release but the next release will have the change.


Reply to this email directly or view it on GitHub
#53 (comment).

from uiforetw.

randomascii avatar randomascii commented on May 3, 2024

The v 1.17 release has this change.

from uiforetw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.