Very very very new for tcl/tk

  • Follow


Hi Group,

I hope i am in the right place

i only have 0/10 knowledge in tcl/tk

Questions:
#. am i on the right place (group) ? if, yes
#. where to download tcl/tk?
#. where should i extract downloaded files to?
#. how do i configure?
#. where do i write my 'Hello world' program?
#. how should i write my 'Hello world' program?
#. is there any other thing i should know/study about tcl/tk?

Direct me.............

Thanks
RM3sh
0
Reply ramesh1703 (1) 1/6/2010 5:51:59 AM

RM3sh <ramesh1703@gmail.com> writes:

[snip]

> Direct me.............

www.tcl.tk

-- 
Óscar
0
Reply utf 1/6/2010 6:41:43 AM


Welcome,
>I hope i am in the right place
yes
>i only have 0/10 knowledge in tcl/tk
this will change shortly

>Questions:
>#. am i on the right place (group) ? if, yes
see above
>#. where to download tcl/tk?
the best place is www.activestate.com - you get Tcl with lots of
useful packages (== libraries) included
>#. where should i extract downloaded files to?
just run the installer (Windows: the .exe you downloaded) and tell it
where to install Tcl.
Personal recommendation: Do _not_ install it under c:\programm files
>#. how do i configure?
On Windows you don't need to, on Linux I don't know.
>#. where do i write my 'Hello world' program?
I heartily recommend tkcon.tcl (you find it in Tcl's bin directory).
Create a link to it and use it run ('source') your Tcl scripts.
>#. how should i write my 'Hello world' program?
Just use the editor of your choice.
Or, for interactively trying things out: tkcon.tcl
>#. is there any other thing i should know/study about tcl/tk?
Well, there are one or two things you will need to learn besides 
	puts "hello world"
There are many good tutorials. Go to 
	http://wiki.tcl.tk/20796
for a start.
>
>Direct me.............
HTH
Helmut Giese
0
Reply Helmut 1/6/2010 7:15:52 AM

On 6 jan, 06:51, RM3sh <ramesh1...@gmail.com> wrote:
> Hi Group,
>
> I hope i am in the right place
>
> i only have 0/10 knowledge in tcl/tk
>
> Questions:
> #. am i on the right place (group) ? if, yes
> #. where to download tcl/tk?
> #. where should i extract downloaded files to?
> #. how do i configure?
> #. where do i write my 'Hello world' program?
> #. how should i write my 'Hello world' program?
> #. is there any other thing i should know/study about tcl/tk?
>
> Direct me.............
>
> Thanks
> RM3sh

Besides www.tcl.tk you can also have a look at the Tclers' Wiki:
wiki.tcl.tk
(though the first site will guide you there too).

There are quite a few tutorials to be found. If you are looking for a
very
basic one (one that assumes very little if any at all programming
experience),
it so happens I am working on one. Just let me know.

Regards,

Arjen
0
Reply Arjen 1/6/2010 7:54:03 AM

On Jan 6, 1:54=A0am, Arjen Markus <arjen.markus...@gmail.com> wrote:
> On 6 jan, 06:51, RM3sh <ramesh1...@gmail.com> wrote:
>
>
>
> > Hi Group,
>
> > I hope i am in the right place
>
> > i only have 0/10 knowledge in tcl/tk
>
> > Questions:
> > #. am i on the right place (group) ? if, yes
> > #. where to download tcl/tk?
> > #. where should i extract downloaded files to?
> > #. how do i configure?
> > #. where do i write my 'Hello world' program?
> > #. how should i write my 'Hello world' program?
> > #. is there any other thing i should know/study about tcl/tk?
>
> > Direct me.............
>
> > Thanks
> > RM3sh
>
> Besideswww.tcl.tkyou can also have a look at the Tclers' Wiki:
> wiki.tcl.tk
> (though the first site will guide you there too).
>
> There are quite a few tutorials to be found. If you are looking for a
> very
> basic one (one that assumes very little if any at all programming
> experience),
> it so happens I am working on one. Just let me know.
>
> Regards,
>
> Arjen

Hey Arjen

Thanks for your reply. i just want to run a "Hello world" program. to
do that i need to configure/install TCL

Lets say i have the following code

% puts "Hello, world"

question is , where do i type; how do i run; where do i see the
result; ? blah blah you know what beginner needs.

FYI: I rate "0" out of "10"


Thanks
RM3sh
0
Reply RM3sh 1/6/2010 9:33:18 AM

On 6 jan, 10:33, RM3sh <ramesh1...@gmail.com> wrote:
> On Jan 6, 1:54=A0am, Arjen Markus <arjen.markus...@gmail.com> wrote:
>
>
>
>
>
> > On 6 jan, 06:51, RM3sh <ramesh1...@gmail.com> wrote:
>
> > > Hi Group,
>
> > > I hope i am in the right place
>
> > > i only have 0/10 knowledge in tcl/tk
>
> > > Questions:
> > > #. am i on the right place (group) ? if, yes
> > > #. where to download tcl/tk?
> > > #. where should i extract downloaded files to?
> > > #. how do i configure?
> > > #. where do i write my 'Hello world' program?
> > > #. how should i write my 'Hello world' program?
> > > #. is there any other thing i should know/study about tcl/tk?
>
> > > Direct me.............
>
> > > Thanks
> > > RM3sh
>
> > Besideswww.tcl.tkyoucan also have a look at the Tclers' Wiki:
> > wiki.tcl.tk
> > (though the first site will guide you there too).
>
> > There are quite a few tutorials to be found. If you are looking for a
> > very
> > basic one (one that assumes very little if any at all programming
> > experience),
> > it so happens I am working on one. Just let me know.
>
> > Regards,
>
> > Arjen
>
> Hey Arjen
>
> Thanks for your reply. i just want to run a "Hello world" program. to
> do that i need to configure/install TCL
>
> Lets say i have the following code
>
> % puts "Hello, world"
>
> question is , where do i type; how do i run; where do i see the
> result; ? blah blah you know what beginner needs.
>
> FYI: I rate "0" out of "10"
>
> Thanks
> RM3sh- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Start with downloading a distro of Tcl/Tk, if you have none.
ActiveTcl (activestate.com/tcl) is a nice and complete distribution.

You can work interactively (that is: type in the command you want to
run on a prompt) or you can edit a file, save it and then run it.

In the first case, run the Tcl shell:

   > tclsh

Then a prompt appears and you can start typing your commands.
(exit will end the shell)

In the second case, if your program is called hello.tcl:

   > tclsh hello.tcl

The program is run to the end and then the shell stops.

Tcl source files are simple text files, no frills. Use any text editor
you like.

This is the most basic information I think I can give you.

Regards,

Arjen
0
Reply Arjen 1/6/2010 10:10:59 AM

On Jan 6, 1:15=A0am, Helmut Giese <hgi...@ratiosoft.com> wrote:
> Welcome,>I hope i am in the right place
> yes
> >i only have 0/10 knowledge in tcl/tk
>
> this will change shortly
>
> >Questions:
> >#. am i on the right place (group) ? if, yes
> see above
> >#. where to download tcl/tk?
>
> the best place iswww.activestate.com- you get Tcl with lots of
> useful packages (=3D=3D libraries) included>#. where should i extract dow=
nloaded files to?
>
> just run the installer (Windows: the .exe you downloaded) and tell it
> where to install Tcl.
> Personal recommendation: Do _not_ install it under c:\programm files>#. h=
ow do i configure?
>
> On Windows you don't need to, on Linux I don't know.>#. where do i write =
my 'Hello world' program?
>
> I heartily recommend tkcon.tcl (you find it in Tcl's bin directory).
> Create a link to it and use it run ('source') your Tcl scripts.>#. how sh=
ould i write my 'Hello world' program?
>
> Just use the editor of your choice.
> Or, for interactively trying things out: tkcon.tcl>#. is there any other =
thing i should know/study about tcl/tk?
>
> Well, there are one or two things you will need to learn besides
> =A0 =A0 =A0 =A0 puts "hello world"
> There are many good tutorials. Go to
> =A0 =A0 =A0 =A0http://wiki.tcl.tk/20796
> for a start.
>
> >Direct me.............
>
> HTH
> Helmut Giese

Hi Group

Those replies helped me a lot, many thanks

Here where i am

* I installed tcl/tk as u have instructed and worked properly.
* I typed my first program in "tkcon.tcl". Ran well.

Further doubts, don't mind if i am repeating the questions:

=3D> Now, i have written the same program in a file and saved it as
"hello.tcl"
=3D> Where should i save the file. Is there any restriction that file
have to be saved in a particular location. if not, how do i run a file
saved in a random location 'For Instance: Desktop'
FYI:I have saved the "hello.tcl" file in the location "C:\Tcl\bin".
=3D> And, where should i type the command "tclsh hello.tcl". FYI:I have
tried typing the "tclsh hello.tcl" command in "tkcon.tcl" windows and
it throws error.

ill disturb u guys later ;)

Thanks
RM3sh

0
Reply RM3sh 1/7/2010 6:08:24 AM

On 7 jan, 07:08, RM3sh <ramesh1...@gmail.com> wrote:
> Here where i am
>
> * I installed tcl/tk as u have instructed and worked properly.
> * I typed my first program in "tkcon.tcl". Ran well.
>
> Further doubts, don't mind if i am repeating the questions:
>
> => Now, i have written the same program in a file and saved it as
> "hello.tcl"
> => Where should i save the file. Is there any restriction that file
> have to be saved in a particular location. if not, how do i run a file
> saved in a random location 'For Instance: Desktop'
> FYI:I have saved the "hello.tcl" file in the location "C:\Tcl\bin".

You can save it anywhere you like. I would advise you however
not to put them in that location: it "pollutes" your installation.

> => And, where should i type the command "tclsh hello.tcl". FYI:I have
> tried typing the "tclsh hello.tcl" command in "tkcon.tcl" windows and
> it throws error.
>

If you are in an interactive shell, like tchsh, wish or tkcon, then
you should use the source command:

  % source hello.tcl

If you start the shell, you can give it a file name as an argument and
it will automatically "source" the file.

Regards,

Arjen
0
Reply Arjen 1/7/2010 8:22:34 AM

Hi,
well, everybody has his/her own way of organizing things, but (as
Arjen already mentioned) don't put your stuff into Tcl's installation.

To be able to invoke tkcon.tcl from everywhere I would suggest:
- Create a directory c:\bat
- Create a file tkcon.bat containing the line 
  <path to Tcl's bin dir>\wishXY.exe <path to Tcl's bin dir>\tkcon.tcl
%1 %2 %3 %4 %5 %6 %7 %8 %9
  (the above should all be on one line)
  Note: In Tcl's bin directory look up the correct name of 'wish' and
adapt the above line.
- Add this directory to your path (if you don't know how to do this,
come back)
- Log off, log on again: Now your PATH is updated.

From now on you can call tkcon from everywhere.

Change to Tcl's bin dir once more. If there doesn't exist a
'tclsh.exe' (wish.exe) copy tclshXY.exe to tclsh.exe (same for
wishXY.exe).
This way you can call Tcl either as tclshXY or tclsh.

For organizing your work you might do something like this:
- Create a directory c:\proj
- Create a sub-directory c:\proj\GetRich
- In this last directory you put all (Tcl and other) files which will
help you complete this project - at least with the setup from above
you will be able to activate tkcon as well as tclsh or wish from this
directory.
- Once done, you start another project - say in c:\proj\GetFamous
- Now it may happen that you could re-use some of the Tcl files you
used to become rich (say formula1.tcl). In this case you would use
(from within the 'GetFamous' dir)
    source "../GetRich/formula1.tcl"
(note the '/' - never use '\' in paths from within Tcl scripts).

Hm, looks like I am in narrative mood today.
Well, HTH and good luck
Helmut Giese
0
Reply Helmut 1/7/2010 3:31:52 PM

RM3sh wrote:
> ...
> Here where i am
> 
> * I installed tcl/tk as u have instructed and worked properly.
> * I typed my first program in "tkcon.tcl". Ran well.
> 
> Further doubts, don't mind if i am repeating the questions:
> 
> => Now, i have written the same program in a file and saved it as
> "hello.tcl"
> => Where should i save the file. Is there any restriction that file
> have to be saved in a particular location. if not, how do i run a file
> saved in a random location 'For Instance: Desktop'
> FYI:I have saved the "hello.tcl" file in the location "C:\Tcl\bin".
> => And, where should i type the command "tclsh hello.tcl". FYI:I have
> tried typing the "tclsh hello.tcl" command in "tkcon.tcl" windows and
> it throws error.

On windows (which you seem to be using):
	If your program uses Tk, then just double click on the hello.tcl.
	If your program just uses Tcl, then type: tclsh hello.tcl

Note -- in the second case you can give a full path name to the hello.tcl file.

-- 
+------------------------------------------------------------------------+
| Gerald W. Lester                                                       |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
0
Reply Gerald 1/7/2010 3:49:28 PM

On Jan 6, 12:51=A0am, RM3sh <ramesh1...@gmail.com> wrote:
> Hi Group,
>
> I hope i am in the right place
>
> i only have 0/10 knowledge in tcl/tk
>
> Questions:
> #. am i on the right place (group) ? if, yes

This newsgroup is indeed the place to ask questions and read more
about the Tool Command Language (Tcl) as well as Tk and other Tcl
related packages, libraries, programs.


> #. where do i write my 'Hello world' program?

Tcl expects its programs in one of two ways - plain text files or
interactively at the console. There are a variety of editors that have
been written that have some ideas about the Tcl language - check out
http://wiki.tcl.tk/1184 , where a number of them are mentioned. There
are likely others not yet listed there...

> #. how should i write my 'Hello world' program?

Many people just start a tclsh or wish interpreter and type in the
lines. Others like to locate a tutorial http://wiki.tcl.tk/17557 or
even an interactive tutorial like http://wiki.tcl.tk/1681 .

> #. is there any other thing i should know/study about tcl/tk?

You should know about three additional invaluable resources:
http://www.tcl.tk/ - a small web site with various pointers to other
useful resources

http://wiki.tcl.tk/ - an site dedicated to all sorts of Tcl related
topics

http://wiki.tcl.tk/2221 - a page that discusses the Tcl IRC channels,
where you can find tcl developers available in "real time"
discussions. No guarantee _what_ they will be discussing... but
frequently one can ask questions there and get pointers to useful
information.
0
Reply Larry 1/12/2010 5:26:20 PM

On Jan 7, 1:08=A0am, RM3sh <ramesh1...@gmail.com> wrote:

> =3D> Now, i have written the same program in a file and saved it as
> "hello.tcl"
> =3D> Where should i save the file. Is there any restriction that file
> have to be saved in a particular location. if not, how do i run a file
> saved in a random location 'For Instance: Desktop'

While you can save the file any place, in general, I recommend 2
things to consider.

1. paths which contain spaces in the folder name can, at times,
present challenges. I myself often avoid paths with spaces in them for
that very reason.

2. saving files to paths which are specific to a particular piece of
software can, at times, lead to forgetting, or even losing, the files
if you were to, for instance, uninstall the software before installing
a new version, etc.

I find it best to establish a path of my own, in a way that it will be
guaranteed to be backed up, noticed when moving to a new computer,
etc.



> FYI:I have saved the "hello.tcl" file in the location "C:\Tcl\bin".
> =3D> And, where should i type the command "tclsh hello.tcl". FYI:I have
> tried typing the "tclsh hello.tcl" command in "tkcon.tcl" windows and
> it throws error.

Generally there is a "path" environment variable, which tells Windows
where to look when you are running things.
If that variable doesn't contain the folder path where tclsh is
installed, then you would get a "tclsh not found" type error.

On the other hand, if your tclsh is really installed as tclsh86.exe
(or maybe wish858.exe, etc.) then you need to find the name that was
installed and use that.


>
> ill disturb u guys later ;)
>

I never figure it a disturbance when it is someone making an effort at
learning.
0
Reply Larry 1/12/2010 5:32:57 PM

11 Replies
438 Views

(page loaded in 0.163 seconds)

Similiar Articles:


















7/23/2012 7:39:25 AM


Reply: