These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but you may still find them useful.
Norton Ghost Free Trial (15 Days)Here I am answering two questions. Where do I find the free trial for Norton Ghost 10? (The link above). It’s not obvious on their website. And what are the limitations of the free trial? 15 days and it has the disc cloning feature disabled!
How to Make a Screensaver in PythonThis module really works. I put together a screensaver in an hour (well really just a Python wrapper around an existing screen saver so I could get another program launched when the screensaver is called .. long story actually…
Basic anatomy of a Windows screensaverScreensaver executables (.scr files) can run in two modes, the configuration mode and the screensaver mode. The mode is set by a command-line argument of either -c (for configuration) or -s (for screensaver). If there is no argument, the configuration dia
Tags: Extension, Extensions, Firefox, Ghost, Harddrive, Hardware, Keyboard, Knoppix, Linux, Python, Screensaver, Security, Shred, Tag, Title, Tooltips, Win32
Posted by Greg Pinero (Primary Searcher) as Uncategorized at 4:30 AM MST
Comments Off
These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but you may still find them useful.
WordPress mime-config PluginUse this WordPress plugin to get WordPress to allow you to upload fun file types like *.gz, *.py, etc. I haven’t tried it yet though, but people are saying it works. I.e., this should fix the WordPress error:
File type does not meet security guidelines
Table Sorting, Filtering, Etc from JavascriptToolbox.comThis looks like a robust javascript library for sorting tables. It’s much faster than the one I’m using (sortable, next link) however I can’t tell if this is as easy to implement as sortable where I simply include it in the html.
Tags: Ajax, Becky, Blendedtechnologies, Classes, Control, Dhtml, Hook, Html, Input, Javascript, Keyboard, Logging, Mouse, Plugin, Python, Redlightcamera, Rightlightcamera, Sort, Speech_Recognition, Table, Tables, Traffic, Upload, Win32, Wordpress, Work
Posted by Greg Pinero (Primary Searcher) as Uncategorized at 4:30 AM MST
Comments Off
This little script will detect when you hit certain number pad numbers and send the specified function keys on to Windows instead:
import win32com.client
import pythoncom
import pyHook # http://sourceforge.net/projects/uncassist
def translate_keystrokes(event):
if event.Key=='Numpad6': #Next in Screen Saver
print 'You hit numpad 6!'
shell.SendKeys("{F7}")
return False #blocks keystroke
elif event.Key=='Numpad4': #Previous in Screen Saver
print 'You hit numpad 4!'
shell.SendKeys("{F6}")
return False #blocks keystroke
else:
return True #Key stroke continues to Windows apps
#object to let us send keystrokes
shell = win32com.client.Dispatch("WScript.Shell")
# create a hook manager
hm = pyHook.HookManager()
# watch for all keyboard events
hm.KeyDown = translate_keystrokes
# set the hook
hm.HookKeyboard()
# wait forever
pythoncom.PumpMessages()
Why on earth would I want to do this?
Well, this lets me control a screensaver application with a $10 number pad so that the laptop controlling the display can be tucked away out of site. The alternative was to buy this $80 programmable keypad. (If you hadn’t guessed, the screen saver inflexibly requires F6 to move to the next page.)
To make this little script I followed the pyHook examples here. And figured out how to send keystrokes here.
Finally this page gives you a run down on what WScript.Shell does. And this project looks like another promising alternative for sending keystrokes.
Posted by Greg Pinero (Primary Searcher) as GUI Automation, win32, Python at 6:34 PM MST
2 Comments »
The built-in calendar module gives you this useful list:
>>> calendar.mdays
[0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
As an example of using it, here I get the number of days in the current month:
>>> import calendar
>>> import datetime
>>> calendar.mdays[datetime.date.today().month]
31
BTW this would also tell you the last day of a month.
Fine Print:
I’m not sure how this handles leap years. Perhaps mdays is for the current year? In any case, if you want something more robust you could try this:
[0]+[calendar.monthrange(year,month)[1] for year in [2006] for month in range(1,13)]
in place of calendar.mdays since you provide it with the year to use.
Found that idea in the comments here.
Posted by Greg Pinero (Primary Searcher) as Python at 11:57 AM MST
3 Comments »
These are links associated with recent searches I’ve done. They’re not difficult enough to warrant to their own posts but you may still find them useful.
What Product Should I Get?It only has a few product types so far, but it has the potential to save hours of research when trying to buy a large ticket item.
Tags: Blog, Businessidea, Dvdbackup, Dvdshrink, Google, Interesting, K9Copy, Linux, Shopping, Sitemap, Ubuntu
Posted by Greg Pinero (Primary Searcher) as Uncategorized at 1:24 AM MST
Comments Off