Re: [python-win32] Media Wiki

2007-03-06 Thread David Fraser
James Matthews wrote:
> I would agree however i do like the fedora core website which runs
> moin moin
OK great - if it looks like that switch my +1 MediaWiki to +1 MoinMoin
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Wiki

2007-03-06 Thread Tim Golden
James Matthews wrote:
> After fighting with my Hosting company to support and give me a shell I
> got nowhere for a week! so i have installed TikiWiki and hope it works out
> well... (if anyone has a better one with a simple installation please tell
> me) Anyways here is the site www.wazoozle.com please take things away!

Any chance of adding the OpenID extension[1], James? I
prefer to use my OpenID than to remember several different
logons.

TJG

[1] http://www.mediawiki.org/wiki/Extension:OpenID
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] win32gui.GetOpenFileName()

2007-03-06 Thread Gabriel Genellina
En Mon, 05 Mar 2007 15:41:09 -0300, Tony Cappellini <[EMAIL PROTECTED]>  
escribió:

>> Is there a way I can select multiple files with either of the above
>> mentioned calls?
>> (pressing Control doesn't work)
>
>>> Pass win32con.OFN_ALLOWMULTISELECT|win32con.OFN_EXPLORER
>>> in the Flags to enable this.
>
> Thanks Roger, where did you find this information?

Look at the Microsoft site, MSDN, the primary source of information.
Many win32xxx modules are just a thin wrapper around the related Windows  
functions.
In this case, see http://msdn2.microsoft.com/en-us/library/ms646839.aspx

-- 
Gabriel Genellina

___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Reusing a local com server object

2007-03-06 Thread Ross McKerchar
I am having trouble connecting to an already running python com server.

I have set CLSCTX_LOCAL_SERVER for my com object and I am using the 
"GetObject" function in my vbscripts which connect to the com server.

I have written a simple test server that behaves very similarly to my 
real server (except the thread will actually do some work)


sleeper = threading.Thread(target=time.sleep,args=(20,))

class Test(object):
_public_methods_ = ["go"]
_reg_progid_ = "pythonutils.test"
_reg_clsid_ = "{57E47876-69CB-4822-92F1-B8D2716F54A4}"
_reg_clsctx_ = pythoncom.CLSCTX_LOCAL_SERVER

def go(self):
if sleeper.isAlive():
return "Server is already running"
else:
sleeper.start() #start a thread that sleep for 20 seconds
return "Server NOT running"


Now, if I run two test clients it works fine if client #2 get's a 
reference to my com server before client #1 stops running (i.e. client#1 
sleeps for 10 seconds and I run client#2, in a seperate process before 
client#1 finishes).

However, if I run my test clients sequentially each one creates a new 
pythonw process. The old com server is definitely still running, 
GetObject just decides to return a new one and I am unsure how the 
change this behaviour.

After browsing Mark's win32 book I've tried playing with the 
_reg_threading_ but I'm not convinced it's relevant (I full admit I'm 
dont understand com threading 100%). I also thought I was onto something 
with the pythoncom.REGCLS_MULTIPLEUSE variable until I discovered that 
this is used by default (in win32com.server.factory).

Any suggestions would be much appreciated - even just some key phrases 
that may help energise my search efforts...

Many thanks,

-ross

___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Wiki

2007-03-06 Thread Mark Mc Mahon
Hi,

I just created an account, logged in, and I couldn't figure out how to
modify a page.

I added the topics that Tim and I mentioned from the earlier thread to
the "Discussion" page.

Mark
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Wiki

2007-03-06 Thread Tim Golden
Mark Mc Mahon wrote:
> I just created an account, logged in, and I couldn't figure out how to
> modify a page.

Well, likewise. James, is there some switch you have to set
to allow logged-in users to edit main pages?

TJG
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Adding a really odd feature to Access as an odbc driver

2007-03-06 Thread Grzegorz Adam Hankiewicz




Hi.

I have an old application which uses Access, and possibly the reason
why concurrent access wasn't designed is because transactions are not
supported, so multiple writes could be trouble.

I was wondering if it would be possible to serialise all the read/write
operations through a micro server with pywin32+twisted. I guess this is
possible since the server just reads requests and deals them in a
syncronous way. However, would it be possible to connect from the
application to this serialisation server through odbc? Would this mean
implementing a dummy odbc driver which just relays/gets the information
and install it in the client?

The idea is implementing this behind the scenes without requiring to
touch the original application. Is this possible at all?


-- 

  

   
  
Grzegorz Adam Hankiewicz
  Jefe de Producto TeraVial
   C/ Perfumería 21. Nave I. Polígono
industrial La Mina
28770 Colmenar Viejo. Madrid (España) 
  

  
Tel. +34 918 467 390 (Ext.18)
  ·  
Fax +34 918 457 889
  
  
[EMAIL PROTECTED]
  ·  
www.rastertech.es
  

  
  
  

  




___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Adding a really odd feature to Access as an odbc driver

2007-03-06 Thread Tim Roberts
Grzegorz Adam Hankiewicz wrote:
>
> I have an old application which uses Access, and possibly the reason
> why concurrent access wasn't designed is because transactions are not
> supported, so multiple writes could be trouble.

Access is trouble any time you have more than about 2 people using a
single database.  It just wasn't designed for that environment.


> I was wondering if it would be possible to serialise all the
> read/write operations through a micro server with pywin32+twisted. I
> guess this is possible since the server just reads requests and deals
> them in a syncronous way. However, would it be possible to connect
> from the application to this serialisation server through odbc? Would
> this mean implementing a dummy odbc driver which just relays/gets the
> information and install it in the client?

Surely it would be MUCH less trouble to move the backend to Postgres,
SQLite, or even SQL Server Express, all of which are free.


> The idea is implementing this behind the scenes without requiring to
> touch the original application. Is this possible at all?

Is the original application in Access?  Or is it another language that
just happens to use the Jet database?  What API does it use to talk to
the database?

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] PID of a process created by win32com.client.Dispatch()

