On 01/-10/-28163 02:59 PM, ecu_jon wrote:
On Jan 30, 7:19 pm, Dave Angel wrote:
On 01/-10/-28163 02:59 PM, ecu_jon wrote:
ok now i get permission denied
import os
homedir =s.path.expanduser('~')
try:
from win32com.shell import shellcon, shell
homedir =hell.SHGetFolderPath(0
On Jan 30, 8:25 pm, MRAB wrote:
> On 31/01/2011 00:18, ecu_jon wrote:
>
>
>
> > On Jan 30, 7:09 pm, MRAB wrote:
> >> On 30/01/2011 23:43, ecu_jon wrote:
>
> >>> ok now i get permission denied
>
> >>> import os
> >>> homedir = os.path.expanduser('~')
> >>> try:
> >>> from win32com.shell
On 31/01/2011 00:18, ecu_jon wrote:
On Jan 30, 7:09 pm, MRAB wrote:
On 30/01/2011 23:43, ecu_jon wrote:
ok now i get permission denied
import os
homedir = os.path.expanduser('~')
try:
from win32com.shell import shellcon, shell
homedir = shell.SHGetFolderPath(0, shellcon.CSI
It seems like you are trying to copy directories with shutil.copy. Use
shutil.copytree instead.
On Sun, 2011-01-30 at 16:43 -0800, ecu_jon wrote:
> On Jan 30, 7:34 pm, rantingrick wrote:
> > On Jan 30, 5:43 pm, ecu_jon wrote:
> >
> > > ok now i get permission denied
> >
> > [...]
> >
> > >
On Jan 30, 7:34 pm, rantingrick wrote:
> On Jan 30, 5:43 pm, ecu_jon wrote:
>
> > ok now i get permission denied
>
> [...]
>
> > shutil.copy (backupdir1, backupdir2)
>
> I must stress the importance of proper testing before ever running
> code that manipulates files! So many things can go wro
On Jan 30, 5:43 pm, ecu_jon wrote:
> ok now i get permission denied
[...]
> shutil.copy (backupdir1, backupdir2)
I must stress the importance of proper testing before ever running
code that manipulates files! So many things can go wrong. Of course
you are just copying files here and not del
On Jan 30, 7:19 pm, Dave Angel wrote:
> On 01/-10/-28163 02:59 PM, ecu_jon wrote:
>
> > ok now i get permission denied
>
> > import os
> > homedir = os.path.expanduser('~')
> > try:
> > from win32com.shell import shellcon, shell
> > homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_A
On 01/-10/-28163 02:59 PM, ecu_jon wrote:
ok now i get permission denied
import os
homedir = os.path.expanduser('~')
try:
from win32com.shell import shellcon, shell
homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0)
except ImportError:
homedir = os.path.expandus
On Jan 30, 7:09 pm, MRAB wrote:
> On 30/01/2011 23:43, ecu_jon wrote:
>
> > ok now i get permission denied
>
> > import os
> > homedir = os.path.expanduser('~')
> > try:
> > from win32com.shell import shellcon, shell
> > homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0
On 30/01/2011 23:43, ecu_jon wrote:
ok now i get permission denied
import os
homedir = os.path.expanduser('~')
try:
from win32com.shell import shellcon, shell
homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0)
except ImportError:
homedir = os.path.expanduser("~"
ok now i get permission denied
import os
homedir = os.path.expanduser('~')
try:
from win32com.shell import shellcon, shell
homedir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0)
except ImportError:
homedir = os.path.expanduser("~")
print homedir
print os.listdir(homedir+
On Jan 30, 5:13 pm, ecu_jon wrote:
> what does this mean? Use os.path.join(x,y, z*)
> what is the x,y,z?
x,y, and z in this case are just generic variables. Consider x+y=10. x
and y could both equal 5 or any number of combinations of two numbers
who sum equals ten. Anyway see the link chris pos
On Sun, Jan 30, 2011 at 3:13 PM, ecu_jon wrote:
> On Jan 30, 3:55 pm, r wrote:
>> On Jan 30, 2:44 pm, ecu_jon wrote:
>>
>> > shutil.copy (homedir+"\\backup\\", homedir+"\\backup2\\")
>>
>> TIP: Use os.path.join(x,y, z*)
>>
>> > why is there still two \\ in the pathfor the copy command?
>>
>> I a
On Jan 30, 3:55 pm, r wrote:
> On Jan 30, 2:44 pm, ecu_jon wrote:
>
> > shutil.copy (homedir+"\\backup\\", homedir+"\\backup2\\")
>
> TIP: Use os.path.join(x,y, z*)
>
> > why is there still two \\ in the pathfor the copy command?
>
> I always convert my paths to use a single '/' instead of '\\'.
On Sun, Jan 30, 2011 at 12:44 PM, ecu_jon wrote:
> hello,
> i am trying to work with windows homedirectory as a starting point for
> some kind of file copy command. i'm testing this on a win7 box so my
> home is c:\Users\jon\
> here is the code snippet i am working on:
>
> import os
>
> homedir =
On Jan 30, 2:44 pm, ecu_jon wrote:
> shutil.copy (homedir+"\\backup\\", homedir+"\\backup2\\")
TIP: Use os.path.join(x,y, z*)
> why is there still two \\ in the pathfor the copy command?
I always convert my paths to use a single '/' instead of '\\'. Just
makes life that much easier!
--
http:
hello,
i am trying to work with windows homedirectory as a starting point for
some kind of file copy command. i'm testing this on a win7 box so my
home is c:\Users\jon\
here is the code snippet i am working on:
import os
homedir = os.path.expanduser('~')
try:
from win32com.shell import shellc
17 matches
Mail list logo