f



Reading a tcl file in C

I have a tcl configure file (a list of variables with values and
comments) that I wish to read into an array in C (or better yet,
Objective-C). Does anyone have any suggestions of how to do this, or
have any public-domain or GPL code that does this?

0
3/13/2007 9:37:03 AM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

4 Replies
455 Views

Similar Articles

[PageSpeed] 51

randall.h.wood@gmail.com wrote:
> I have a tcl configure file (a list of variables with values and
> comments) that I wish to read into an array in C (or better yet,
> Objective-C). Does anyone have any suggestions of how to do this, or
> have any public-domain or GPL code that does this?

Can you give us a short example of what this file will look like?

-- 
+--------------------------------+---------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
0
Gerald.Lester (2014)
3/13/2007 1:02:12 PM
On Mar 13, 9:02 am, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
> randall.h.w...@gmail.com wrote:
> > I have a tcl configure file (a list of variables with values and
> > comments) that I wish to read into an array in C (or better yet,
> > Objective-C). Does anyone have any suggestions of how to do this, or
> > have any public-domain or GPL code that does this?
>
> Can you give us a short example of what this file will look like?
>
I apologize for the delayed response.
EXAMPLE FOLLOWS:
# Set the directory in which to install ports
prefix                  /opt/local

# Where to store DarwinPorts working data
portdbpath              /opt/local/var/db/dports

# Type of storage to use for the port registry information, "flat" or
"sqlite"
# NOTE: sqlite not yet supported.
portdbformat            flat

# Type of installation to do for ports, "direct" or "image".  See
ports.conf(5)
and online documentation.
portinstalltype         image

0
3/25/2007 1:24:11 AM
On Mar 25, 3:24 am, "randall.h.w...@gmail.com"
<randall.h.w...@gmail.com> wrote:
> > > I have a tcl configure file (a list of variables with values and
> > > comments) that I wish to read into an array in C (or better yet,
>
> # Set the directory in which to install ports
> prefix                  /opt/local

You have to realize that "being a Tcl file" (Tcl code) is a property
of a *much* greater variety of formats than the one you're showing.
>From here, two options:

 - either you've shown the whole complexity; in this case, you can
restate your problem as

           ignore everything after #
           ignore blank lines
           parse the rest with sscanf(line,"%s %s",field,value)

 and completely forget about Tcl. (Unless you encounter spaces in the
value part -- in this case you'll have to emulate "" and {}; but then,
beware of backslashes if you're inside ""...)

 - or, creative admins will have written these config files with the
whole power of Tcl in mind. A realistic example which *I* would write
is a foreach loop on a list of directories (like a PATH search) so
that the config file works on machines with different setups.

 In this case, bad news, you won't rewrite a Tcl interpreter in a few
lines of C or objC. Instead, either "embed" (i.e. use Tcl as a
library, allocate an interpreter, and feed it), or just write in Tcl a
converter that will simply [source] your config files, and write back
to stdout in the simplified format above. From your example:

     proc prefix x {puts [list prefix $x]}
     proc portdbpath x {puts [list portdbpath $x]}
     proc portdbformat x {puts [list portdbformat $x]}
     proc portinstalltype x {puts [list portinstalltype $x]}
     # and so one for all meaningful keywords

HTH,

-Alex

0
3/25/2007 9:03:26 AM
Alexandre Ferrieux wrote:
> In this case, bad news, you won't rewrite a Tcl interpreter in a few
> lines of C or objC. Instead, either "embed" (i.e. use Tcl as a
> library, allocate an interpreter, and feed it), or just write in Tcl a
> converter that will simply [source] your config files, and write back
> to stdout in the simplified format above. From your example:
> 
>      proc prefix x {puts [list prefix $x]}
>      proc portdbpath x {puts [list portdbpath $x]}
>      proc portdbformat x {puts [list portdbformat $x]}
>      proc portinstalltype x {puts [list portinstalltype $x]}
>      # and so one for all meaningful keywords

Note that getting access to a Tcl interpreter in a few lines of C is
very easy indeed. After all, Tcl is really just a C library.

   Tcl_Interp *interp; /* helpful variable for later */

   Tcl_FindExecutable(argv[0]); /* MUST be first to init Tcl lib! */
   interp = Tcl_CreateInterp();
   /* Maybe define a command to trap back into your code here? */
   if (Tcl_EvalFile(interp, "/the/app/dir/setup.tcl") != TCL_OK) {
      fprintf(stderr, "error in setting up: %s\nTrace follows:\n%s\n",
              Tcl_GetStringResult(interp),
              Tcl_GetVar(interp, "::errorInfo", 0));
      exit(1);
   }

   if (Tcl_EvalFile(interp, "app.cfg") != TCL_OK) {
      fprintf(stderr, "error in config file: %s\nTrace follows:\n%s\n",
              Tcl_GetStringResult(interp),
              Tcl_GetVar(interp, "::errorInfo", 0));
      exit(1);
   }

   Tcl_DeleteInterp(interp);

The only other thing to note is that setup.tcl is where you put all
those procedure declarations that make your little config parsing
language. But that's about all there is to it, though maybe you'll use
better handling of errors than just printing the error message and
exiting. :-)

The other thing to note is that if you're embedding in Java, you might
find either TclBlend or Jacl interesting.

Donal.
0
3/25/2007 1:51:45 PM
Reply:

Similar Artilces:

Sourcing a TCL file from within a tcl file
I am a newbie which I am sure I don't need to state :) I am trying to create a variable with a TCL file that will source another tcl file when I type the variable name something like this if I enter A through my keyboard then source a.tcl Can someone show me how to do this thanks guy On Dec 10, 1:15=A0pm, guy <gcoletta2...@gmail.com> wrote: > I am a newbie which I am sure I don't need to state :) > > I am trying to create a variable with a TCL file that will source > another tcl file when I type the variable name > > something like this > > if I enter A through my keyboard =A0then source a.tcl > > Can someone show me how to do this > > thanks > guy What you are asking is not hard. Will your program have a graphical user interface? Aric On Dec 10, 3:26=A0pm, Aric Bills <aric.bi...@gmail.com> wrote: > On Dec 10, 1:15=A0pm, guy <gcoletta2...@gmail.com> wrote: > > > I am a newbie which I am sure I don't need to state :) > > > I am trying to create a variable with a TCL file that will source > > another tcl file when I type the variable name > > > something like this > > > if I enter A through my keyboard =A0then source a.tcl > > > Can someone show me how to do this > > > thanks > > guy > > What you are asking is not hard. =A0Will your program have a graphical > user interface? > > Aric no I am just using this script...