2007-03-06 Thread Tim Roberts
Bruce Webber wrote:
> I've written a program which automates the running of Business Objects (a 
> query generator and reporting tool). The command which creates the process 
> (and the corresponding Python object) is:
>
> boApp = win32com.client.Dispatch('BusinessObjects.Application')
>
> This works fine, and I have successfully run the application. However, 
> sometimes the Business Objects process hangs (perhaps because the query takes 
> too long or perhaps due to some error in my code) and I would like to kill 
> the process in Task Manager. If I am running this on my PC, it's easy to 
> identify the process to kill. If, however, I'm running this on a server and 
> there are other Business Objects processes running I cannot tell which 
> process to end.
>
> Upon calling Dispatch() I would like to log the PID of the process, so if I 
> have to kill, I would know which one.
>
> Is there a way to do this? (I have looked through the Python for Windows 
> documentation and searched on the web, but have not found any answers.)

This is tricky.  Remember that win32com.client.Dispatch doesn't actually
know whether the COM server is in-process (meaning a DLL within the
current process) or out-of-process (meaning a separate executable). 
That's all hidden by COM.  When you talk to the boApp object, you're
just calling into an object in your address space.  The fact that the
object is just a proxy that calls into another process is a COM detail
that is hidden from view.

Do you have the object model for BusinessObjects?  If you are lucky,
perhaps their object model includes a "get process ID" property.  If
not, I'm not convinced there is a way to map a COM object to a process
ID, and some Google searching did not come up with an answer.

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


[python-win32] Re: Reusing a local com server object

