Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
123 views

I'm trying to launch a native program from ghidra in linux. By using gdb the program launches, but the current working directory is different from the executable's and this causes problems. When it ...
1 vote
1 answer
123 views

In this code, when user inputs c:\\temp, getcwd() returns "c:\temp". Actual path is C:\Temp. if(chdir(fullpath)) { perror("cd"); return 1; } if(!getcwd(path, sizeof(path)) {...
2 votes
0 answers
172 views

I read in multiple sources that it is not recommended to manually add paths to the list of paths sys.path that the Python interpreter checks when it encounters an import statement. However, I was not ...
nedhos's user avatar
  • 21
1 vote
1 answer
571 views

I am calling a python 3.10 file from the Anaconda command line (windows, in a conda environment) and noticed that when os.getcwd() is called within a script via command line, it outputs the root ...
1 vote
1 answer
305 views

I was trying to do a test that decompress files in a temp directory (made by a fixture), my function changes the current working directory in order to do some safe operations inside the folder. ...
0 votes
1 answer
160 views

I am testing a program using valgrind for the first time. I haven't found any help regarding this error. What am I doing wrong? how do I solve it? Minimal reproducible example: #include <sys/stat.h&...
1 vote
1 answer
24 views

i want to open my selenium webdriver for edge with a relative way. actually i does not work out with my code. path_main = os.getcwd() edge_path = str('\\') + 'build\msedgedriver.exe' path_get = ...
hadji's user avatar
  • 97
1 vote
3 answers
366 views

I have a folder with a README.md and a run.py that looks like this: import os assert __name__ == '__main__' print('しかく', __file__) print('くろまる', os.getcwd()) try: os.mkdir('DELETE_ME') except ...
Watchduck's user avatar
  • 1,219
0 votes
1 answer
134 views

I am currently writing a shell in C (school project). My cd and pwd is working. But when I do: cd /bin and after pwd, pwd shows /usr/bin. For me it looks like execve with pwd can't handle /bin but why?...
niki's user avatar
  • 23
0 votes
3 answers
371 views

import os cwd = os.getcwd() df.to_csv(cwd+ "/BA_reviews.csv") I didn't understand this code properly. Can someone help?
0 votes
1 answer
171 views

I have a django project running inside docker, and the service is up with the command of python manage.py runserver, with file autoreload open, and using threadings. My code invokes shutil....
2 votes
1 answer
2k views

I am currently building a custom shell that can handle a few internal and external commands along with their options. One of these internal commands is pwd. From the man page of pwd, I got that pwd -L ...
0 votes
2 answers
298 views

#include <unistd.h> #include <stdlib.h> #include <stdio.h> int main() { char wd[10]; if(getcwd(wd,BUFSIZ) == NULL){ //BUFSIZ = 8192 perror("getcwd&...
Jaemin Ryu's user avatar
0 votes
0 answers
188 views

Error When an alias of python command runs on a file defined with an absolute path, its getcwd() becomes faulty, i.e. it doesn't represent my current location from which I'm running this script. ...
ysig's user avatar
  • 507
0 votes
1 answer
215 views

Running a script with exec, how does one "backup" python process global state in its entirety and restores it afterwards? code example: import os print(os.getcwd()) a = 8 print(a) exec_scope ...

15 30 50 per page
1
2 3 4 5
...
8

AltStyle によって変換されたページ (->オリジナル) /