TCL/TCL combined with Java/C/C++, Any Recommendations?
Hi, I have an application that I wrote in TCL/TK. It has to work with big files +5GB. The parsing performace is not where I would like and some of the data manipulations are taking considerable amount of time due to the data size. Therefore I am considering switching these parts of the code to Java, C or C++. While keepting the GUI and GUI supporting code in TCL/TK at this time. I am trying to figure out which language will be easier to merge with TCL in an application. For C I know that I can compile and generate a .so or .dll and create a TCL package and load it. I believe this is done with SWIG but I have not done it. In Java I saw some info on Jacl and TclBlend. The application will be "compiled" into a TCL "executable". I know I can compile my TCL code into Byte code to protect the IP. I am not sure about Java. Any recommendations or pointers will be greatly appreciated. Thanks in advance, Frank Frank <kranfg@gmail.com> writes: > Hi, > > I have an application that I wrote in TCL/TK. It has to work with big files +5GB. > > The parsing performace is not where I would like and some of the data manipulations are taking considerable amount of time due to the data size. > > Therefore I am considering switching these parts of the code to Java, C or C++. While keepting the GUI and GUI supporting code in TCL/TK at this time. > > I am trying to figure out which language will be easier to ...

Extending TCL in C with tcl.h - Disabliing [<tcl-cmd>] feature
Hi, TCL has a command execution syntax like this: [<tcl cmd>] Anything inside the 3rd bracket will be executed as a Tcl command by the Tcl interprater. Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? In other words, my Tcl interprator should print "[32]" for tcl command puts "[32]" It should not try to treat [] as a special character. Is this any way possible while extending Tcl in C with tcl.h? Thank you, Arijit * arijit79@gmail.com | puts "[32]" | | It should not try to treat [] as a special character. Check out the TCL quoting rules. http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M10 http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M15 Any of puts {[32]} puts "\[32\]" will do the trick. R' On May 8, 3:14 am, ariji...@gmail.com wrote: > Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? By doing this, you would disable the primary functionality of Tcl. I'm certain you could go into the tcl source and stop it - but why not talk about what you are really trying to do. Perhaps someone can give you a better way of doing what you are wanting to do. ...

