Title: How does WinPython find and use winpython.ini · winpython/winpython · Discussion #1423 · GitHub
Open Graph Title: How does WinPython find and use winpython.ini · winpython/winpython · Discussion #1423
X Title: How does WinPython find and use winpython.ini · winpython/winpython · Discussion #1423
Description: How does WinPython find and use winpython.ini
Open Graph Description: I am trying to write a compiled wrapper that runs Python programs via WinPython, passing an environment similar to the environment that is set up by python.bat (which invokes env.bat). I can tell t...
X Description: I am trying to write a compiled wrapper that runs Python programs via WinPython, passing an environment similar to the environment that is set up by python.bat (which invokes env.bat). I can tell t...
Opengraph URL: https://github.com/winpython/winpython/discussions/1423
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"How does WinPython find and use winpython.ini","text":"I am trying to write a compiled wrapper that runs Python programs via WinPython, passing an environment similar to the environment that is set up by python.bat (which invokes env.bat). I can tell that I'm getting a different result because if I add an entry to the [environment] section of winpython.ini, then Python can read that value when executed through python.bat but not when executed through my compiled wrapper.
\nI have tried comparing the environments generated by my wrapper and by python.bat, and there is nothing different that seems like it could be relevant.
\nWhat am I missing?
\nThings I have double checked:
\n\nsys.executable does have the correct value. \n- Values passed into the environment of the subprocess by my executable wrapper are accessible by the Python code.
\n
\nWhy it matters for me:
\nI don't actually need to configure anything through winpython.ini, but the fact that the configuration is not being applied makes me concerned about what else might not work correctly for me using this process.
","upvoteCount":1,"answerCount":7,"acceptedAnswer":{"@type":"Answer","text":"I finally figured out that winpython.ini is actually handled in env_for_icons.bat, not env.batand that it is converted into commands that are executed from within that batch file that do things like setting environment variables, so that's why nothing inwinpython.ini` was having any effect.
","upvoteCount":1,"url":"https://github.com/winpython/winpython/discussions/1423#discussioncomment-10954149"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:f520df66-cfff-0c45-fdbb-98ea6f292119 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | BE72:1E174F:6B457E:94CB8E:69721B17 |
| html-safe-nonce | d7898ce3a314a68bc2cb1e575d2b14ab5dff6b7f56f2e48485b6b99aade38447 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTcyOjFFMTc0Rjo2QjQ1N0U6OTRDQjhFOjY5NzIxQjE3IiwidmlzaXRvcl9pZCI6IjE2NDA4NjUzNzA3MTA2MTI3NTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 78e53f2233c1b10ad1ac2bd5b91d9352cc32d96b5b0878c8f263b1dd86474103 |
| hovercard-subject-tag | discussion:7318567 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/winpython/winpython/1423/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/399b392ea9b27e96944e6ba5687c265d33d4c3f8cb2b121cf9160e0796f8e738/winpython/winpython/discussions/1423 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/399b392ea9b27e96944e6ba5687c265d33d4c3f8cb2b121cf9160e0796f8e738/winpython/winpython/discussions/1423 |
| og:image:alt | I am trying to write a compiled wrapper that runs Python programs via WinPython, passing an environment similar to the environment that is set up by python.bat (which invokes env.bat). I can tell t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7aea209b12f15b5742ac38170cf1d21874bf205eb5ad0cac666cd92599fc4cbc |
| turbo-cache-control | no-preview |
| go-import | github.com/winpython/winpython git https://github.com/winpython/winpython.git |
| octolytics-dimension-user_id | 8850436 |
| octolytics-dimension-user_login | winpython |
| octolytics-dimension-repository_id | 24275324 |
| octolytics-dimension-repository_nwo | winpython/winpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24275324 |
| octolytics-dimension-repository_network_root_nwo | winpython/winpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3ff289e97142545d3d22ade4ca0ecba5005b7322 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width