tcl

convert CIDR to subnet mask in tcl

Given a CIDR, how can I convert it to a subnet mask. ...

Expect/TCL telnet proc does not wait for the prompt

Hello , I have a Expect proc that sends command for telnet login and send commands. Inside the telnet proc I do a TFTP . The size of the file is 10MB. But the telent prompt does not wait until the prompt appears .It waits for the timeout period and comes off. is there any way we can wait for the prompt in Expect . Regards, Mithun ...

How do I get stdout from tcl into a python string variable when using tkinter?

Hi I have the following python code... import Tkinter root = Tkinter.Tk() root.tk.eval('puts {printed by tcl}') It prints "printed by tcl" to the screen. How can I capture what the tcl interpreter prints to the screen into a python string. This is a simplified example of what I am doing. I have an automation system written in pyt...

Linking Tcl/Tk to Python 2.5

Hi, I have an existing Python 2.4 and it is working properly with tkinter as I tested it using python import _tkinter import Tkinter Tkinter._test() Now, I have installed python 2.5.2 but when I try the same tests (with the newer version), it returns (but the same tests are working for the previous ve...

Opening a Web URL with a TCL App that is Sitting on a Network Drive

Hello: I just finished a TCL Db App that includes a featrue to open web page URLs. My code is as follows ($adr is the url): eval exec [auto_execok start] \"\" [list $adr] This code works fine on my Windows workstation. However, after I placed the app on a network drive I receive the following error: '\Drive\Share\Folder\Subfolder' ...

TCL as a Server Side Programming Language

Hello: I am getting ready to build a web application (app) and was interested in using DHTML and TCL. I have been building apps in TCL for awhile and feel pretty comfortable with using this language. I have experience using Visual Studio (VS) to write web apps where the server-side code is in C#. VS makes this incredibly simple and p...

Create a Fully Featured Environment For Tcl/Tk Development Under Windows

I'm now learning Tcl/Tk, but as I'm running Windows, I want to create a fully featured(professional) development environment for this language, but I need to know: Which tools I need to install(first of all)? What are the IDEs that support Tcl/Tk development? What is the best text editor to develop in? Where I can find some librarys fo...

How To Distribute a Project Built In a Interpreted Language?

Hello, I've started a project(developer text editor) in a interpreted language(Tcl/Tk) and another with Perl(both are open-source), but with some time, when it gets in a Beta version, I will need to distribute it for the users(developers of course), but I want to know some things about this: It's possible to compile it to a executable?...

Encode value as base64

I'm trying to write a customization in Lyris ListManager (10.2). The language is TCL, which I know very little about. We need to encode a value as base64 (or really, anything that obfuscates a querystring parameter), but I can't seem to figure out how. Is there a command native to TCL to do this? ...

Input from keyboard in Tcl

How to give inputs to a tcl script through keyboard. is there any thing like scanf() in C? ...

Tcl Starkit with MySql

Hello: Does anyone know what files are required for MySql to work with a Tcl Starkit? Currently, I have libmySQL.dll, libmysqltcl.dll, and pkgIndex.tcl. The pkgIndex.tcl has the following code: proc loadmysqltcl {dir} { set oldcwd [pwd] cd $dir load libmysqltcl[info sharedlibextension] cd $oldcwd } package ifneeded mys...

strange performance behavior when running app from scripting language

Hi, I wrote tcl script as an glue between different apps which are computationally intensive. When I run top command I see that 2 cpu's are 100% utilized. The one is for the tcl and the second is for the application I am running. The question is: why the tcl is utilizing fully one of the processors when the binary application is heavil...

Implementation question in web-development

Hello, We are testing a DSL modem's web pages (the HTTP server is running on the modem). We have an automation tool that configures various options on the web pages by sending POSTS of the respective web pages We are using TCL (HTTP package) to send POST data on the web pages . My questions: Is there a faster way to do this other...

(Tcl/Expect) clear screen after exit

I want to clear the screen (on the local machine) after exiting from my (semi) interactive expect script. Can I do that from within the script? Here's what I tried, that failed. #!/usr/bin/expect -f set env(TERM) vt100 spawn ssh -Y username@domain set user username set pass password #login sequence expect "password: " send "${pass}\r"...

Trying to use tcl threads on windows 7 results in access violation.

I'm trying to get this simple program to work on windows, but it crashes: unsigned (__stdcall testfoo)(ClientData x) { return 0; } int main() { Tcl_ThreadId testid = 0; Tcl_CreateThread( } I am using a makefile generated by cmake and linking against a version of Tcl 8.5.7 I compiled myself using Visual C++ 2008 express. It ...

Expect - get variable from screen region based on row and column

I'm auto-interacting with an SSH session and an ERP program using Expect. Rather than relying on a regular expression to capture a variable in my expect script would it be possible upon receiving a certain keystroke from a user to capture a screen region, say one field, into a variable in the code? Send the server some other commands a...

Where can I find TTY and curses documentation for Unix?

I'm working on automation tools for an ERP program running on SCO Unix. See my questions on Expect: http://stackoverflow.com/questions/1987302/tcl-expect-clear-screen-after-exit http://stackoverflow.com/questions/1988811/expect-get-variable-from-screen-region-based-on-row-and-column Where can I find (either locally or on the web) res...

Book Recommendations To Learn Tcl/Tk

I'm now in love with Tcl/Tk because of the flexibility and easy way to do the things, but I like to learn by books, then I want some book recommendation to learn. ...

How to create data structure in Tcl?

Hello, I am translating some lisp code to Tcl and wonder if there is anything like lisp's defstruct in Tcl for creating data structures? If nothing is built into Tcl, what extension packages to Tcl would you recommend that can be used in a commercial application. Thanks. -William ...

What is the cause of different TCL script behaviour when redirecting the output to a file under Cygwin ?

When calling script as tclsh ./TestDriver.tcl TestList the tcl script stops after one (?) line. But when called with output redirected to a file tclsh ./TestDriver.tcl TestList >bar.out it runs smoothly. Any ideas what might be the cause of such behavior ? ...