Abridged summary of comp.lang.tcl@googlegroups.com - 34 updates in 6 topics

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Abridged summary of comp.lang.tcl@googlegroups.com - 34 updates in 6 topics

comp.lang.tcl mailing list
Cecil Westerhof <[hidden email]>: Nov 21 10:16PM +0100

> 2) It will automatically see if a command that is not a Tcl command is a
> valid program to run, if so, it runs it and returns the result. (This
> is what is happening for the two cases you site) ...more
Rich <[hidden email]>: Nov 21 10:46PM

>> is what is happening for the two cases you site)
 
> Aah, I understand. I would not have chosen this, but I understand the
> reasoning. Need to be careful then. ;-)
 
Well, it is what it is and ...more
"Donal K. Fellows" <[hidden email]>: Nov 22 07:16PM

On 21/11/2017 22:46, Rich wrote:
 
> Of course, you also lose the automatic printing of results from
> commands that is very useful in the REPL, so setting it false is
> likely to make using the ...more
keithv <[hidden email]>: Nov 22 11:38AM -0800

On Tuesday, November 21, 2017 at 2:46:28 PM UTC-8, Rich wrote:
 
> Of course, you also lose the automatic printing of results from
> commands that is very useful in the REPL, so setting it false is ...more
Cecil Westerhof <[hidden email]>: Nov 21 10:41PM +0100

> }
> return $answer
> }
 
There was missing a ']'. I changed it to (I also only want the
temperature):
proc getCPUTemp {} {
if {1 != [regexp -all -line ^CPUTIN:.*$ [exec ...more
Rich <[hidden email]>: Nov 21 10:42PM

>> return $answer
>> }
 
> There was missing a ']'.
 
Indeed. The danger of copy/pasting from a tclsh to usenet.... :)
 
> }
> return [lindex [regexp -all -inline {\S+} ...more
Andreas Leitgeb <[hidden email]>: Nov 22 05:06PM

> array = [elem for elem in output if 'CPUTIN' in elem]
 
Fwiw, running "sensors" on my Ubuntu 16.04 laptop does not seem
to have any line with "CPUTIN" (and no "CTRUMP", either, scnr)
...more
Gerald Lester <[hidden email]>: Nov 22 01:15PM -0600

On 11/22/2017 11:06 AM, Andreas Leitgeb wrote:
 
> Maybe your script is only meant for certain hardware that does
> have such an entry, just don't assume that it would be so on all ...more
Busirane <[hidden email]>: Nov 21 12:31PM -0800

I find myself wondering how to tell if a given path crosses to a different filesystem, i.e., another filesystem mounted on the local filesystem.
 
Under Windows I can detect when a path is on another ...more
Matthew Hiles <[hidden email]>: Nov 21 12:35PM -0800

On Tuesday, November 21, 2017 at 3:31:09 PM UTC-5, Busirane wrote:
> I find myself wondering how to tell if a given path crosses to a different filesystem, i.e., another filesystem mounted on the ...more
Rich <[hidden email]>: Nov 21 09:35PM

> ...
> I checked file and fileutil but didn't find anything that seemed
> applicable.
 
Use "file stat"
 
Check for changes in the "dev" key's value.
 
Files on a different file systems will ...more
Ralf Fassel <[hidden email]>: Nov 22 11:12AM +0100

* Rich <[hidden email]>
| Busirane <[hidden email]> wrote:
| > I find myself wondering how to tell if a given path crosses to a
| > different filesystem, i.e., another filesystem ...more
Busirane <[hidden email]>: Nov 22 11:08AM -0800

On Tuesday, November 21, 2017 at 4:35:18 PM UTC-5, Rich wrote:
> Use "file stat"
 
> Check for changes in the "dev" key's value.
 
Thanks, Rich! This is the approach I will use.
...more
Busirane <[hidden email]>: Nov 22 11:10AM -0800

On Tuesday, November 21, 2017 at 3:35:14 PM UTC-5, Matthew Hiles wrote:
> I think your best bet will be tclx's fstat.
 
Thanks, Matthew. This *is* an option, because Tclx is available in the KBS ...more
Cecil Westerhof <[hidden email]>: Nov 21 10:52PM +0100

At the moment I have the following program to monitor the temperature
of my CPU:
#!/usr/bin/env wish
 
 
proc getCPUTemp {} {
if {1 != [regexp -all -line "^CPUTIN: .*$" [exec ...more
Gerald Lester <[hidden email]>: Nov 21 04:18PM -0600

On 11/21/2017 03:52 PM, Cecil Westerhof wrote:
> part, but for that I first have to learn it.)
 
> Is this the way to go, or is it possible that wish does not have
> implemented certain things?
...more
Rich <[hidden email]>: Nov 21 10:51PM

> part, but for that I first have to learn it.)
 
> Is this the way to go, or is it possible that wish does not have
> implemented certain things?
 
As Gerald indicated, if you want a combination ...more
Cecil Westerhof <[hidden email]>: Nov 22 12:21AM +0100

> MacOS essentially *always* have a windowing system running, the state
> of "no windowing system" available at all is typically only seen on
> Linux/Unix systems).
 
Not completely true. ...more
Rich <[hidden email]>: Nov 21 11:53PM

>> Linux/Unix systems).
 
> Not completely true. The script crashes on the:
> package require Tk
 
If there's no windowing environment, yes, that is the expected outcome.
And, technically, the ...more
Robert Heller <[hidden email]>: Nov 21 07:28PM -0600

> part, but for that I first have to learn it.)
 
> Is this the way to go, or is it possible that wish does not have
> implemented certain things?
 
If you want the CLI version to be a *pure* CLI ...more
Robert Heller <[hidden email]>: Nov 21 07:28PM -0600

> > Linux/Unix systems).
 
> Not completely true. The script crashes on the:
> package require Tk
 
The "package require Tk" will crash (just as wish will crash) is there is "no ...more
Cecil Westerhof <[hidden email]>: Nov 22 05:35AM +0100


> The "package require Tk" will crash (just as wish will crash) is there is "no
> windowing system" -- typically on a Linux/Unix system in a non-GUI
> environment, like a cron job or slogin ...more
Cecil Westerhof <[hidden email]>: Nov 22 05:28AM +0100


> While a single CLI option is easy enough to code, you might consider
> the 'cmdline' package in Tcllib for more complicated CLI option
> handling.
 
I will look into that. Thanks.
 
-- ...more
Gerald Lester <[hidden email]>: Nov 22 12:12AM -0600

On 11/21/2017 10:35 PM, Cecil Westerhof wrote:
> - Windows always has a windowing system?
> - With unix/linux I only have to check for the DISPLAY environment
> variable?
 
Windows and Mac ...more
Christian Gollwitzer <[hidden email]>: Nov 22 07:21AM +0100

Am 22.11.17 um 05:35 schrieb Cecil Westerhof:
> - Windows always has a windowing system?
> - With unix/linux I only have to check for the DISPLAY environment
> variable?
 
So the request is to ...more
Rich <[hidden email]>: Nov 22 06:32AM

> - Windows always has a windowing system?
> - With unix/linux I only have to check for the DISPLAY environment
> variable?
 
Actually, "package require Tk" does not "crash", it returns an error ...more
Ralf Fassel <[hidden email]>: Nov 22 11:19AM +0100

* Cecil Westerhof <[hidden email]>
| When I get the option to start with GUI it would be nice to check for
| a windowing system. In this case it is only for Linux, so it is
| ‘simple’. ...more
Robert Heller <[hidden email]>: Nov 22 06:44AM -0600

> } else {
> # Tk is loaded
> }
 
