Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

environment-variables

Why can’t environmental variables set in python persist?

August 16, 2022 by Magenaut

I was hoping to write a python script to create some appropriate environmental variables by running the script in whatever directory I’ll be executing some simulation code, and I’ve read that I can’t write a script to make these env vars persist in the mac os terminal. So two things:

Categories Python, Q&A Tags environment-variables, persistence, python Leave a comment

Disable assertions in Python

August 16, 2022 by Magenaut

How do I disable assertions in Python?

Categories Python, Q&A Tags assert, debugging, environment-variables, exception-handling, python Leave a comment

When to use sys.path.append and when modifying %PYTHONPATH% is enough

August 15, 2022 by Magenaut

So, it turned out i was missing a semi-colon from my PYTHONPATH definition. But this only got me so far. for some reason, my script did NOT work as a scheduled task (on WinXP) until I explicitly added a directory from PYTHONPATH to the top of my script.

Categories Python, Q&A Tags environment-variables, python Leave a comment

In Python script, how do I set PYTHONPATH?

August 13, 2022 by Magenaut

I know how to set it in my /etc/profile and in my environment variables.

Categories Python, Q&A Tags environment-variables, linux, python, unix Leave a comment

Python: Exporting environment variables in subprocess.Popen(..)

August 12, 2022 by Magenaut

I am having an issue with setting an environment variable on a call to subprocess.Popen. The environment variable does not seem to be getting set. Any suggestions on how to properly set environmental variables for a Python commandline call?

Categories Python, Q&A Tags environment-variables, python, python-2.7 Leave a comment

Tensorflow set CUDA_VISIBLE_DEVICES within jupyter

August 12, 2022 by Magenaut

I have two GPUs and would like to run two different networks via ipynb simultaneously, however the first notebook always allocates both GPUs.

Categories Python, Q&A Tags environment-variables, python, tensorflow Leave a comment

How to read environment variables of a process

August 11, 2022 by Magenaut

Linux’s /proc/<pid>/environ does not update a process’s environment. As I understand it, the file contains the initial environment of the process.

Categories Q&A, Unix & Linux Tags environment-variables, linux, process Leave a comment

How to read value of variable, where the name of variable is the value of another variable

August 11, 2022 by Magenaut

I think an example is in order. Consider I have these two environment variables setup (by a Continuous Delivery tool): PACKAGE_VER=1.2.3 and USE_VERSION_FROM=PACKAGE_VER.

Categories Q&A, Unix & Linux Tags bash, environment-variables Leave a comment

What scopes can shell variables have?

August 11, 2022 by Magenaut

I just ran into a problem that shows me I’m not clear on the scope of shell variables.

Categories Q&A, Unix & Linux Tags environment-variables Leave a comment

Location to place systemd service EnvironmentFile when creating debian package

August 11, 2022 by Magenaut

I am currently rewriting upstart jobs to use systemd and I wanted to know:

Categories Q&A, Unix & Linux Tags environment-variables, files, systemd Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 … Page7 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress