This is a simple Python module that stores highscores in an SQLite database in the same folder as the module. It’s far from watertight so tweak it according to your needs. Read source for examples.
Ever wanted to record your Super Mario skills on the Super Nintendo console, without the console? Don’t worry, most of todays computers are powerful enough to pretend being, or emulate, a console machine. Most likely so is your’s. And you’re in luck, Super Nintendo is one of, if not the best, emulated console system there is. All you basically need is an emulator, the piece of software that magically turns your PC into a good ol’ console; and the ROM file of your favorite game. The game ROM’s are in most cases copyrighted, so i can’t nor won’t supply you with those. Make sure you own the game cartridge, or else you might find yourself in violation of copyright laws.
The things you will need:
* At the time of writing, ZSnes has reached version 1.51
Copy your ROM image(s) to any folder. Preferably one that doesn’t require you to click trough too many folders to get to it.
Installing the software is pretty straightforward, just extract the two archives, each into their own folders. It might work having ZSnes and MEncoder in the same folder, but i haven’t tried it. Also, i think that’s a little messy. You are going to add the MEncoder location to window’s PATH environment variable instead, so remember the location where you extracted it. Follow the instructions below as the procedure differs a little depending on what version of Windows you are using.

Edit your Path environment variable
For Windows Vista you can go to the Control panel and click on the System icon, select Advanced System Settings in the left menu and then the “Environment variables” button. Then, in the list under “System Variables”, look for Path (might be lower- or uppercase). When you have found it, edit it and add the location of the folder where the MEncoder executable file is located. Remember to add the semicolon that is needed to separate the various folders listed in the Path string. Click OK, and your done.
(How to set the path in Windows 2000 / Windows XP)
When that’s all done, let’s start up ZSnes and configure it a little. The main things to check out is the Screen Resolution, Filters and Input
Choose your optimal screen preferences under “Video” in the Config menu. I have a widescreen and wanted ZSnes to fill the screen completely, so i made a custom screen setting it to 1360×768 with the DS F option (check the legend for description). Choose the Filter that you feel gives the best result. Configure your Input, and let’s load up a game already! Click GAME in the top menu, and select LOAD. Then browse to the folder where you copied or extracted the ROM file(s), select the game you want to play and click the LOAD button. If the game runs, great! if it doesn’t, seek help! (Read More..)
Eclipse is an Open Source IDE mainly used for Java development; but with the Pydev plug-in installed it becomes a powerful Python IDE. I will now show you how to get Eclipse ready for your Python code.
Before we get started, you should check whether or not Python is already installed on your computer. Look for a folder called Python25 or something similar on your C:\ partition, also check the Add/Remove Programs list in the Windows Control Panel for any Python entries.
If Python is not installed, let’s go to www.python.org and download a copy. There are newer versions, but we’ll download Python 2.5.2 to get compatibility with many extensions. You may want to download a newer release if your not too concerned about that.
Execute the Python installer you downloaded, and follow the instructions. The default installation path is “C:\Python25“. And unless that causes problems, leave it as it is.
Eclipse requires Java. So unless it’s already installed on your system, you need to get it from www.java.com, and install it before you continue.
Let’s install the Eclipse IDE. Head over to www.eclipse.org and look for Eclipse Classic which will be the release we’ll download and use.

