Site Sponsors:
Linux: Fixing Cura Installation Mishaps 
If you are one of us who likes to install several things at a time using "sudo bash," then from time to time you might be tempted to run what you have installed as "root."

When upgrading to the most recent version of FreeCAD & Cura, I recently made such a mistake.

In as much as I was running as 'root' - and in as much as Cura decided on creating my ./usr/local files in my login-account's home folder, the problem was that I could not access the same when running under my default account.

When NOT running as 'root,' not only did I have to perpetually re-define my 3D printer defaults, but from time to time Cura itself would simply stop responding ("hang") whilst attempting to do so.

Ignoring the temptation to simply re-boot, I had no choice but to `ps -al`, then kill it.


Rather than removing & re-installing everything, the solution - obviously - was to simply change access to the Cura file set. For the uninitiated, we must note that changing permissions is merely a matter of using `chown` and `chgrp` on the above rooted-folder set.

Of course, one could also just blow it all away, then simply run Cura once again from your default account login:

--Sharing is caring!


p.s: If you are looking for a PPA designed to allow us to use Cura under Ubuntu, then click here.

For a nice overview of how to install Cura on Ubuntu, you can click here.

Finally, in as much a links tend to come and go, here is my update to what the above link tells us to do:

sudo rm -rf ~/.config/cura/*
sudo rm -rf ~/.local/cura/*
rm -rf ~/.config/cura/*
rm -rf ~/.local/cura/*
sudo add-apt-repository ppa:thopiekar/cura
sudo apt-get update
sudo apt install cura cura-plugins-all cura-extra-plugins-all

Note: When using your own login, using the 'sudo' command (as shown above) will keep us from accidentally running Cura - or anything else - as 'root.'

[ view entry ] ( 841 views )   |  permalink  |  related link
Python By Requirement 
Hi guys!

Today I wanted everyone to know that our new book "Python 1000, By Requirement" - or simply "Python by Requirement" - is now available on Amazon.

No matter what we call it however, note that the book includes a coupon. The coupon allows anyone to view our Python 1000 videos for free!

Better still, if you are part of Amazon's "Kindle Club" (kindle unlimited) then you & yours can get the book, the videos, the starter & solutions files (etc.) for 'nada, as well.

Interested parties can click here to see what the book is all about.

Finally, many like to note that a world-famous author once noted that "education is not the filling of a pail, but the lighting of a fire." Surely this also means that learning must also be a journey... not a destination?

Enjoy the Journey!

[ view entry ] ( 712 views )   |  permalink  |  related link
Python - Color Console with Cursor Support 
For those who would like to create an enhanced menu system ... or perhaps your first console game ... here is a re-write for what I posted this morning:

class Cursor:

def goto(xpos, ypos):
if xpos < 1:
xpos = 1
if ypos < 1:
ypos = 1
print(u'\u001b[{};{}H'.format(ypos, xpos), end='')

def on():
print(u'\u001b[?25h', end='')

def off():
print(u'\u001b[?25l', end='')

class Console:
color = {
'black': 30,
'red': 31,
'green': 32,
'yellow': 33,
'blue': 34,
'magenta': 35,
'cyan': 36,
'white': 37,
# 'extended': 38,
'default': 39

scheme = {
"fore":0, # FOREGROUND
"back":10, # BACKGROUND
"bfore":60, # BRIGHT FORE
"bback": 70 # BRIGHT BACK

def _esc(zint, zmode):
print(u"\u001b[{}{}".format(zint, zmode), end='')

def cls():
Console._esc('1', 'J')
for line in range(100):

def get_colors():
return sorted(Console.color.keys())

def get_schemes():
return sorted(Console.scheme.keys())

def set_color(color, scheme='fore'):
if scheme in Console.scheme:
if color in Console.color:
Console._esc(Console.color[color] + Console.scheme[scheme], 'm')
Console._esc(Console.color['default'], 'm')

def set_colors(fore, back, cfore='fore', cback='back'):
if fore in Console.color and back in Console.color:
if cfore in Console.scheme and cback in Console.scheme:
Console._esc(Console.color[fore] + Console.scheme[cfore], 'm')
Console._esc(Console.color[back] + Console.scheme[cback], 'm')

def has_color():
import os
if is 'posix':
return True
if is 'nt':
import platform
ver = platform.version()
if ver is None or len(ver) is 0:
return False
ver = ver.split('.')
if ver[0] == '10':
return True
return False

if __name__ == "__main__":
if Console.has_color() is False:
print("Sorry, at the moment only POSIX has default VT100 / ANSI support.")
print("Some version of Windows use ANSY.SYS / VT100.sys. 'Google it.")

print("1.) Cursor Test")
Console.set_colors('yellow', 'blue')
y = 0
for x in range(1, 20, 2):
y += 2
Cursor.goto(x, y)
print("(", x, y, ")", end='')

input("Press enter for next test ...")

Console.set_colors('blue', 'white')
print("2.) Color Test")
input("Press enter for test ...")
print(Console.set_color("color"), "unknown?")

for color in Console.get_colors():
Console.set_color(color); print(color, end="...")
Console.set_color(color, 'bfore'); print("bright fore", color, end="...")
Console.set_color(color, 'bback'); print("bright back", color, end="...")
Console.set_color('default', 'back')


Console.set_color("green", 'bback')
print("(5,5)", end='')
print("*** TESTING SUCCESS ***")

Unfortunately, the price of adding cursor management pretty much prohibits test case review (above) under any (?) modern IDE.

Be prepared to use bash on Windows (cygwin) or on POSIX.

--Sharing is caring!


p.s. If you are looking for a reasonable, POSIX way to get mouse movements, function keys, and other device events, then check out the low-level information at --Most can be made to work on WinDOS under Cygwin, as well!

Google Keywords: Free Source Code Public Domain Roguelike Console Terminal TTY DOS Prompt

[ view entry ] ( 787 views )   |  permalink  |  related link

<<First <Back | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Next> Last>>