Quantcast
Browsing latest articles
Browse All 4 View Live

Answer by Kaushal Modi for How to redirect output to file if no console...

It's a combination of using isatty() as suggested by genotrance and the code that you found :)# stdout_to_file.nim import terminal, strformat, timesif isatty(stdout): # ./stdout_to_file echo "This is...

View Article


Answer by Raymond Imber for How to redirect output to file if no console...

Edit:@tjohnson this is in response to your comment. I don't have enough points to respond to your comment directly or something? Thanks Stack Overflow...It's hard to say without seeing more of the...

View Article


Answer by genotrance for How to redirect output to file if no console...

You should be able to use isatty().Here's an example in Nimble.

View Article

How to redirect output to file if no console detected in Nim

I want my Nim program to write to the console if there is one, and redirect echo to write to a file if there isn't. Is there an equivalent to the Environment.UserInteractive property in .NET which I...

View Article
Browsing latest articles
Browse All 4 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>