The distinction, sometimes known as Ousterhout's Dichotomy, was described at length in this 1998 article by the author of the Tcl scripting language.
While he's got a point, many of the aspects he used to describe scripting languages have now been adopted by systems programming languages, and some of them were always a bit fuzzy. This is another one of those areas where it's easy to get bogged down in vague terminology and start huge arguments over how particular languages ought to be classified.
I think it's better to just talk directly about the properties of languages you're interested in rather than creating vague categories that are hard to make really distinct lines between and trying to make the weird menagerie of programming languages fit neatly into them.
Could go for Tcl, which is an... interesting... command-oriented programming language. You should be able to use it separately from its libraries, and could potentially use it for some types of scripts (it'd be perfect for dialog/quest definitions, for example).
My standard disclaimer: I'm not currently at a computer with tcl installed, so any example I type is done "blind".
Look at the manual page for format (http://www.tcl.tk/man/tcl8.6/TclCmd/format.htm) under "Optional Size Modifier".
Since you provided neither an l, nor an h, the integer value was truncated to the same range as int(), which could easily be 32 bits.
If you don't want any truncation, try %015lld
If you need it to behave specifically as wide(), do %015ld instead
>I first call a then c, I was assuming the upvar command would look up and get the b value but it doesn't. Why is this the case.
Because "upvar 1" does indeed only look up one level and if that level is the global namespace (and "set b" is defined only inside proc "a") then the upvar will not see "b".
>Another case when I call c from within a
Exact same answer, "upvar 1" only looks up 1 level, in this case that level is the body of proc "a" where "b" is indeed defined.
You should read the official documentation for upvar, it is very informative: http://www.tcl.tk/man/tcl8.6/TclCmd/upvar.htm
Also there is no reason to use "echo" in Tcl, you should use "puts" instead which is the native Tcl command.
First you must know that Tkinter is not using just Python, there is a tcl/tk language interpreter running in the background. Most of Tkinter methods get passed on to the interpreter.
The after
method first checks if a function was passed as a parameter. If not it passes 'after' and the milliseconds to the interpreter. If a function was passed then it creates a new function that will call that passed function and it registers the new function which creates a tcl/tk script that calls that new function. And then it passes 'after', milliseconds, and the tcl/tk script to the interpreter.
Here is a link to the tcl/tk 'after' command:
Wow, nice offer. I was just working up to asking if you had plans to open source any of your components, or perhaps just blog about the dev experience. I'd be interested to hear about it, as I'm sure would many others.
Come to think of it, a quick session at Eindhoven or Texas would go over well, if either is convenient for you to travel.
Here's a list of tk events. The Map
or Expose
events might do what you want. Otherwise, you could alternatively modify the dropdown as soon as the user changes the original widgets.
TIP 352 [1] is the Tcl Style Guide. Refer to it.
As far as I know, Tcllib has a set of tools called doctools [2], though I have never tried it.
[1] http://www.tcl.tk/cgi-bin/tct/tip/352.html
[2] http://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/doctools/doctools.html
I don't think it can be done this way - the original Tk command upon which tkinter.filedialog
is based is called tk_getOpenFile
. The documentation for that command lists how file types are defined, and the only things you can use are either:
You'd have to code up a custom widget to do that - the glob
module ought to help you match filenames against a wildcard, if you decide to go this route.
This should work if Cisco's implementation of Tcl 8.3 supports the interp and source commands (which it should):
proc exec_tcl {file args} { set interp [interp create] $interp eval set argv [list $args] $interp eval source $file }
exec_tcl file2.tcl args
If that doesn't help or you have other Tcl related questions, you can try posting in /r/Tcl.
Ooooh, that's a whole different issue then.
Most likely, you have incompatible binaries for Python3 and TCL/Tk (the graphics library that tkinter wraps).
A quick word of warning: something went wrong that got you in to this place and whatever it was might still be a problem, so I can only help you so much without knowing what happened.
Step 1 is to re-install TCL/Tk... http://www.tcl.tk
Step 2 (if step 1 didn't fix it) is to re-install Python 3.
Make sure, whenever able, to pick the same kind of binary for both programs. 64bit or 32bit.
Then it looks like a bug or a hard dependency for a certain version of tcl. I bet the author of that R pkg hardcoded in that tcltk Lib's filename at some point. It may actually be necessary to use that version, but maybe not. This is a dirty hack, but try making a copy of your library with that second filename, or if you want to track down the 8.6 lib and install it, that could work too.
Edit: that would Probably not be a working hack but tcl tk is an old GUI toolkit / language, like Qt or GTK
Er... http://www.tcl.tk
Scripting in eggdrop is in Tcl. Events are bound using bind:
bind pub - !test myproc
proc myproc {nick host handle chan text} { putserv "PRIVMSG $chan :Hello world" }
http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html
putserv sends a raw IRC command. Google IRC RFC for the standard, but essentially all you probably need to know is:
Message syntax: "COMMAND TARGET :TEXT"
PRIVMSG sends a normal message (channel or private), a CTCP request is also a PRIVMSG but the text is surrounded by ascii character 1; the command is the first word.
NOTICE sends a notice, and also doubles as CTCP response if the text is wrapped in ascii character 1.
Eggdrop has its own command for setting channel modes:
pushmode CHANNEL MODE NICKNAME
(nickname only if required)
If you're not trying to make well-designed UIs that feel at home in GNOME Shell, OS X, Metro, etc, then Tcl/Tk is definitely the way to go.
Can do a script like
package require Tk # set up command procs set pd [list ...]; # make this your list of items tk_optionMenu .pulldown {*}$pd button .test1 -text "Run Test 1" -command test1 button .test2 -text "Run Test 2" -command test2 entry .dir -textvariable dir entry .fname -textvariable fame button .quit -text "Quit" -command exit
pack .pulldown pack .test1 pack .dir pack .fname pack .test2 pack .quit
pack
as well as grid
and place
are how you put widgets in the window. I recommend reading up on the docs and there are plenty of examples online. This example isn't meant to be instructive on Tcl/Tk, but to show you how little code is necessary to accomplish the UI you've described, and can be shorter still, as the pack
and widget creation lines need not be separate, e.g.
pack [button .quit -text "Quit" -command exit]
Windows, Ubuntu, and OS-X for development and Redhat for deployment under mod_wsgi. But I was trying this on Windows.
On Ubuntu:
which source man source
shows nothing.
Is it a tcl command? e.g
http://www.tcl.tk/man/tcl8.4/TclCmd/source.htm
Edit: on Redhat:
man source
shows "BASH_BUILTINS(1) / NAME bash, :, ." > source filename [arguments] > Read and execute commands from filename in the current shell environment and return the exit status of the last command executed from filename.
so apparently it would mean the same as:
./www/sentry/bin/activate
Only on Windows, there's no bin directory. There's a Scripts directory so you would probably do:
\www\sentry\Scripts\activate.bat
Tcl's "clock scan" is a pragmatic approach to parsing dates and times. BSD-licensed C code exists for the library. Interested parties could attempt to port it to go.
Edit reason: Further elaboration.