|ehird||is there an 'os.system_but_discard_output'|
ah, > /dev/null works
(For the record, no, I do not care about windows.)
|sancho___||so it turns out all the hype about coming up to speed quickly with python is right. i'm mostly finished with my first project and it didn't take much to get going.|
|ehird||hardly hype, been around for years ;)|
|padt||ehird: you can mess around with sys.stdout and stderr as well. If you ever want to care about windows.|
|ehird||meh, sys.system doesn't return the error code|
|Jabapyth||is that just windows (sys.stdout)?|
ehird: use os.popen3
|ehird||oh, it does :/|
|padt||Jabapyth: no, it's for all platforms afaik, so you can set it to something that discards input and be cross platform|
|AMDfanboy||hi guys, i have a file with only two raw_inputs and i want to call it from the command line and pass arguments into them|
gotta be easy?
whats the trouble?
|AMDfanboy||couldnt figure it out, do i need to use map or osmething|
|Jabapyth||no need for map. just use raw_input()|
|action||ehird pasted http://pastie.textmate.org/41254|
meet mr. hacky command detection!
|AMDfanboy||i'm trying to call a file with raw_inputs in it|
from the command line
|Jabapyth||so make it executable...|
|AMDfanboy||script.py arg1 arg2|
|Jabapyth||oh... you need sys.argv|
|ehird||you can't make python handle that by default|
|Jabapyth||that tells you the arguments it was called with|
|ehird||echo "arg1\narg2" | script.py|
if its not your script, like you esem to be implying
|AMDfanboy||right, i'm grading HW assignments :-)|
I have a memory corruption / segfault bug in a C API module I'm developing
are there any tools to help track this down?
all I have at the moment is a core dump of a crash inside the python runtime, but it's hard to tell where the root cause is
|deltab||abtronic: load it into gdb and get a stack backtrace (bt)|
|abtronic||I've got that|