Yes. This is probably the best option. All cases are handled in a
cross-platform / all-platform way.
 
 
--
Robert Heller -- 978-544-6933 ...more
Robert Heller <[hidden email]>: Nov 22 06:44AM -0600

> a windowing system. In this case it is only for Linux, so it is
> ‘simple’. But for if I make a more complex variant:
> - Windows always has a windowing system?
 
Yes.
 
> - With unix/linux ...more
Robert Heller <[hidden email]>: Nov 22 06:44AM -0600

> > - With unix/linux I only have to check for the DISPLAY environment
> > variable?
 
> Windows and Mac (OS/x) always have a windowing system.
 
*Technically* Mac (OS/x) is a flavor of UNIX and ...more
Hypnotoad <[hidden email]>: Nov 21 02:04PM -0800


> > https://github.com/flightaware/Tcl-bounties#a-first-class-high-performance-non-hackish-way-to-do-named-parameters
 
> I was being considerate...
> Wonder if any one has taken the time to speak ...more
[hidden email]: Nov 21 04:58PM -0800

On Tuesday, November 21, 2017 at 5:04:21 PM UTC-5, Hypnotoad wrote:
 
> The other alternative to Tip 479 revolve around changing proc itself to accept additional arguments, tk like options, and a ...more
rene <[hidden email]>: Nov 21 11:32PM -0800

> seemingly not consistent with his overarching goal of it being a natural
> extension, which in my mind would be an extension to the current form of
> "proc"; not a @anything or a "procx", "y" or ...more
Cecil Westerhof <[hidden email]>: Nov 21 10:11PM +0100

>> 2015, but there where some other problems with it also. So maybe I
>> should not use tutorials from TutorialsPoint.
 
> I'd recommend: https://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html
...more
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to [hidden email].