Skip to content
Advertisement

Tag: python

Write magnetic tape end of record linux

Task is create two record with different sizes within one file entry. I’m using python 3.4.5 for testing: Is there an ioctl opt code that will initiate a new record on the tape with variable record length. Or any other way to work around this bug? Answer Issue was with tcopy, it uses block size on device instead of detecting

SFTP via Paramiko to ipv6 linux machine

I am relatively new to python and am trying sftp for the first time via python script. I want my python script to get a file from a Dual Stack Machine (Both IPv4 and IPv6 present). Below is the code snippet I am using for Paramiko: When I use the code with IPv4 it works fine. But when I replace

How to cross-platform compile on windows for linux using gcc?

My aim is to create cross-platform C++ python modules. I’m usingCyther (cross-platform The Cross-Platform Cython/Python Compiler). Cyther uses GCC to compile modules and gives the user the ability to add GCC command-line args. So, I need run compiler on Windows, but compile for Linux. What args I must pass to GCC to compile a module for Linux (or other platform)?

Binding callbacks to minimize and maximize events in Toplevel windows

I’ve read through related answers and it seems that the accepted way to do this is by binding callbacks to <Map> and <Unmap> events in the Toplevel widget. I’ve tried the following but to no effect: I’m running python 2.7 on Linux. Could this be related to window manager code in different operating systems? Calling tk.iconify() before tk.mainloop() has no

Exposing python jupyter on LAN

I’ve installed jupyter on local network LAN but im unable to access http://<IP>:8888 from another macine on LAN. I’ve opened ports 8888 and port range 49152 to 65535 with iptables (this range is specified at http://jupyter-notebook.readthedocs.io/en/latest/public_server.html) This guide http://jupyter-notebook.readthedocs.io/en/latest/public_server.html describes exposing a notebook publicly but I’m just attempting to share over LAN. Have I missed a step ? Answer Try

Saving a Video in OpenCV (Linux, Python)

There is an example that works on Windows (original): In Linux program provides: AttributeError: ‘module’ object has no attribute ‘VideoWriter_fourcc’ Help make it work in Linux. Answer I didn’t try but this should work :

Quick remote logging system?

I want to be about to quickly insert some logging into some testing using either (Linux) command line or Python. I don’t want to do anything system wide (e.g. re-configuring syslogd). I’ve done something like this before by doing: wget URL/logme?im=module_name&msg=hello_world And then just parsing the server log file. It’s a bit hackish and you have to URL encode all

Advertisement