Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/torch7.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Collobert <ronan@collobert.com>2012-02-03 14:09:42 +0400
committerRonan Collobert <ronan@collobert.com>2012-02-03 14:09:42 +0400
commit50bd93709f7de090e15ea8bcdfe238332555e33d (patch)
treed7210d68dad3190c8b6ed3b2b59821818a00ce17 /CmdLine.lua
parentba1788242623cea0e1588dc0853f8c994d47a553 (diff)
Merge branch 'master' into newpack
Diffstat (limited to 'CmdLine.lua')
-rw-r--r--CmdLine.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/CmdLine.lua b/CmdLine.lua
index eda59b9..b26befa 100644
--- a/CmdLine.lua
+++ b/CmdLine.lua
@@ -66,6 +66,11 @@ function CmdLine:__init(argseparator_,keyseparator_)
self.arguments = {}
self.helplines = {}
self.dateformat = nil
+ self.silentio = false
+end
+
+function CmdLine:silent()
+ self.silentio = true
end
function CmdLine:addTime(name, format)
@@ -187,7 +192,9 @@ function CmdLine:log(file, params)
local oprint = print
function print(...)
local n = select("#", ...)
- oprint(...)
+ if not self.silentio then
+ oprint(...)
+ end
local str = {}
if self.dateformat then
table.insert(str, os.date(self.dateformat))