TCL create list from file
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的更多相关文章
- 解决: 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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) ...
- [问题解决] initAndListen: 10309 Unable to create/open lock file: /data/db/mongod.lock
错误: 在linux下开启mongoDB的 $ >bin: ./mongod 时报错:initAndListen: 10309 Unable to create/open lock file: ...
- 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 ...
- OUI-67076 : OracleHomeInventory was not able to create a lock file" in Unix
Symptoms The command "opatch lsinventory" reports the error: OUI-67076:OracleHomeInventory ...
- 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 ...
随机推荐
- 题解【AcWing1089】烽火传递
题面 单调队列优化 DP 模板题. 我们考虑设 \(dp_{i}\) 表示从 \(1\) 到 \(i\) 能够准确传递情报,且第 \(i\) 个烽火台发出信号的最小费用. 转移方程不难得出:\(dp_ ...
- php 常用数学函数
函数 描述 实例 输入 输出 abs() 求绝对值 $abs = abs(-4.2); //4.2 数字 绝对值数字 ceil() 进一法取整 echo ceil(9.999); // 10 浮点数 ...
- 849. Dijkstra求最短路 I(模板)
给定一个n个点m条边的有向图,图中可能存在重边和自环,所有边权均为正值. 请你求出1号点到n号点的最短距离,如果无法从1号点走到n号点,则输出-1. 输入格式 第一行包含整数n和m. 接下来m行每行包 ...
- 【Unity|C#】基础篇(18)——正则表达式(Regex类)
[学习资料] <C#图解教程>:https://www.cnblogs.com/moonache/p/7687551.html 电子书下载:https://pan.baidu.com/s/ ...
- the first week
一.2019我国软件产业调研 2019年1-11月,全国软件和信息技术服务业规模以上企业4.03万家,累计完成软件业务收入64616亿元,同比增长15.5%. 从收入便可以看出软件产业的发展前景还是十 ...
- ASP.NET MVC 给Action的参数赋值的方式
Action指的是Controller类中的方法,如上文中的Index. Action参数的三种常见类型:Model类型.普通参数.FormCollection Model类型 我们可以直接在地址栏后 ...
- 解决jquery click事件执行两次
js 解决办法 event.preventDefault() :阻止默认行为,可以用 event.isDefaultPrevented() 来确定preventDefault是否被调用过了 event ...
- MyEclipse启动Tomcat报错:Could not find the main class: org.apache.catalina.startup
问题描述 Could not find the main class:org.apache.catalina.startup.Bootstrap. Program will exit 问题原因 主要原 ...
- STM 32 内部功能回顾
EXTI 外部中断 NVIC 嵌套的向量式中断控制器 AHB 是高级高性能内部总线,主要是用在CPU.DMA.DSP(数字信号处理) APB 是外围总线,I2C. 串口 APB 分为高速APB2( ...
- 洛谷P1603 斯诺登的密码
https://www.luogu.org/problem/P1603 #include<bits/stdc++.h> using namespace std; struct s { st ...