Entries categorized as ‘Linux Programming’
I stumbled across this simple UI, Python-newt. Newt which is common to many non-graphic installs on various Linux flavors. Newt is a simplistic UI that lets a programmer specify entry fields, radio buttons, ok/cancel buttons. You name it…

The Python extension is called Snack. Read more on support here. Two examples come with the docs, showing how easy it is to assemble UI entry request pages/forms.
Categories: Linux · Linux Programming · Open Source · Programming · Python
I came across this site, Show Me Do. I must say I am quite impressed. There are a ton of instructional videos or screen-casts on the website, a lot of which cover topics I am very interested in, Python!
The first one I noticed had a kid who was showing how he used a programming environment called Rur-Ple to write and execute his very own program. That is great to see young kids very interested in tools like these. I remember when I was a kid and wrote BASIC program and saved them to a cassette tape. It seemed to take forever to write or read too the tape.
As I began pouring over the videos, I noted some were introductions into Python, IPython, or PyDB. While I use these tools, I am always willing to learn a new trick here or there that I haven’t uncovered yet.
So here is my assessment of the videos I watched, and following a list of videos I haven’t watched yet.
(more…)
Categories: Linux Programming · Python
Tagged: ipython, screen cast
I was working on a website, and quite often I open shells (I use Konsole), often leveraging the tabs Konsole has built in. But I sometimes hate having to switch tabs to see something, compare, reference etc.
My best solution was to keep Konsole windows separate. In Django I would run a konsole window on my top LCD display to display the running application (you know the ./manage.py runserver). While in a konsole window on my laptop display I would run yet another Konsole window to write code, etc.
I often use screen, but similar to tabs with Konsole, I get tired switching screens. Well there are the multiple windows in screen you can set up with a few simple keystrokes, something which I even blogged about previously. Yeah, I know its a cheap shot to link to your own blog! But I assure you, I could care less about how many visitors I get. 
My latest problem with screen has been … on my laptop I reboot often. In fact, I like the idea of being able to shut down, take my laptop with me and pop it back up in a coffee shop, at my skydiving dropzone or even the library. What happens when I reboot? Screen settings are lost, and I have to reset everything back up once I turn the “machine” back on. (more…)
Categories: Linux · Linux Programming · django
I like the Django web framework. No really, I do! But I wish the maintainers handled getting out their strong beliefs a little bit better.
I rolled some code to a production web server. The website itself was not yet in production (it was a beta version awaiting sign off by the customer), but I had turned off the debugging stuff in the settings.py file.
The problem that existed is in my settings.py file I had:
DEBUG = False
If you set this global variable (setting) off, and you do not have a 404.html or 500.html in one of your template paths, a server error (500) is thrown. Great…try debugging that one, it wasn’t easy…honest.
Google found it with these keywords: DEBUG flatpages
Which returned Ticket #3335 (Flatpages with DEBUG = False requires 404.html)
Good design practice to follow? Yes!
Better way to stress the message of why you should create your own 404 and 500? Absolutely!!
Categories: Linux · Linux Programming · Programming · Python · django
UbuntuStudio opened up in May of this year.
What is it?
It looks like a version of Ubuntu customized to enable editing of video, audio and photography. Download, burn the CD and install. You have a capable edit suite.
Very nice!
Take a look for yourself.
Some other ideas I have had of flavors of Ubuntu would be programming on Linux with some of the common languages. I’m talking IDE’s, debuggers, the latest libraries all updated with a simple interface. Someone who wishes to learn C, Python or Ruby can skip the installs, library dependencies and follow a helpful tutorial to jump on board Linux.
Categories: Linux · Linux Programming · Ubuntu
This is one of those days where I had to look up something I knew to make sleep better tonight. Maybe the brain cell that stored this information is acting flaky or I expelled it one night at the bar. In any case it was time to review that tricky __init__.py along with Python modules and packages.
(more…)
Categories: Linux · Linux Programming · Programming · Python
Qt-Apps.org and Qt-Prop.org was launched back in April. I’ve always been a fan of QT development since I wrote my first QT application for the iPAQ using QTEmbedded.
Categories: Linux · Linux Programming · Open Source · Programming
This ended up resolving a bug for on Satchmo, but I hadn’t been aware of it prior to this.
In Django you can allow one template to inherit another one, keeping the original content and appending new content in the child template (or sub-template).
{% block sidebar %}
{{ block.super }}
… new content …
{% endblock %}
Read more about template inheritance in Django here.
Categories: Linux · Linux Programming · Programming · Python · django
If you use grep like me to find or navigate around source code that you recently grabbed via Subversion, you may find this useful:
Put this in your .bashrc file:
export GREP_OPTIONS=”–exclude=*.svn*”
Then when you run grep in a subversion tree…it will exclude all of the .svn directories. Or if you don’t wish to make this change permanent, simply use:
GREP_OPTIONS=”–exclude=*.svn*” grep -r <<something to find in files>> *
Categories: Linux · Linux Programming · Programming · Ubuntu
Getting started in Subversion with Python?
Add *.pyc files to your global-ignores. Edit your ~/.subversion/config file, fine the line global-ignores = … Remove the comment preceding the line and add which ever file masks you wish to use.
Running svn add * within a working copy is equivalent to running svn add folder1 fileA fileB; essentially you are telling subversion to add everything. In other words this command IGNORES your global-ignores mentioned in #1 for the current directory, but does not ignore it for subdirectories. In order to ask Subversion to add everything in the current path, including recursive sub-directories but not to ignore global-ignores, use: svn add . –force
Hey I don’t make the rules, I just abide by them. Hope this helps!
Categories: Linux · Linux Programming · Python · Subversion