Reg: Installation problems in psycopg2

2008-10-13 Thread raj . indian . 08
Hi all,
I am not sure whether this is the right place to ask this
question. Please let me know if it isn't.
I am trying to install psycopg2 in my windows machine for
connecting with the PostgreSQL server.
Since there is no binary executable*, I  am trying to build my own
- and I am facing this issue.

C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:
cannot find -lpq
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

 After a little bit of googling, I found that this can be solved
by -L while linking - but I am not specifically
linking the code. Rather, I am installing by doing the following -
 python.exe setup.py build
 python.exe setup.py install

So, I cannot find a place to include the -L option too.
Can somebody help me on this? I have been investigating this for
the last 4 days - and now I cannot see any further way out.

Regards,
Raj
*p.s ->  I did find one binary in
http://www.stickpeople.com/projects/python/win-psycopg/index.html#Version2.
But the licensing is GPL and I wont be able to use it (I am doing
coding for proprietary systems)
--
http://mail.python.org/mailman/listinfo/python-list


Re: Reg: Installation problems in psycopg2

2008-10-14 Thread raj . indian . 08
Hi Philip,
Thank you. I have posted the same in psycopg mailing list too.
I had setup the pg_config value too, but even then the error was
coming.

Hi Dave,
   Thank you for the quick reply.

Regards
Raj K
--
http://mail.python.org/mailman/listinfo/python-list


Modifying the system menu

2008-09-16 Thread raj . indian . 08
Hi all,
I am trying to modify the system menu of all the applications in
my machine.
For example say - I am creating multiple desktops for windows  -
and I want to give every application the capability to be moved across
different desktops. So I wanted to modify the basic system menu list
to include the new options.

The methods I could think of are -
1. Modify the basic windows set of system menu values (best option)
   or
2. Poll every few milliseconds and modify the system menu values of
the active window

For (1) I couldnt think of a way to do it. Is it even possible using
python?

For (2) I wrote the following code for basic testing:
hwnd = win32gui.GetForegroundWindow()
hw = win32gui.GetSystemMenu(hwnd, False)
if hw != None:
win32gui.AppendMenu(hw,win32con.MF_SEPARATOR,0,'-');

and it shows the following error: pywintypes.error: (1401,
'AppendMenu', 'Invalid menu handle.')

If anyone could help me out in both the options (1) and/or (2), I
would be very thankful.

Thank you very much in advance,
A python newbie
--
http://mail.python.org/mailman/listinfo/python-list


Re: Modifying the system menu

2008-09-17 Thread raj . indian . 08
I tested it again and found that the behaviour is a little different
from what I mentioned previously in the mailchain.
The item is working perfectly the first time around. Now if I close
the application and run it again (which was what I did earlier), if
that application system menu is already modified, it is causing this
issue.

Why would this happen? If it is that the file handle is not obtained,
it wouldnt have gone through the following check at all?
> hw = win32gui.GetSystemMenu(hwnd, False)
> if hw != None:
> win32gui.AppendMenu(hw,win32con.MF_SEPARATOR,0,'-');

Not only did it go through, it failed with an invalid menu handle
error.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Modifying the system menu

2008-09-18 Thread raj . indian . 08
On Sep 18, 6:39 am, [EMAIL PROTECTED] wrote:
> I tested it again and found that the behaviour is a little different
> from what I mentioned previously in the mailchain.
> The item is working perfectly the first time around. Now if I close
> the application and run it again (which was what I did earlier), if
> that application system menu is already modified, it is causing this
> issue.
>
> Why would this happen? If it is that the file handle is not obtained,
> it wouldnt have gone through the following check at all?
>
> >     hw = win32gui.GetSystemMenu(hwnd, False)
> >     if hw != None:
> >         win32gui.AppendMenu(hw,win32con.MF_SEPARATOR,0,'-');
>
> Not only did it go through, it failed with an invalid menu handle
> error.

More worryingly, this happens randomly. Am I doing some mistake here?
--
http://mail.python.org/mailman/listinfo/python-list


Re: Modifying the system menu

2008-09-24 Thread raj . indian . 08
I am creating the window manager for multiple desktops :)
Anyways, i got one answer in nabble which I feel is the best option -
even though I am just investigating on how to do it.

Please find below -
James Matthews wrote:
>
> Hi all,
>I am trying to modify the system menu of all the applications in
> my machine.
>For example say - I am creating multiple desktops for windows  -
> and I want to give every application the capability to be moved across
> different desktops. So I wanted to modify the basic system menu list
> to include the new options.
>
>The methods I could think of are -
> 1. Modify the basic windows set of system menu values (best option)

There is no central repository where this is stored, so there's no
place
to change.


> 2. Poll every few milliseconds and modify the system menu values of
> the active window

Ick  Windows don't come and go that often, and you only need to do
this
once for each application.

The correct option is (3) install a Windows hook to watch for new
application to activate, and modify the menu in the hook.  You will
have
to use a hook in order to catch the menu item being chosen anyway.
There are Python modules to handle some kinds of hooks, but overall
this
would be much easier in C.
--
http://mail.python.org/mailman/listinfo/python-list