205 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
33
views
Changing path in Python without leaving virtual environment
I have a program in Python that activates the virtual environment and then returns to project folder and executes the main project file:
os.chdir('venv/Scripts')
os.system('activate')
os.chdir('../../'...
-1
votes
1
answer
63
views
Python, trouble with os.chdir
I'm having an issue with the following Python code that aims to change the working directory using os.chdir:
if command.startswith("cd"): #C:\Users\užívateľ\Desktop\File Manager\File Manager\...
0
votes
0
answers
51
views
On Error doesn't skip error handling and Chdir() doesn't change directories in VBA
I have two questions: 1) why is this simple code not changing directories? And, 2)Why doesn't my On Error code jump to the goto label? I was under the impression that the code between the Error label ...
0
votes
1
answer
71
views
Python change directory to folder starting by
Is there a way to change directory in Python to a folder starting by a fixed character, but the rest of the name use a "whatever the rest of the name"?
path = os.getenv("HOME")
...
1
vote
1
answer
360
views
Sanitizing command parameters in a DOSKEY macro
Let's say I have the following in my AutoRun script:
@doskey cd = @( ^
for /f usebackq^^ delims^^=^^ eol^^= %%a in (^
'$* ' ^
) do @( ^
if "%%~a"==" " ( ^
...
0
votes
1
answer
235
views
unistd.h's chdir gives undefined reference to symbol 'chdir@@GLIBC_2.2.5' on linux [closed]
When linking some object files together using ld, an error occurs:
undefined reference to symbol 'chdir@@GLIBC_2.2.5'
undefined reference to symbol 'setlocale@@GLIBC_2.2.5'
Do I need to link a ...
0
votes
1
answer
134
views
Execve cd /bin pwd [C]
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?...
0
votes
1
answer
384
views
Using chdir() to read all csv files in a directory [duplicate]
Here is an example of my directory:
Auto
├── Test
│ └── Test.csv
├── Test2
│ └── Test2.csv
└── new.csv
I am trying to read all the csv files in the directory.
Here is my code:
import glob, os
os....
1
vote
1
answer
385
views
Implementation of the command cd (cd -L) in C without exec functions
I'm trying to code the command cd in C without using the exec functions, I already did the cd -P version but I can't seem to find a way to do cd (cd -L) because the function chdir resolves the ...
0
votes
0
answers
225
views
How can I change directory in C without resolving symlinks?
I'm trying to create a C program that emulates a Bash shell.
For the cd file instruction I use chdir("file") but it isn't correct because chdir() always resolves symlinks while cd doesn't by ...
2
votes
2
answers
2k
views
Calling Python Script from VBA - Not working
I referred to the answers given here -
How to call python script on excel vba?
But it didn't work for me.
I simply see a screen flash before me and the Python script simply does not run. The Python ...
2
votes
0
answers
215
views
How to use chdir() in Maxima in a more flexible way?
I often put the following lines at the beginning of my Maxima files
load("operatingsystem")$
chdir("/Users/tilda/Documents/progs/maxima/spm/")$
to make sure that output created ...
0
votes
1
answer
216
views
Isolate state change of chdir within python exec scope
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 ...
-1
votes
1
answer
501
views
chdir(getenv("HOME") returns Bad address
char *home = getenv("HOME");
if (!strcmp(t->argv[0], "cd")) {
if (!t->argv[1]) {
chdir(home);
}
if (chdir(t->argv[1])) {
...
0
votes
2
answers
420
views
The phpseclib $sftp->chdir('//ARTDONE.G9876TT1') fails on z/OS sftp server. The windows psftp command line of "CD //ARTDONE.G9876TT1" works
I get a valid connection with phpseclib but because of the server's requirements I must issue a change remote directory command, $sftp->chdir($dir="//ARTDONE.G9876TT1"), to this directory,...