2007-03-06 Thread Roger Upole
Ross McKerchar wrote:
>I am having trouble connecting to an already running python com server.
> 
> I have set CLSCTX_LOCAL_SERVER for my com object and I am using the 
> "GetObject" function in my vbscripts which connect to the com server.
> 
> I have written a simple test server that behaves very similarly to my 
> real server (except the thread will actually do some work)
> 
> 
> sleeper = threading.Thread(target=time.sleep,args=(20,))
> 
> class Test(object):
>_public_methods_ = ["go"]
>_reg_progid_ = "pythonutils.test"
>_reg_clsid_ = "{57E47876-69CB-4822-92F1-B8D2716F54A4}"
>_reg_clsctx_ = pythoncom.CLSCTX_LOCAL_SERVER
> 
>def go(self):
>if sleeper.isAlive():
>return "Server is already running"
>else:
>sleeper.start() #start a thread that sleep for 20 seconds
>return "Server NOT running"
> 
> 
> Now, if I run two test clients it works fine if client #2 get's a 
> reference to my com server before client #1 stops running (i.e. client#1 
> sleeps for 10 seconds and I run client#2, in a seperate process before 
> client#1 finishes).
> 
> However, if I run my test clients sequentially each one creates a new 
> pythonw process. The old com server is definitely still running, 
> GetObject just decides to return a new one and I am unsure how the 
> change this behaviour.
> 
> After browsing Mark's win32 book I've tried playing with the 
> _reg_threading_ but I'm not convinced it's relevant (I full admit I'm 
> dont understand com threading 100%). I also thought I was onto something 
> with the pythoncom.REGCLS_MULTIPLEUSE variable until I discovered that 
> this is used by default (in win32com.server.factory).
> 
> Any suggestions would be much appreciated - even just some key phrases 
> that may help energise my search efforts...


An object needs to be registered in the Running Object Table (ROT) for this to
work. See pythoncom.RegisterActiveObject.

   hth
  Roger

___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Adding a really odd feature to Access as an odbc driver

2007-03-06 Thread Grzegorz Adam Hankiewicz




Tim Roberts wrote:

  Access is trouble any time you have more than about 2 people using a
single database.  It just wasn't designed for that environment.
  

I know, I know... just imagine that before accepting this job I didn't
even know Access *could* be used *like* one, I always thought it was
like a toy sqlite with fancy UI for single users.


  Surely it would be MUCH less trouble to move the backend to Postgres,
SQLite, or even SQL Server Express, all of which are free.
  

Indeed, which is what I'm going to do in the long term, rewrite the
application.


  Is the original application in Access?  Or is it another language that
just happens to use the Jet database?  What API does it use to talk to
the database?
  

It is just a VB without source code which talks to the database through
a DNSless connection, which really means I can't do what I was
proposing, since that would mean changing the original VB application
to use a specific ODBC, and I can't. I'm just asking because I'm
curious about this sort of serializing gateway "architecture".

In fact, does sqlite run on windows with multiple writers shared
through SMB? I know sqlite works with multiple writers, but my
experience so far is only under linux, so I would like to know if that
works on windows the same way or there are problems like the horror
stories I've heard about NFS locking.

