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. Flask之RESTFul API前后端分离

    Flask之RESTFul API前后端分离 一:虚拟环境搭建的两种方式 1 pipenv的使用 pip install --user pipenv安装pipenv在用户目录下 py -m site ...

  2. yii2 插件使用

    GridView插件 行内文本编辑 后端 if (Yii::$app->request->post('hasEditable')) { $id = Yii::$app->reques ...

  3. 【基础问题】String 类型为什么是final类型

    关于为什么此类问题,都能列出12345...种种原因 已创建具体的值不可修改,故本身就是线程安全的,放到多线程中也不会担心被修改,支持在多线程中共享自身 . 因为字符串是不可变的,所以在它创建的时候H ...

  4. unrecognized import path "golang.org/x/*"的解决办法

    由于国内网络原因,因此访问https://golang.org/网站会被限制.所以在go get下载其他第三方包的时候,如果这个第三方包又引用了https://golang.org/x/下的包,通常会 ...

  5. 阿里云部署JeecgBoot

    阿里云部署JeecgBoot 首先贴出官网教程:http://jeecg-boot.mydoc.io/?t=345682 自己在部署的时候遇到了各种各样的问题,其实一步一步的按照官网给出的步骤来是没问 ...

  6. vue配置开发,测试,生产环境api

    npm run build 调用开发环境接口,打包开发环境npm run build:test 调用测试环境接口,打包测试环境npm run build:prod 调用生产环境接口,打包生产环境 vu ...

  7. How to read a paper efficiently - by prof. Pete carr

    DON'T DO THAT: read the article from the beginning to end; it's a waste of time! READ A PAPER IN TWO ...

  8. C语言-浮点数的秘密

    一.浮点数的秘密 1.内存中的浮点数 浮点数在内存中的存储方式为:符号位.指数.尾数 十进制浮点数的内存表示: 实例分析: #include <stdio.h> //打印十进制的内存表示 ...

  9. (转)一致性Hash

    转载请说明出处:http://blog.csdn.net/cywosp/article/details/23397179     一致性哈希算法在1997年由麻省理工学院提出的一种分布式哈希(DHT) ...

  10. eclipse中部署项目到tomcat启动,一直是starting状态

    这个问题主要是在eclipse中设置了proxy代理导致的,将Network Connections中的Active Provider更改即可! 打赏