Menu

#31 GUI applications started with pseudo env vars

None
closed
None
5
2014-04-14
2011-10-28
Blackwell
No

When starting GUI applications from PyCmd they have pseudo env vars in their environment, for example CD, DATE, TIME.

Discussion

  • Blackwell

    Blackwell - 2011-10-29

    These points I do not understand about the pseudo and environment handling in PyCmd:

    1. Retrieving pseudo env vars whose values do not seem to get used anywhere in PyCmd (nor are their values useful to maintain as env vars for the next user command, like TIME).

    2. Setting env vars with the name of pseudo env vars. What would be an example where this is correct to do, given that pseudo env vars like TIME, DATE, RANDOM are "highly" dynamic? (There are three places in PyCmd.py where os.environ['CD'] gets set.)

     
  • Horea Haitonic

    Horea Haitonic - 2011-11-08

    The main purpose of creating real env-variables to mimic cmd.exe's pseudo-variables is (if I remember correctly) the completion mechanism. Having them in the environment allows for the variable-name completer to support them w/out treating them as a special case (w/out even knowing about them, actually).

    I totally agree that this can create some surprises for users, and the completer should rather be updated to add them to the list of available variables. As it is often the case, the current solution was meant as a temporary hack but it stuck for a long time (the fact that few people actually use these pseudo-variables helped).

     
  • Horea Haitonic

    Horea Haitonic - 2014-04-14

    [08c5cd] cleans out the environment before starting GUI apps

     

    Related

    Commit: [08c5cd]

  • Horea Haitonic

    Horea Haitonic - 2014-04-14
    • status: open --> closed
    • assigned_to: Horea Haitonic
    • Group: -->
     

Log in to post a comment.