Any weird suggestions appreciated, not doing anything real here, just
toying with the idea of doing something perverse (if using Access
wasn't enough!).

-- 

  

   
  
Grzegorz Adam Hankiewicz
  Jefe de Producto TeraVial
   C/ Perfumería 21. Nave I. Polígono
industrial La Mina
28770 Colmenar Viejo. Madrid (España) 
  

  
Tel. +34 918 467 390 (Ext.18)
  ·  
Fax +34 918 457 889
  
  
[EMAIL PROTECTED]
  ·  
www.rastertech.es
  

  
  
  

  




___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Adding a really odd feature to Access as an odbc driver

2007-03-06 Thread Tim Roberts
Grzegorz Adam Hankiewicz wrote:
> Tim Roberts wrote:
>> Access is trouble any time you have more than about 2 people using a
>> single database.  It just wasn't designed for that environment.
>>   
> I know, I know... just imagine that before accepting this job I didn't
> even know Access *could* be used *like* one, I always thought it was
> like a toy sqlite with fancy UI for single users.

That's not a bad description, actually.  However, I have encountered
many clients who have built large applications with Access.  As long as
they're all running on the same machine, it actually works OK for less
than a dozen users.  Once you try to share it across a network, things
get dicier.

>> Is the original application in Access?  Or is it another language that
>> just happens to use the Jet database?  What API does it use to talk to
>> the database?
>>   
> It is just a VB without source code which talks to the database
> through a DNSless connection, which really means I can't do what I was
> proposing, since that would mean changing the original VB application
> to use a specific ODBC, and I can't. I'm just asking because I'm
> curious about this sort of serializing gateway "architecture".

I've heard of other people who wanted to do what you asked --
essentially build a multi-user client/server front-end for an Access Jet
database.  In virtually every case, it was less work to switch to a real
database.  The advantage of SQL is that most database backends look
pretty much the same these days.  Sure, there are odd details, and the
APIs are spelled differently, but the concepts are the same.


> In fact, does sqlite run on windows with multiple writers shared
> through SMB? I know sqlite works with multiple writers, but my
> experience so far is only under linux, so I would like to know if that
> works on windows the same way or there are problems like the horror
> stories I've heard about NFS locking.

On the NT systems (2000/XP/Vista), I believe this works just as well as
it does on Linux.  File locking on NTFS file systems is pretty solid. 
Now, if you're actually talking about involving Samba -- having a file
on a Windows file system shared by SQLite clients on both Windows and
Linux -- then I do not know.  My experiences with Samba have not been
universally good, so I'm afraid I've learned not to rely on it too heavily.

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Adding a really odd feature to Access as an odbc driver

2007-03-06 Thread Michael L Torrie
On Tue, 2007-03-06 at 19:48 +0100, Grzegorz Adam Hankiewicz wrote:
> > Surely it would be MUCH less trouble to move the backend to Postgres,
> > SQLite, or even SQL Server Express, all of which are free.
> >   
> Indeed, which is what I'm going to do in the long term, rewrite the
> application.

No need to rewrite the application. Access can happily interface with
any "real" database engine via ODBC.  I've used MS Access with MySQL
before, if I recall.

Michael


___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Adding a really odd feature to Access as an odbc driver

2007-03-06 Thread Tim Roberts
Michael L Torrie wrote:
> On Tue, 2007-03-06 at 19:48 +0100, Grzegorz Adam Hankiewicz wrote:
>   
>>> Surely it would be MUCH less trouble to move the backend to Postgres,
>>> SQLite, or even SQL Server Express, all of which are free.
>>>   
>>>   
>> Indeed, which is what I'm going to do in the long term, rewrite the
>> application.
>> 
>
> No need to rewrite the application. Access can happily interface with
> any "real" database engine via ODBC.  I've used MS Access with MySQL
> before, if I recall.
>   

Well, that's an interesting point.  Depending on how the application is
written, you may be able to replace the Access database by a shell
database that contains nothing but links to external tables in some
other database, and do it without touching the application itself.

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Wiki

2007-03-06 Thread James Matthews

Mark I added a section for editing pages! (the mark-up) and to create pages
all you need to do it search for the title and click create the page! Tim i
am working on the OpenID ext. It seems it doesn't support the version of
mediawiki that we have but i am working on it!

P.S Tomorrow i am making a major site overhaul AKA adding new
categories,Writing Wiki help docs etc... ( i am doing this off-peak hours
).. So if the site goes down a little don't worry i will have it up and
running by Friday morning!

If anyone has any suggestions,complaints,tips and/or would like to help
administer the wiki please email me!

Thanks
James

On 3/6/07, Tim Golden <[EMAIL PROTECTED]> wrote:


Mark Mc Mahon wrote:
> I just created an account, logged in, and I couldn't figure out how to
> modify a page.

Well, likewise. James, is there some switch you have to set
to allow logged-in users to edit main pages?

TJG
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32





--
http://www.goldwatches.com/watches.asp?Brand=39
http://www.wazoozle.com
___
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32