I'm banging my head over this one... sometimes it just works... *argh*
Here's a snip of my problem:
import win32com.client
import shutil
import time
engine = win32com.client.Dispatch(DAO.DBEngine.36)
table = 'STUFFTODELETE'
dstFilename = 'in.mdb'
workingfile = 'work.mdb'
Hi there,
I have a problem. I'm using calling shutil.copyfile() followed by
open(). The thing is that most of the times open() is called before
the actual file is copied. I don't have this problem when doing a
step-by-step debug, since I give enough time for the OS to copy the
file, but at
First off, I am just learning Python, so if there is a more efficient way to
do this, then I am all ears (NOTE: The code below is something that I
was messing with to learn threads... So some functionality is not
applicable for your needs..I just wanted to show you a demonstration)
One
On Tue, 30 Jan 2007 15:05:23 +, Hugo Ferreira [EMAIL PROTECTED] wrote:
Hi there,
I have a problem. I'm using calling shutil.copyfile() followed by
open(). The thing is that most of the times open() is called before
the actual file is copied. I don't have this problem when doing a
step-by-step
Hugo Ferreira [EMAIL PROTECTED] wrote:
I have a problem. I'm using calling shutil.copyfile() followed by
open(). The thing is that most of the times open() is called before
the actual file is copied. I don't have this problem when doing a
step-by-step debug, since I give enough time for the OS
Well.. Thx for the answers.
The only way I had to make it work was to use a time.sleep(10) after the
shutil.copyfile(). Since this is a night-run script, I can waste 10 seconds,
but it still knocks me out why it happens...
Cheers!
Hugo Ferreira
On 30 Jan 2007 18:06:15 + (GMT), Matthew