how to read file in tcl
in the condition that giving some coordinate of polygon in a directory and i have to read these file without using the command create poly how to call these file from the directory? In article <36940419.0308110031.66a5cd1@posting.google.com>, K Zewi <prowarcraftplayer@yahoo.com> wrote: >in the condition that >giving some coordinate of polygon >in a directory and i have to >read these file without using >the command create poly >how to call these file >from the directory? Did you ever get the help you sought? My guess is that readers found your question...

read file in tcl
how to read or call a file in tcl ? davidw@dedasys.com (David N. Welton) wrote in message news:<873cg837s7.fsf@dedasys.com>... > prowarcraftplayer@yahoo.com (K Zewi) writes: > > > how to read or call a file in tcl ? > > 'call' a file? > > Reading a file can be done with the 'read' command: > > set fl [open "somefile"] > set data [read $fl] > > is a simple way to do it. You want to look at the documents for those > commands, and maybe 'fconfigure' if you want to read a binary file. i still can't read ...

Tcl Book that explains tcl C API?
Hi! I am looking for material that explains the tcl C API in order to: - Embed Tcl into a C application. - Extend Tcl to add new commands in C. Does Tcl and Tk Toolkit (2nd Edition) by Ken Jones and John Ousterhout do a good job explain these topics in depth? Thanks! Asif wrote: > Hi! > > I am looking for material that explains the tcl C API in order to: > > - Embed Tcl into a C application. > - Extend Tcl to add new commands in C. > > Does Tcl and Tk Toolkit (2nd Edition) by Ken Jones and John Ousterhout do > a good job explain these topics in depth? > > Thanks! can help you cheap:; http://freecomputerbooks.com/langTclBooks.html -- -- -- What's on Shortwave guide: choose an hour, go! http://shortwave.tk 700+ Radio Stations on SW http://swstations.tk 300+ languages on SW http://radiolanguages.tk marc wrote: > Asif wrote: > >> Hi! >> >> I am looking for material that explains the tcl C API in order to: >> >> - Embed Tcl into a C application. >> - Extend Tcl to add new commands in C. >> >> Does Tcl and Tk Toolkit (2nd Edition) by Ken Jones and John Ousterhout do >> a good job explain these topics in depth? >> >> Thanks! > > > can help you cheap:; > http://freecomputerbooks.com/langTclBooks.html Would you really trust a site which *PRESUMES* the whole world uses their preferred settings and the heck with the visually imperfect. The resu...

Creating a TCL Channel from a C FILE* giving strange file handles
Hey Everybody! Having a problem with the Tcl C Library calls I cant seem to= figure out. I'm trying to create a channel from opened FILE *, and use it = in a TCL script that sources the module. So, what I am running so far is: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D int openCFileCmd(ClientData clientData,=20 Tcl_Interp *interp, int objc, Tcl_Obj *CONST o= bjv[])=20 ...

Can I compile a tcl/tk extended C file into an exe file on windows?
I'm new to tcl/tk. I have a simple tk/tcl extended C file like this, #include <stdio.h> #include <stdlib.h> #include <tcl.h> #include <tk.h> int Tcl_AppInit(Tcl_Interp* interp) { int status; status = Tcl_Init(interp); if (status != TCL_OK) { return TCL_ERROR; } /* Initialize Tk values. */ status = Tk_Init(interp); if (status != TCL_OK) { return TCL_ERROR; } return TCL_OK; } int main(int argc, char** argv) { Tk_Main(argc, argv, Tcl_AppInit); return 0; } Can I compile this file into an exe file on windows? How? Thank you ysrise@gmail.com (yan) writes: [snip[ ...

