HP Forums
pyilper and logging of printer files: where are they? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: pyilper and logging of printer files: where are they? (/thread-17618.html)



pyilper and logging of printer files: where are they? - floppy - 10-24-2021 03:45 PM

Hello,
according pyilper description in https://github.com/bug400/pyilper
"The output of the scope or the virtual printer(s) is logged to file(s)"
Where are these files? I cannot find.


RE: pyilper and logging of printer files: where are they? - Sylvain Cote - 10-24-2021 03:52 PM

In pyILPER application, select menu File then pyILPER configuration.
In pyILPER configuration dialog box look at the Directory field under Working directory.
The files should be in the specified directory.


RE: pyilper and logging of printer files: where are they? - floppy - 10-25-2021 10:23 AM

Thanks.
Found it and modified it.
Weird things I experienced (and the solution which work for me on Debian64bits):
a) when a Terminal1 is with "Device enabled" clicked, the Printer1 area "Device enabled", "Log Printer1" is not working despite both are clicked. This is not what I was expecting. Clicking and changing status of "Device enabled" and "log xx" in the same session seems not making it
b) .. you want to log the printer1 output? deactivate the "Terminal1" "Device enabled", and activate the "Printer1" "Log Printer1" &"Device enabled". Then go from pyilper and V41 out. Then start freshly pyilper and V41 (dont change the setup you made in the previous session). Printer logging works.
Looks like the printer1.log file is created at start of pyilper when the boxes are clicked; it means there is no dynamic setup (for the printer1 log file) which can be modified when pyilper was already started.
The number of lines which will be written into printer1.log is limited, too (to few 100).
Dont know if it is only a behaviour in Linux/Anaconda. I did not check in Win10.
Another ToDo on my list: check the pyilper python code and submit requests for improvements in github
a) larger number of lines in printer1.log
b) creation of printer1.log file, or appending to the existing printer1.log file, when the box "Device enabled" and "Log Printer1" clicked and (trigger of it) any input is identified.


RE: pyilper and logging of printer files: where are they? - jsi - 10-26-2021 04:50 PM

From the pyILPER manual:
Device enabled checkbox: If checked, the virtual HP-IL generic printer is available and can be used as HP-IL device. The HP-IL loop must always be reconfigured after activation or deactivation.

Enabling or disabling devices in pyILPER is like adding or removing devices from a HP-IL loop which needs a reconfiguration of the HP-IL controller. Otherwise a new device will not be accessible. To reconfigure the loop switch the HP-41 off and on.

From the pyILPER manual:
Log Printer checkbox: Activates writing printer output to the file Devicename.log in the pyILPER working directory. Output is always appended to that file. A time stamp in the file marks the start and the end of each logging. The log file is closed automatically on program termination.

Log buffering (in the Configuration menu): enable or disable buffering of the log file. If log buffering is off the log file output is flushed to disk after an end of line was encountered. This enables watching the log file output but may decrease the execution speed of pyILPER considerably.


There is no number of lines limit for log files. Please mind that log buffering is enabled by default. In this case the log file is flushed if the file is closed (pyILPER termination or Log Printer checkbox unchecked) or the OS file buffer is full.

Regards
Joachim


RE: pyilper and logging of printer files: where are they? - floppy - 10-26-2021 05:48 PM

Thanks.
In my configuration, I confirm, a close of Emulator V41 and pyILPER then re-starting was necessary. On/Off of the emulator was not enough. Thats fine for me. I just know it.
I increased an higher number of logging (10k) in the "configutation" in "Printer1". Perhaps that was the reason why the terminal outputs were not ALL logged into printer1.log
Result in 2-3h ;-) (with turbo mode in V41).

(update: "ALL")


RE: pyilper and logging of printer files: where are they? - J-F Garnier - 10-26-2021 06:04 PM

(10-26-2021 04:50 PM)jsi Wrote:  From the pyILPER manual:
Device enabled checkbox: If checked, the virtual HP-IL generic printer is available and can be used as HP-IL device. The HP-IL loop must always be reconfigured after activation or deactivation.

Enabling or disabling devices in pyILPER is like adding or removing devices from a HP-IL loop which needs a reconfiguration of the HP-IL controller. Otherwise a new device will not be accessible. To reconfigure the loop switch the HP-41 off and on.

With the (real) HP-41, a calculator off/on is usually not needed, since the 41 reconfigures the loop at each operation (except with advanced modes of the X-I/O module). This can be checked with the scope display (AAU, AAD 1 sequence). This was designed in this way intentionally to make the HP41 HP-IL works mostly automatically without user actions, at the expense of redundant HP-IL traffic.
With the HP-71B, yes an off/on cycle or a RESTORE IO is needed.

J-F
[Edited: be sure to be in AUTOIO - this is the default mode]


RE: pyilper and logging of printer files: where are they? - rprosperi - 10-26-2021 09:04 PM

(10-26-2021 06:04 PM)J-F Garnier Wrote:  
(10-26-2021 04:50 PM)jsi Wrote:  From the pyILPER manual:
Device enabled checkbox: If checked, the virtual HP-IL generic printer is available and can be used as HP-IL device. The HP-IL loop must always be reconfigured after activation or deactivation.

Enabling or disabling devices in pyILPER is like adding or removing devices from a HP-IL loop which needs a reconfiguration of the HP-IL controller. Otherwise a new device will not be accessible. To reconfigure the loop switch the HP-41 off and on.

With the (real) HP-41, a calculator off/on is usually not needed, since the 41 reconfigures the loop at each operation (except with advanced modes of the X-I/O module). This can be checked with the scope display (AAU, AAD 1 sequence). This was designed in this way intentionally to make the HP41 HP-IL works mostly automatically without user actions, at the expense of redundant HP-IL traffic.
With the HP-71B, yes an off/on cycle or a RESTORE IO is needed.

J-F
[Edited: be sure to be in AUTOIO - this is the default mode]

Thanks for this note of clarification and rationale J-F. I've wondered for years why the 41 seemed more 'robust' about loop changes, I did not realize it configured at the start of every transaction. Although easy to criticize this approach (for the overhead cost) it makes sense to me that calculator users are less likely to be sensitive to such nuances and more likely to simply hook things up and pull data.

I keep learning.... thanks!


RE: pyilper and logging of printer files: where are they? - floppy - 10-27-2021 06:28 AM

Printer1.log stopped logging with 4173 lines.
It should have been 4538 lines in total.
All 4538 lines are in the Printer1 screen area of pyilper.
So, no informations were lost for me.
Configuration:
- V41R9F emulator started with wine in gnome desktop
- pyilper in anaconda/Debian 64bits