proc create_list {filename {prompt verbose} {opts "" }} {
set list_return {}

if {[file exists $filename] } {
if {$prompt eq "verbose" } {
puts "create_list : Reading file \"$filename \" and creating a Tcl List .."
}

set fullfile [open $filename r]

while {![eof $fullfile]} {
gets $fullfile line

if {[regexp {\S} $line ]} {
if {"ignore_comments" in $opts && [regexp {^\S*#} $line]} {
continue
}
regsub {\s+$} $line "" line
lappend list_return $line
}
}
close $fullfile
} else {
nv_msg fatal ""
}

return $list_return
}

TCL create list from file的更多相关文章

  1. 解决: org.iq80.leveldb.DBException: IO error: C:\data\trie\000945.sst: Could not create random access file.

    以太坊MPT树的持久化层是采用了leveldb数据库,然而在抽取MPT树代码运行过程中,进行get和write操作时却发生了错误: Caused by: org.fusesource.leveldbj ...

  2. sqlplus链接数据库报ORA-09925: Unable to create audit trail file

    [localhost.localdomain]:[/oracle11/app/oracle11/product/11.2.0/dbhome_1/dbs]$ sqlplus / as sysdba SQ ...

  3. Can't create/write to file '/tmp/#sql_887d_0.MYD' (Errcode: 17)

    lsof |grep "#sql_887d_0.MYD" 如果没有被占用就可以删掉 . https://wordpress.org/support/topic/cant-creat ...

  4. ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_909_0.MYI' (Errcode: 13)

    mysql> desc tablename; ERROR 1 (HY000): Can't create/write to file '/tmp/#sql_909_0.MYI' (Errcode ...

  5. Can't create/write to file '/tmp/#sql_3105_0.MYI' (Errcode: 13)

    最近的项目中由于临时存储空间太大了.索性把tmp目录删除了.结果访问出现 Can't create/write to file '/tmp/#sql_3105_0.MYI' (Errcode: 13) ...

  6. [问题解决] initAndListen: 10309 Unable to create/open lock file: /data/db/mongod.lock

    错误: 在linux下开启mongoDB的 $ >bin: ./mongod 时报错:initAndListen: 10309 Unable to create/open lock file: ...

  7. How do I create a zip file?(转)

    Creating a zip file is a task that can easily be accomplished by using the classes ZipOutputStream a ...

  8. OUI-67076 : OracleHomeInventory was not able to create a lock file" in Unix

    Symptoms The command "opatch lsinventory" reports the error: OUI-67076:OracleHomeInventory ...

  9. How to create a zip file in NetSuite SuiteScript 2.0 如何在现有SuiteScript中创建和下载ZIP压缩文档

    Background We all knows that: NetSuite filecabinet provided a feature to download a folder to a zip ...

随机推荐

  1. pcl库卸载再重装

    系统版本:ubuntu 16.04 sudo rm -r /usr/include/pcl-1.7 /usr/share/pcl /usr/bin/pcl* /usr/lib/libpcl* sudo ...

  2. ip连接mysql时报不能连接

    问题:springboot项目在用localhost连接mysql时没问题,但当localhost换成ip时出现 该问题:message from server: "Host 'DESKTO ...

  3. vue报错There are multiple modules with names that only differ in casing. This can lead to unexpected behavior when compiling on a filesystem with other case-semantic. Use equal casing. Compare these mod

    今天在开发一个新项目时,当安装完依赖包启动项目后报了一个这个错 There are multiple modules with names that only differ in casing.Thi ...

  4. 题解 AT4556 【12/22】

    题目传送门. ___________ 主要思路 我们可以使用\(C++\)语言中的\(string\)字符串来解. 先定义一个字符串\(s\),并输入\(s\). string s; cin>& ...

  5. C#在运行时自动引入正确的Dlls

    设置程序Dlls的搜索路径 1.导入Native函数 /// <summary> /// 设置Dlls的搜索路径 /// </summary> /// <param na ...

  6. C# 读取Excel到DataTable两种方式对比

    方式一 OLEDB读取 数据库引擎 优点:读取速度快,依据sheet排序读取 缺点:对于Excel版本依赖强,无法读取指定sheet 错误提示:本地计算机未指定 Microsoft.ACE.OLEDB ...

  7. jQuery---创建和添加节点

    创建和添加节点 //创建jq对象 var $li = $('<a href="http://web.itcast.cn" target="_blank"& ...

  8. 【已解决】使用 yarn 安装时,报错node_modules\node sass:Command failed.

    npm install -g mirror-config-china --registry=http://registry.npm.taobao.org npm install node-sass y ...

  9. 配置hosts快速访问GitHub

    经常要clone github中的一些项目,无奈如果不爬梯子的话速度实在是龟速,经常1k/s,于是搜了下解决方法,改HOSTS大法.Windows下在C:/Windows/system32/drive ...

  10. Python并发学习

    #Python并发 多任务 多进程 多线程 线程同步 #多任务处理 多任务处理:使得计算机可以同时处理多个任务 听歌的同时QQ聊天.办公.下载文件 实现方式:多进程.多线程 #程序和进程 程序:是一个 ...