tcl code to read an image and write tcl code?
Does anyone know where I can find a tcl proc that would take an image, say a gif, and output pure tcl code that I could paste into a program? I saw something about a unix program that did something with mimes but I'm on windows. In article <4403BC94.447A7341@rocketship1.com>, Eric Taylor <et2@rocketship1.com> wrote: > > >Does anyone know where I can find a tcl proc >that would take an image, say a gif, and output >pure tcl code that I could paste into a program? > >I saw something about a unix program that did >something with mimes but I'm on windows. > > I think TkProE (http://tkproe.sourceforge.net) can do this. A quick look suggests that the procs TP_ImageToData & TP_ImageEncode might do what you want. Ted Eric Taylor wrote: > Does anyone know where I can find a tcl proc > that would take an image, say a gif, and output > pure tcl code that I could paste into a program? > > I saw something about a unix program that did > something with mimes but I'm on windows. > > Something like this ought to be pretty close (untested, but I think it's pretty close). It requires the base64 package from tcllib: package require base64 proc main {} { global argv set file [lindex $argv 0] set fd [open $file r] set rawdata [read $fd] close $fd set b64data [base64::encode $rawdata] puts "image create photo -data {\n$b64data\n}" } mai...

Dose there any tcl script to translate an file with embedded tcl
Hi I need to generate some big file, but there are rules for generate these files Ex . ============================== Start input a [0] wire input a [1] wire .. .. .. .. input a [1000] wire End ================================= Dose there any tcl script can help to translate a file with embedded tcl script into a new file For example this is a source file ======================== Start * set i 0 * for { set i 0 } { $i < 1000 } { incr i } { * puts input a [$i] wire * } End ========================== After Translate ======================= Start input a [0] wire input a [1] wire .. .. ...

read an XML file in TCL
Hello I am looking to read an XML file into my TCL program and extract information. How do we read an XML file in TCL? Are there man pages that describe these? Thanks krithiga one way is: http://wiki.tcl.tk/tdom another (and faster, but should be used only for valid stuff) is http://wiki.tcl.tk/11020 Torsten Edler wrote: > another (and faster, but should be used only for valid stuff) is > I'm curious as to this assertion that the shallow regexp parser is faster than tdom, I would have expected things to be the other way around. Do you have a benchmark? Were you testing tdom building a DOM tree or just SAX parsing (the latter would be a fairer comparison)? My own brief benchmark (parsing the XML 1.0 spec, ~200KB) produced these results: proc ParseXMLRegexp xml { XML::Init $xml while 1 { lassign [XML::NextToken] type val attr etype if {$type eq "EOF"} { break } } } proc ParseXMLTdom xml { dom parse $xml doc } puts "Regexp: [time { ParseXMLRegexp $xml } 10]" puts "Tdom: [time { ParseXMLTdom $xml } 10]" output: Regexp: 2419835.7 microseconds per iteration Tdom: 52872.1 microseconds per iteration which makes tdom roughly 45X faster than the regular expression parser, and that's with tdom building and destroying a full DOM tree. -- Neil Hi Neil, i typed my answer a bit too fast and mixed up TclXML with TcLDOM. Few months ago i had to read and extract all data from an XML-...

how to debug tcl running under tcl interep in C++ exe
Hi: I have a C++ exe, which has a tcl interep and loads some tcl files. The exe throws a tcl shell to user where user enters tcl scripts. I want to debug the tcl files while these exe runs. Is there any way/debugger to do this? Regards --Sourav Sourav Sircar schrieb: > Hi: > I have a C++ exe, which has a tcl interep and loads some tcl files. > The exe throws a tcl shell to user where user enters tcl scripts. > I want to debug the tcl files while these exe runs. Is there any > way/debugger to do this? > Regards > --Sourav You could probably load the comm package from tcllib and attach tkcon, tkinspect or one of the other debuggers/consoles to the running interpreter. See http://wiki.tcl.tk/4003 for an overview whats available for debugging. Michael Hi Michael: Thanks for your help. I tried your suggestion in the following way 1. In a shell i started my exe and loaded comm package. It gave me a comm port number 2. In another shell i started tkcon 3. Now i try to attach my exe to tkcon, i use "tkcon attach <comm port>" inside tkcon but it says no interep found. Could you please suggest how should i attach my exe to tkcon? Regards --Sourav sourav.k.sircar@gmail.com schrieb: > Hi Michael: > Thanks for your help. > I tried your suggestion in the following way > > 1. In a shell i started my exe and loaded comm package. It gave me a > comm port number > 2. In another shell i started tk...

How to read a file using TCL
Hi, I am a new bee to TCL. I want to write a script that opens the file and reads it and prints to screen. I have tried the below. But doesn't works. set INFILE [open "temp" a+] set data [read $INFILE] set data [split $data "\n"] foreach line $data { puts $line } -Regards Swaroop Kumar Tata On 14 Mai, 10:39, Swaroop <swaroop.t...@gmail.com> wrote: > Hi, > I am a new bee to TCL. I want to write a script that opens the > file and reads it and prints to screen. I have tried the below. But > doesn't works. > > set INFILE [open "temp" a+] You're opening in "a" (append) mode, that is, the file pointer puts at the end. As you want to read the file, why not use mode "r", which is default anyway? So just do set INFILE [open temp] On May 14, 2:20 pm, suchenwi <richard.suchenwirth- bauersa...@siemens.com> wrote: > On 14 Mai, 10:39, Swaroop <swaroop.t...@gmail.com> wrote: > > > Hi, > > I am a new bee to TCL. I want to write a script that opens the > > file and reads it and prints to screen. I have tried the below. But > > doesn't works. > > > set INFILE [open "temp" a+] > > You're opening in "a" (append) mode, that is, the file pointer puts at > the end. As you want to read the file, why not use mode "r", which is > default anyway? So just do > set INFILE [o...

tcl-pam: PAM authentication for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-pam Tcl-pam is a Tcl interface to the PAM* service of Linux. It provides a Tcl package that allows Tcl scripts to use PAM to authenticate users and programs. It relies on linux-pam library: http://www.kernel.org/pub/linux/libs/pam/ * PAM (Pluggable Authentication Modules): A mechanism to integrate multiple low−level authentication schemes into a high−level application programming interface (API). This enables programs that rely on authentication to be written independently of the underlying authentication scheme. Platform: Linux Home page: http://sourceforge.net/projects/tcl-pam/ Man page: http://tcl-pam.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

Read block of file in Tcl
Hi, I have an input file in the following format: ******************************** Name1 Name2 Row1 DEF 001 Row2 ABC DEG 003 Row3 EW EW 002 Row4 FF 0012 Row1 ADEF 1001 Row2 ARBC DEG 2003 Row3 EWW EW 0302 Row4 AB 0112 Name1 Name2 Row1 DSDEF 001 Row2 ABVC DEG 003 Row3 EDW EW 002 Row4 FVF 0012 Row1 AF 1001 Row2 ACRBC DEG 2003 Row3 ESWW EW 0302 Row4 AEB 0112 **************************************** I have to read this file and --> if I get "Name1" in any of the line, then I have to read the block of file from "Name1" to the first occurrance of "Row4". --> I...

In Tcl and C++ code, how to use Tcl Command, such as exit?
In my code, i used Tcl_SetStdChannel(0, STDIN) and a thread to control all input and output from Tcl, but i want to use some of Tcl' Commands, such as, exit. I used Tcl_Eval() then, but the Tcl command seem invisible in my code, I typed a string in command prompt, such as "AAAAA", and Enter, got nothing feedback. How can i do to get these Tcl Commands work? Thanx! vian1381@china.com.cn wrote: > In my code, i used Tcl_SetStdChannel(0, STDIN) and a thread to control > all input and output from Tcl, but i want to use some of Tcl' Commands, > such as, exit. > > I used Tcl_Eval() then, but the Tcl command seem invisible in my code, > I typed a string in command prompt, such as "AAAAA", and Enter, got > nothing feedback. Your questions are hard to understand, but they suggest that you believe that setting a custom stdin channel will do some magic to establsh a prompt/read/eval loop. That is not the case. > How can i do to get these Tcl Commands work? Start with something that works, like the source code for tclsh, and adapt to your needs. Or post a followup and include more code examples to explain what you're doing and how it doesn't do what you expect. -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |_____________________________________...

tcl-gaul: Genetic Algorithms for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-gaul Tcl-gaul is a Tcl extension for genetic/evolutionary algorithm processing.It relies on the GAUL library: http://gaul.sourceforge.net/ * A genetic algorithm (GA) is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. They are a particular class of evolutionary algorithms that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover. For an introduction to genetic algorithms visit: http://gaul.sourceforge.net/intro.html Platform: Linux (GAUL library dependency) Home page: http://sourceforge.net/projects/tcl-gaul/ Man page: http://tcl-gaul.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

Remembering Tcl: Problems with C and Tcl communicated via pipelines
I am now remembering TCL and I have came across with a problem when doing something I used to do. My purpose is to implement a console-like GUI to present in a listbox outputs from another program written in c and allow to command orders via an entry. All the communication between both programs will be via pipeline As a first approximation, I tried several easy examples and I get stucked with these two programs (see below). When executing tclprogram2.tcl I get Done1 and Done2 and nothing more: i must end it with Ctrl-C. However, if I change Hello3 lines before for loop, the program run smoo...

tcl-syslog: Unix system logging for Tcl (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-syslog Tcl-syslog is a Tcl interface to the *nix syslog service. It provides a Tcl package that allows Tcl scripts to log messages to syslog. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-syslog/ Man page: http://tcl-syslog.sourceforge.net/ Author: Alexandros Stergiakis alsterg ...

tcl-mmap: A POSIX mmap interface for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mmap Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides a Tcl package that allows Tcl scripts to: 1) Memory map files for improved access efficiency; 2) Share memory between related processes; 3) Easily implement cyclic persistent log files. * See the mmap(2) man page. Platform: Linux/Unix Home page: http://sourceforge.net/projects/tcl-mmap/ Man page: http://tcl-mmap.sourceforge.net/ Author: Alexandros Stergiakis On Sep 3, 11:48=A0am, Alexandros Stergiakis <alst...@gmail.com> wrote: > This is an announcement for a relatively new Tcl project: tcl-mmap > > Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides > a Tcl package that allows Tcl scripts to: 1) Memory map files for > improved access efficiency; 2) Share memory between related processes; > 3) Easily implement cyclic persistent log files. > > * See the mmap(2) man page. > Great to see this and the other packages you made. Looking at the manpage it looks a bit misformatted before the usage example. Any specific reason to use GPL for this instead the usual Tcl/MIT/BSD style license used? Michael schlenk wrote: > On Sep 3, 11:48 am, Alexandros Stergiakis <alst...@gmail.com> wrote: >> This is an announcement for a relatively new Tcl project: tcl-mmap >> >> Tcl-mmap is a Tcl interface to the POSIX mmap* system call. It provides >> a Tcl package that...

