My Python & co. stuff

Qt Creator from Qt SDK 1.1.3 was very slow for me.

My setup? VAIO equipped with i5 + 8 GB RAM + 500GB of Seagate Momentus XT.

Symptoms?

  • Qt Creator started up in about minute. During that time, it didn’t utilize any of CPU (0-1%) and steadily grown in memory from about 50MB up to 80MB
  • typing anything in Options search box caused the whole program to hang
  • clicking “Analyzer” or “Version control systems” in options… yes, you guessed it. Hang.

The whole situation looked like a single false click – and I am doomed to wait for around 30 seconds until it starts working again.

Antivirus? Turned off. Didn’t help.

Solution? Yes, I found it. This is my path:

C:\Users\dotz\Desktop>echo %PATH%
C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\ActiveState Komodo IDE 6\;C:\Program Files (x86)\ActiveState Komodo Edit 6\;C:\GTK\bin;C:\Program Files (x86)\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;\;C:\Program Files (x86)\Sony\VAIO Startup Setting Tool;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\Bazaar;C:\Program Files (x86)\VisualSVN\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Nmap;c:\python27;c:\python27\scripts;c:\gnuwin32\bin;c:\Program Files (x86)\PuTTY

As you can see, I have GnuWin32 in it and a few version control systems (TortoiseSVN, for example). I have no idea which caused Qt Creator to lag. Instead, I created a simple batch file to start it up, like this:

@echo off
set PATH=c:\windows;c:\windows\system32
start c:\qtsdk\QtCreator\bin\qtcreator.exe

Qt Creator starts quickly and works fast.

Are you affected by this bug too? You can comment on the bug report page I created.


Update: Solved. The offending path entry?
set PATH=\

Short snippet for settings window as topmost in Pyglet on win32 platform:

    from pyglet.window.win32 import _user32
    from pyglet.window.win32.constants import *

    def set_topmost(window):
        _user32.SetWindowPos(
            window._hwnd, HWND_TOPMOST, 0, 0, 0, 0,
            SWP_NOMOVE | SWP_NOSIZE)

… and settings.py, and urls.py, and so on. Customize as you like.

 

from django.conf import settings
from django.core import management

MY_APP = '' # Your app name here
if not MY_APP_NAME:
    import sys
    MY_APP_NAME = sys.argv[1]

settings.configure(
    DEBUG=True, 
    TEMPLATE_DEBUG=True,
    INSTALLED_APPS = [MY_APP],
    DATABASES = {
        'default': {
            'ENGINE':'django.db.backends.sqlite3',
            'NAME': ':memory:',
            }
        }
    )

management.call_command('test', MY_APP)

No DISPLAY variable on FreeBSD (or anything else) when you use SSH with X11Forwarding?

Install xauth package.

flowplayer working from time to time?

flowplayer black window problem?

flowplayer shows black window sometimes?

flowplayer sometimes not working?

Enough Google feeding. The solution is simple and not as obvious.

Make sure you do not serve SWF files gzipped (server-side, by Apache’s mod_gzip for example).

I already wasted 3 hours for this.

Would you like to send an e-mail with Django? Would you like to use an admin-editable template, which is stored in the db? Well, here’s a small code snippet for you : http://code.google.com/p/django-emailtemplates/

I am trying to add more backends support for django-pgsql-interval-field . Unfortunatley, as my current work involves PostgreSQL-based Django application, I am unable to test on anything else, than PostgreSQL. Anybody interested in helping me with this project?