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. C语言 三目运算

    C语言 三目运算 功能:为真后可根据条件选择成立两个不同的表达式 如果表达式1值为真选择表达式2 如果表达式1值为假选择表达式3 案例 #define _CRT_SECURE_NO_WARNINGS ...

  2. phpstudy+phpstorm 浏览器没有解析php文件,直接显示源码

    用phpstorm编辑完项目,右键浏览器预览时页面报错:502 Bad Gateway PhpStorm 2019.1 此时默认打开的地址是:localhost:63339/开头的一长串…… 查资料说 ...

  3. 获取redis cluster master对应的slot分布情况

    需求:原生的redis-trib.rb功能是强大,但输出的内容过于繁杂,比如我需要关注哪些master对应哪些slots,不是很直观,如果集群的规模更大的话,那么输出的结果获取信息更加困难. 说明:这 ...

  4. CSS的模板资源+编辑图像大小

    模板资源 源码之家搜登录页面,链接:https://www.mycodes.net/190/10144.htm        (或者搜门户网站 模板之家,里面页面更强大!) 编辑图像大小      然 ...

  5. rabbitmq系列问题解决:406, "PRECONDITION_FAILED - inequivalent arg 'durable'

    1. 安装rabbitmq,查看官网文档: https://www.rabbitmq.com/#getstarted 由于我是先安装了rabbitmq后自己随手创建了queue,后面又按照官方给的&q ...

  6. OrCAD Capture CIS绘制原理图、Allegro PCB Design XL 绘制PCB

    1.OrCAD Capture CIS绘制原理图 1.1.快捷键 (1)放置连线         w (2)放置net名称      n     放下一个时再按n可以编辑名字 (3)编辑属性      ...

  7. C++中局部变量的返回

    在写 “根据中序和后序遍历顺序,构建树的问题” 时,原本这只是一个非常简单的问题,但是突然发现一直有错误.代码如下: node* get_root(int x1, int x2, int y1, in ...

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

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

  9. Java世界最常用的工具类库

    Apache Commons Apache Commons有很多子项目,常用的项目如下 BeanUtils 提供了一系列对java bean的操作,读取和设置属性值等 map和bean的互相转换 我们 ...

  10. 【转载】python中math模块常用的方法

    转自:https://www.cnblogs.com/renpingsheng/p/7171950.html ceil #取大于等于x的最小的整数值,如果x是一个整数,则返回x ceil(x) Ret ...