GithubHelp home page GithubHelp logo

Comments (2)

slozier avatar slozier commented on July 28, 2024

Looks like we could use Environment.ProcessPath on .NET 6 to get the name of the exe. Although it's a bit tricky because someone could call dotnet ipy.dll and then we'll get the dotnet.exe. Also hosted scenarios, .NET Standard, etc...

Just so I don't have to look it up, if needed Process.GetCurrentProcess().MainModule.FileName can be used for pre .NET 6 targets.

from ironpython3.

BCSharp avatar BCSharp commented on July 28, 2024

My primary concern is ipy installed as a dotnet tool (global or via tool-path) or from the zip file (using Install-IronPython.ps1). I envisioned these two cases as canonical ways to install ipy on .NET, and was hoping it could be a drop-in replacement for ipy installed through msiexec or chocolatey.

For other scenarios, like using dotnet directly or hosted runs, I expect the user to be able to wire in a launcher if needed. sys.executable is writable so can be set appropriately manually.

I'm now thinking about the following heuristics to handle the dotnet tool case: if the Environment.ProcessPath executable is in the directory directly above sys.executable, use ProcessPath. This should filter out dotnet.exe and still offer a decent behaviour out of the box.

In case of installations from the zip file, I see that IronPython.Hosting.PythonCommandLine already searches for launchers (called "runners" there) in the directory of ipy.dll and that Install-IronPython.ps1 creates those launchers, so there should be no problem there.

from ironpython3.

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.