>> On Oct 8, 9:19 am, goldtech <[EMAIL PROTECTED]> wrote:
>>> How did you learn Win32com?
>>>
>>> Other than the O'Reilly book, I've never found a lot of
>>> documentation.
>>>
>>> Trying to browse COM in PythonWin is tough - there's tons of stuff in
>>> there. I've never been able to find the Win3
One point to bear in mind that, more or less, the pywin32 stuff
> just wraps the MS API really closely, mostly doing just enough
> of the messy plumbing to present the API "objects" as Python
> objects. That's to say: find out how to do it from a C++ or VB
> or Delphi tut
the MS API really closely, mostly doing just enough
> of the messy plumbing to present the API "objects" as Python
> objects. That's to say: find out how to do it from a C++ or VB
> or Delphi tutorial and translating into Python often isn't hard.
>
> As it happens
l and translating into Python often isn't hard.
As it happens I've been using Windows APIs for a few years,
so I have a bit of a head start. But I've answered quite
a few questions on python-win32 by putting the subject line
into Google, picking a likely-looking response and translatin
On Oct 8, 9:19 am, goldtech <[EMAIL PROTECTED]> wrote:
> > from win32com.shell import shell, shellcon
>
> > desktop = shell.SHGetFolderPath (0, shellcon.CSIDL_DESKTOP, 0, 0)
>
> >
>
> Tim,
>
> How did you learn Win32com?
>
> Other than the O'Reilly book, I've never found a lot of
> documentation.
> from win32com.shell import shell, shellcon
>
> desktop = shell.SHGetFolderPath (0, shellcon.CSIDL_DESKTOP, 0, 0)
>
>
Tim,
How did you learn Win32com?
Other than the O'Reilly book, I've never found a lot of
documentation.
Trying to browse COM in PythonWin is tough - there's tons of stuff in
On Oct 7, 12:30 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
> Tim Chase wrote:
> >> You are assuming the system is not localized, that won't work if you
> >> distribute your applications internationally. In my system it is not
> >> "Desktop", it is "Escritorio", and I guess it will vary with every
>
> from win32com.shell import shell, shellcon
>
> desktop = shell.SHGetFolderPath (0, shellcon.CSIDL_DESKTOP, 0, 0)
>
>
>
I have a general problem with using win32com. It's the documentation.
I never know what is available, what classes, methods, what they do.
Even some of the existing documentat
Tim Chase wrote:
>> You are assuming the system is not localized, that won't work if you
>> distribute your applications internationally. In my system it is not
>> "Desktop", it is "Escritorio", and I guess it will vary with every
>> locale. Does someone know a way to find out what name does the de
Tim Chase wrote:
>> You are assuming the system is not localized, that won't work if you
>> distribute your applications internationally. In my system it is not
>> "Desktop", it is "Escritorio", and I guess it will vary with every
>> locale. Does someone know a way to find out what name does the de
> You are assuming the system is not localized, that won't work if you
> distribute your applications internationally. In my system it is not
> "Desktop", it is "Escritorio", and I guess it will vary with every
> locale. Does someone know a way to find out what name does the desktop
> have?
I beli
On Oct 7, 1:24 am, Scott David Daniels <[EMAIL PROTECTED]> wrote:
> goldtech wrote:
> > ... I want the new file's location to be on the user's desktop in
> > a Windows XP environment
>
> How about:
> import os.path
> handle = open(os.path.expanduser(r'~\DeskTop\somefile.txt'), 'w')
>
Matimus wrote:
> On Oct 6, 8:31 pm, goldtech <[EMAIL PROTECTED]> wrote:
>> Can anyone link me or explain the following:
>>
>> I open a file in a python script. I want the new file's location to be
>> on the user's desktop in a Windows XP environment. fileHandle = open
>> (., 'w' ) what I gues
>
> This is really a Windows question, not a Python question. You should
> have been able to figure it out yourself by examining existing
> environment variables.
I agree, you're right. I learn more by figuring out the code myself.
After Google briefly: In a DOS box type: SET
This was too eas
On Oct 6, 2007, at 11:31 PM, goldtech wrote:
> Can anyone link me or explain the following:
>
> I open a file in a python script. I want the new file's location to be
> on the user's desktop in a Windows XP environment. fileHandle = open
> (., 'w' ) what I guess I'm looking for is an enviro
On Oct 6, 8:31 pm, goldtech <[EMAIL PROTECTED]> wrote:
> Can anyone link me or explain the following:
>
> I open a file in a python script. I want the new file's location to be
> on the user's desktop in a Windows XP environment. fileHandle = open
> (., 'w' ) what I guess I'm looking for is a
goldtech wrote:
> ... I want the new file's location to be on the user's desktop in
> a Windows XP environment
>
How about:
import os.path
handle = open(os.path.expanduser(r'~\DeskTop\somefile.txt'), 'w')
...
-Scott
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 6, 11:31 pm, goldtech <[EMAIL PROTECTED]> wrote:
> Can anyone link me or explain the following:
>
> I open a file in a python script. I want the new file's location to be
> on the user's desktop in a Windows XP environment. fileHandle = open
> (., 'w' ) what I guess I'm looking for is
I believe you can use something like '%USERPROFILE%\DESKTOP' as the path on
a windows machine to get to the current users desktop directory. I'm not
sure if the python open() command will expand that correctly, but give it a
shot.
-Josh
On 10/6/07, goldtech <[EMAIL PROTECTED]> wrote:
>
> Can any
Can anyone link me or explain the following:
I open a file in a python script. I want the new file's location to be
on the user's desktop in a Windows XP environment. fileHandle = open
(., 'w' ) what I guess I'm looking for is an environmental
variable that will usually be correct on most XP
20 matches
Mail list logo