At the time of writing, Eclipse for Windows is released as a zip archive. You’ll need to extract the folder inside the zip archive, called “eclipse“. I recommend clicking on the archive to open it, and just drag the folder to a proper destination on your computer, such as the “C:\Program Files” folder. (Read More..)
This is a time lapse video i made using my digital videocamera and Python, taking a picture every 5th second. It is quite boring so i had to add some music, Rob Costlow’s “Not Alone”
This is the Python script i used:
from VideoCapture import Device
from time import sleep
SecondsBetweenFrames = 5
FilePrefix = "bilde_"
DirectoryToStore = "E:\\Basen\\"
Kamera = Device()
FrameNr = 0
while True:
FrameNr = FrameNr + 1
Kamera.saveSnapshot(DirectoryToStore + FilePrefix + str(FrameNr) + '.jpg')
print "Lagret bilde: " + FilePrefix + str(FrameNr) + '.jpg'
sleep(SecondsBetweenFrames)
* You’ll need the VideoCapture and PIL Python extensions
I’m certain there are other, and probably better ways to do this. But this is what worked for me.
Download, extract, upload and install Drupal according to the installation instructions. Then, login to your server, and create a folder for Drupal to use. For example:
mkdir /media/mydisk/drupalfilesystem
Then you need to make that folder writable by the Apache server. I did this by entering the command:
chown -R www-data:www-data /media/mydisk/drupalfilesystem
Now you must login with your administrator account to configure Drupal. Login, and choose:
Administer > Site Configuration > File System
Enter the path to the folder you made in the File system path textfield, in this case we enter:
/media/mydisk/drupalfilesystem
Set the Download method to “Private” and, if all goes well, you are good to go.
I was having problems getting php scripts to parse on some virtual hosts i set up on my Apache server. When i entered the address to the script in my browser, all i got was the sour message; “No input file specified“.
I searched long and hard on google for a solution, and finally found one after tedious reading of forums and articles. Now, im not really sure if this is the best way to solve this problem, or even the safest way. But it worked for me.
All i had to do was comment out the DOC_ROOT line in my PHP.INI file.
I haven’t encountered any bad side effects yet, but i take no responsibility for the safety of your server(s) if you decide to apply this solution.
Good luck :)
Det første du trenger er en pc som du skal benytte til å kjøre serveren på. Denne må ha fast ip på ditt lokalnett, og bør kunne stå på hele tiden. Det trenger aldeles ikke være noe monster av en maskin. Selv kjører jeg min på en 400Mhz Pentium 2, med 256Mb RAM. Det neste du trenger er ett brukbart operativsystem installert på maskinen du skal bruke som server.
En webserver bruker vanligvis port 80, så du må gjøre slik at trafikk på port 80, utenfra, vil bli videresendt til port 80 på den maskinen du har satt opp som server. Dette kalles “Port Forwarding”, og informasjon om hvordan dette gjøres kan du få fra din bredbåndsleverandør,eller fra produsenten av routeren du har.
Så trenger du selve server programvaren. Jeg anbefaler Apache, som kjøres på rundt 70% av serverne på internett. Den er helt gratis og du finner utallige sider på nett via Google som beskriver prosessen med å installere Apache, på et nesten hvilket som helst operativsystem. Dersom du ønsker å kunne kjøre dynamiske sider på din server, må du installere for eksempel PHP, som er ett skript/programmering språk, og MySQL, som er en database du kan bruke til å lagre informasjon i. Denne prosessen finnes det også et utall beskrivelser av på internett. Eller du kan gå for en litt enklere alt-i-ett løsning som XAMPP, som inneholder Apache, PHP, MySQL og Perl.
De fleste bredbåndsleverandører opererer med dynamisk IP for sine kunder. Det finnes løsninger for dette problemet, No-IP er en av dem. Men jeg anbefaler at du tar kontakt med din leverandør og ber om å få tilknyttet en fast IP adresse for ditt abonnement. Ønsker du å ha ett domene, må du kontakte en domene forhandler og få det tilknyttet den IP adressen du har fått fra din bredbåndsleverandør.
Lykke til :)
Dette er ett problem som jeg fikk etter at jeg mottok ny SpeedTouch router fra Nextgentel…
Du har din egen webserver hjemme, fast ip, og domenenavn tilknyttet. Du har satt opp routeren helt korrekt, men det er fremdeles ett problem; når du skriver inn domenet forsøker nettleseren å koble seg til routeren for konfigurasjon, istedenfor å vise sidene på serveren din.
Websidene på din server er synlige for de utenfor ditt lokalnett, men ikke for deg. Du kan gjerne få opp sidene ved å skrive inn serverens lokale ip addresse, men det fører til at mange webløsninger ikke fungerer som de skal, f.eks Wordpress eller osCommerce. Bilder mangler, sider ser ikke ut i måneskinn, og du blir ganske frustrert.
Da blir du nok glad for å høre at løsningen er veldig enkel. Du må bare legge til én eneste linje i en fil som heter “hosts“, på den maskinen du bruker å surfe med. Denne filen finner du som oftest liggende i mappen “C:\WINDOWS\system32\drivers\etc“.
Det du gjør, er å åpne denne filen i Notepad (Notisblokk). Høyst sannsynlig vil du finne en linje i denne filen hvor det står “127.0.0.1 localhost“, la den stå slik den er. Du skriver bare inn en ny linje som ser for eksempel slik ut:
10.0.0.8 www.ditt-domene.no #Min Webserver
(Du bytter selvfølgelig ut ip addressen og domenenavnet med dine egne korrekte verdier)
Verre skulle det ikke være :)
Lykke til.