tcl-mq: POSIX Message Queues for Tcl. (Tcl package)
This is an announcement for a relatively new Tcl project: tcl-mp Tcl-mp is a Tcl interface to POSIX Message Queues*. It provides a Tcl package that allows scripts to create/open/close/unlink multiple parallel message queues, and to send/receive messages synchronously and asynchronously to/from them. * A POSIX message queue is an Inter-Process Communication mechanism available on Linux and some other POSIX-compliant operating systems. It allows to or more processes (or threads) to communicate under the same OS. The messages are buffered by the kernel, which gives them kernel persistency. A message queue can be thought of as a linked list of messages. Threads with adequate permission can put messages onto the queue, and threads with adequuate permission can remove messages from the queue. Each message is assigned a priority by the sender, and the oldest message of highest priority is always retrieved first. Unlike PIPES and FIFOS, no requirement exists that someone be waiting for a message to arrive on a queue, before some process writes a message to that queue. It's not even a requirement for both processes to exist at the same time. Read mq_overview(7) for more details Platform: Linux Home page: http://sourceforge.net/projects/tcl-mp/ Man page: http://tcl-mp.sourceforge.net/ Author: Alexandros Stergiakis alsterg On Sep 3, 11:37=A0am, Alexandros Stergiakis <alst...@gmail.com> wrote: > This is an announcement for a relatively new Tcl pro...

