ah, gracias
Type: Posts; User: alexnb185
ah, gracias
Okay, I think i found something.
import os
os.environ['USER'] = 'alex'
os.popen('python echoenv.py').read()
This really isn't related to C and i am sorry about that. But I didn't know who else to ask, and I figure some of you guys will know. Besides python is written in C ;]. But anyway, the system();...
Ah, you are a god. I feel like a total moron looking at that. But thank you very much.
Well, thats weird because the 2nd link I actually went to that site and searched, I guess I just over looked it. Well, I still can't figure out the return value. Because eveytime I try to compile I...
Does anyone know where I can find a manual page for the system(); function? I can't find one. Usually it is just a "man fgets()" google away, only in this case system. But I can't find anything on it.
Ah, O.K. thanks. I didn't know it had a return value.
Well, what good would that do? I want to be able to see if the system(); function worked, if so I want something to happen. I don't see how an if statement would work. Maybe I am wrong. Explain it if...
Okay, so now that we have gotten through that problem, another question has arrised. How can I tell i there was an error in the system(); function. Because as far as I can tell, it doesn't return...
Well, I say that lightly. I wanted it to open a Batch file. Which isn't really a program CreateProcess looks like it is .exe's.
Ha! thanks Dave, and it was the combination of things so zac you were just missing the double "\\." Anyway, I basically just figured out how to do batch, and wanted a program to open a program....
Nope, that did not work. Due to the spaces. I remember making a program once that played an mp3 in the same directory on Ubuntu, but ran into the same problem. The only fix I found was to rename the...
Ah, good idea, I'll try it. Anyone else got any other ways you know it would work?
Hello anyone who is reading this. The question I have seems simple, and may be. I just doint' know. Okay, so all I want to do is have my program open up a batch file on my desktop. The command would...
Okay, thanks guys :]
Okay, I haven't been on here in a while due to my busy busy schedule, but seeing as how it's spring break, why not learn something new and useful. Okay, so I don't know if this is A LOT more...
Hey, I want to say thanks to everyone that helped me because this took awhile and I am just kinda getting started with all this and its nice to have some people out there helping me out. So thanks.
Well, even if that was the problem which it probably was, how would I fix that without doing what I did?
OK, I got it to work!!! I don't know why what I changed made it work but heres what did. At the beginning of the whole thing it asks whether you want to open or delete a file, and for what we were...
if I print the buff after fgets() I just get a straight line across.. like blank. Doesn't that mean it is clear?
well, maybe you have a super computer but for me it doesn't and the whole reason for jumping through these hoops is to get programs with spaces to work. and Salem, this is what I got from doing...
OK, this is getting to be quite the little project lol... but Salem I did what you said to do in the earlier post as well, it did eliminate the (NULL), however the .app is still there in the console,...
ok well Salem I tryed what you said in the post right above me, but it still does it :[ the same (NULL).app thing... this is of course without me typing anything at all
I didn't, I have it with the quotes only around the name of the application, or exactly what the user types in... heres the code:
printf("Type in the name of the app\n");
...
Well, that still didn't fix it, it happened again, only it put a (Null) before the usual app
heres the output in the console:
This program can open applications or delete files
Please select...