Skip to content

Get the program name from argv #1

Description

@jbarnoud

Currently, simopt get the name of the program by importing __main__ and doing gymnastic on it. It could get the name of the program by requiring sys.argv as an argument rather than a truncated version of it. Indeed, the first element of argv is the path used to call the program; and the args argument is usually sys.argv[1:].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions