9 Topics
|
|
I have written some code just to practice verbosity in python. Verbosity is embedded by means of the ArgumentParser module....however, I'd also like to write the stdout to file also when verbosity is disabled : #!/usr/bin/python from optparse import OptionParser from argparse import ArgumentParser import sys def printable1(): print "1" … |
|
# Show # This procedure doesn't conform to any particular calling convention. It is designed specifically to work with other subroutines designed by me. Any of my examples won't be using and standard library functions either. Not because I think they are inadequate, but rather give me complete independence and … |
|
Hey, I am writing this program in which I get x and y coordinates on stdout from a C program.....something like 23 34 45 56 21 56 .. . and so on.... now I need to pipe these values into a Java program and display a cube at the corresponding … |
|
Hello I am getting the above error message with my program. The line giving the error is marked. What I am trying to do is create a file, (new.ppm) and have it then returned onto stdout. [code=c] FILE *fp; fp = fopen("new.ppm", "w+"); //creates the new file fprintf(fp, "P3\n%d %d\n255\n", … |
|
Hello, I want to redirect stdin and stdout of "cat" program to my program. For example if I type "cat" in terminal, and enter input and press enter it outputs the same string I entered. In my c program I am trying to use pipes and dup. I cannot figure … |
|
when i do a stderr redirect to stdout, does the shell open the stdout file? if so is there any way i can capture the opening of this file? basically what i want to do is at the firstinstance of an error i want my perl script to die and … |
|
Dear all, I am working on the code below: [CODE] int cookTime(int time) { int second, minute; for (minute = time; minute > -1; minute--) { for (second = 59; second > -1; second--) { sleep(1); printf ("%i", minute); printf (" : %i\n", second); } } } [/CODE] Now this … |
|
Hello, I was wondering how to go about having a redirect of stdout with Python take effect in a C extension. My python script redirects sys.stdout into a file handle created with [i]open(...)[/i], but within the function in my compiled C-extension, any output ([i]printf[/i], [i]puts[/i], etc) is still given to … |
|
Good day. I would need an advice about sys.stdout and sys.stderr. I use Python 2.6, on Windows XP SP3, but i think the question is the same for UNIX/ MAC computers. I tried all possible combinations before posting this message, so ANY advice would be great. I work with "subprocess" … |
The End.