Questions tagged [environ]

environ is a Clojure library for accessing environment variables

52 questions
0
votes
0 answers

How do i free allocated memory for environ in C?

I'm trying to implement built-in function like setenv, getenv and unsetenv. All work well with getenv but i really don't how to free memory that i allocated with _setenv. Here is my code for _setenv : char *_setenv(const char *name, const char…
Ryan Goss
  • 11
  • 3
0
votes
0 answers

Remove quotation marks from Path environment variable

I have my Path environment variable with a subset of the paths enclosed with quotation marks (see Figure). This gives me problems in launching some applications which need the Path variable. I opened the Control Panel and I can see that there are no…
VanBaffo
  • 259
  • 1
  • 2
  • 13
0
votes
0 answers

django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable what you said in the previous question doesn't work

I can not run the project, I did what I was told in README.md as directed, but still gives an error. The Output is: Traceback (most recent call last): File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\environ\environ.py", line…
0
votes
1 answer

django.core.exceptions.ImproperlyConfigured: Set the DB_USER environment variable

This project was working good until I reinstalled django-environ to make DB_USER, exc After I tried to execute and I had this error ... settings.py from pathlib import Path import os import environ env = environ.Env( #Set casting, default…
0
votes
1 answer

python: getting the complete url with os.environ

I would like to get the COMPLETE URL using os.environ. I am rendering notebooks with voila and I would like to open url from a dashboard using parameters in the URL. So far I have: URL_BASE = os.environ.get('SCRIPT_NAME') PARAMETERS =…
JFerro
  • 3,203
  • 7
  • 35
  • 88
0
votes
1 answer

How can I get the value of a variable from a C program I've run with a bash script?

I'm running my program in a for loop, passing it varying values of num_threads. for (( j=1; j<9; j++ )) do mpirun -n $j ./my_program done I understand that bash will store the return value in $? automatically. However, what I am…
marti
  • 69
  • 7
0
votes
1 answer

ValueError: dictionary update sequence element #0 has length 1; 2 is required, at the output of pprint in Python

I get the error: ValueError: dictionary update sequence element #0 has length 1; 2 is required at the output of this line: pprint.pprint(dict(os.environ['MOTECOM']), width= 1) I'm using Python 3.6.2 on docker container.
BlueCurve
  • 33
  • 1
  • 7
0
votes
1 answer

Python doesn't set Environment variables

I've written a python application which can be set in development or production mode by using an environment variable. This variable can be passed as a CLI argument: if len(argv) >= 2: environ['DISCOVERY_ENV'] = argv[1] else: …
Danilo Jakob
  • 71
  • 1
  • 6
0
votes
1 answer

is there the way to get environment variable in HP-UX by pid

I want to know the method the way to get environment variable in HPUX from pid by ps command, file, or programming. it is possible to get variable # /proc/$pid/environ in environ or ps e -ww -p $pid in linux # ps ewww pid in aix # pargs in…
raphael
  • 1
  • 4
0
votes
2 answers

Printing argv and environ with pointers

For an exercise we need to print the elements in argv and environ (by looping through the other one). I can get it to print everything but for some reason the first and second pointer element are the same, which doesn't happen when using array…
Brian
  • 47
  • 7
0
votes
0 answers

Check if environment has passed to execv

I try to do some homework exercise about creating a process with execv in linux. I need to take an input string from the user, and check if there is a program with same name on the machine. I need to try to execute the given program string with the…
0
votes
1 answer

how to use environ function to avoid other from using my Access DB

I manage an Access DB (accdb) and it contains some information about my company that I don´t want others to access it out of my company´s server. I thought to use Environ (5)=computername or Environ (12)=path to retrieve some references such as…
bmrp17
  • 11
  • 1
0
votes
1 answer

Redis cache configuration in Django using django-environ

Hereis the relevant part of my settings.py: CACHES = { 'default': { 'BACKEND': 'redis_cache.RedisCache', 'LOCATION': env.str("REDIS_URI"), 'OPTIONS': { 'DB': 1, 'SOCKET_TIMEOUT': 5, …
Jisson
  • 3,566
  • 8
  • 38
  • 71
0
votes
1 answer

Separate dotenv file into parts or use variables in dotenv file

Now if I have .env file like USE_DOCKER=yes POSTGRES_DB=kbackend USER=root DB_URL=$USER:$POSTGRES_DB when I use env('DB_URL') it returns to me $USER:$POSTGRES_DB I want to return root:kbackend I use django-environ
A.Raouf
  • 2,171
  • 1
  • 24
  • 36
0
votes
1 answer

Using Environ$(“USERPROFILE”) VBA save to path

I am new to VBA, so apologies for my ignorance. I have a very complicated macro in Excel 2016 that I need to edit. It is related to this previous discussion I need to change the output save path of a created .pdf. Right now it is using the Excel…
fogharty
  • 11
  • 1
  • 5