Tcl library for reading ELF files ?
Does anybody know wheather there is a Tcl library available for reading ELF files ? Thanks, Rolf. --------------------------------------------------------------- Rolf Schroedter, German Aerospace Center Remove .nospam to reply: mailto:Rolf.Schroedter@dlr.de.nospam ...

read excel file from tcl in li
Hi everyone i wonder if anybody know if there is anyway to read excel file from tcl in linux? as tcom work only in windows Thanks in advance. On Jan 22, 2:03=A0pm, "m.gad" <mohamedsami...@gmail.com> wrote: > Hi everyone > > i wonder if anybody know if there is anyway to read excel file from > tcl in linux? > > as tcom work only in windows > > Thanks in advance. There is a small command-line tool "xls2csv" (in the catdoc package IIRC) which will convert what can be to CSV. Of course you'll lose Excel-specific metainformation. (Beware, there is also a Perl script by the same name, but in my experience the C one is just fine with fewer dependencies ;-) -Alex m.gad wrote: > i wonder if anybody know if there is anyway to read excel file from > tcl in linux? > > as tcom work only in windows Newer Excel versions can write in an XML format. This should be fairly easy to read from Tcl. Just make sure you have the proper file format. (I haven't really been doing much parsing, but we write lots of Excel reports from Tcl by just writing some XML. Works great as you can have all Excel features: just create what you want in Excel, save it as XML, then open it with an editor to see how Excel actually writes it) hth Ronnie ...

TCL code to read a following file
How to read the following file using arrays in a tcl code. I should store all the begincase ids in one variable and beginlist ids in one variable and contents between the BeginList and EndList in one variable and I should pass all these arguments to a another file. BeginList is dependent on BeginCase.. Each beginCase contain so many beginLists. BeginCase:1 BeginList:1 Stress EndList BeginList:3 Stress|(Min)|VonMises EndList BeginList:8 Stress // Elements, ByID, 12, 14, 67 EndList BeginList:9 Stress EndList BeginList:12 Stress EndList EndCase BeginCase:2 BeginList:(All) Displacement // Nodes, ByID, 1,45,67,104-106 Strain Energy|Strain Energy Strain Energy|Energy Density EndList EndCase BeginCase:3 BeginList:1 Displacement EndList EndCase On May 19, 3:36 pm, nehal <sowmya.ne...@gmail.com> wrote: > How to read the following file using arrays in a tcl code. > (nested constructs) Hint :use regsub to replace all your "begin foobar"s by "foobar {", and all your "end"s by "}". Then use [eval]. -Alex In article <1179600905.738853.34140@u30g2000hsc.googlegroups.com>, Alexandre Ferrieux <alexandre.ferrieux@gmail.com> wrote: >On May 19, 3:36 pm, nehal <sowmya.ne...@gmail.com> wrote: >> How to read the following file using arrays in a tcl code. >> (nested constructs) &...

Web resources about - Reading a tcl file in C - comp.lang.tcl

Reading, Massachusetts - Wikipedia, the free encyclopedia
Coordinates: 42°31′32″N 71°05′45″W  /  42.52556°N 71.09583°W  / 42.52556; -71.09583 Coordinates : 42°31′32″N 71°05′45″W  /  42.52556°N 71.09583°W ...

Crystal Palace v Reading score, result, video highlights, goals - Fox Sports Fox sports
Cabaye opened the scoring from the penalty spot in the 85th minute after Jake Cooper was sent off for fouling Yannick Bolasie. Substitute Campbell ...

Crystal Palace v Reading score, result, video highlights, goals
... goals by Yohan Cabaye and Fraizer Campbell have given Socceroos skipper Mile Jedinak’s Crystal Palace a 2-0 victory at second-tier club Reading ...

Still Surprised By Trump? Then You’re Not Reading Scott Adams
Trump is typically regarded as the least scientific candidate, but according to Scott Adams, he is the best at using the "science of persuasion." ...

Here's Mitt Romney Reading Mean Tweets by Trump and Trump Supporters
... the best tweet. Simon Dumenco, aka Media Guy, is an Ad Age editor-at-large. You can follow him on Twitter @simondumenco. Continue reading ...

It’s time to check out the Philips Hue smartphone-controlled lights you keep reading about
... shot. The Philips 456194 Hue White and Color Ambiance A19 Starter Kit is now available from Amazon for just under $194 shipped. Continue reading... ...

Weekend Reading: Robert Waldmann: New Keynesian Orthodoxy and Hysteresis
**Weekend Reading: Robert Waldmann**: [New Keynesian Orthdoxy and Hysteresis](http://angrybearblog.com/2016/02/new-keynesian-orthdoxy-and-hysteresis.html): ...

A brain-wave-reading device designed to improve sleep did wonderful and terrifying things to my dreams ...
The last week has been extremely unusual, to say the least. My dreams have been more colorful, detailed, vivid, and realistic than at any other ...

Students Not Reading Email? That’s Their Problem
A survey at Bowling Green State University shows that its students tend to read and respond to emails from their professors, but ignore emails ...

Man Learns About Ex’s Pregnancy & Friends’ Erotic Reading Habits Via Google Play
Sharing your review of an app — for good or bad — can help others decide if they should spend the money to add the service to their smartphone ...

Resources last updated: 3/13/2016 2:37:07 PM