Re: [Pythonmac-SIG] Augh? Is this possible? Python can not read ~/Library/Preferences/ByHost/com.apple.screensaver.003065980c94.plist

2005-08-04 Thread Bob Ippolito
On Aug 4, 2005, at 4:44 AM, Schollnick, Benjamin wrote: > > >> os.path.exists(os.path.expanduser('~/')) >> > > Thanks Bob > > I should of remembered that... (Doh!)... I've read it a few times in > the library reference... But my excuse of the day is that I normally > program with Pytho

Re: [Pythonmac-SIG] Augh? Is this possible? Python can not read ~/Library/Preferences/ByHost/com.apple.screensaver.003065980c94.plist

2005-08-04 Thread Schollnick, Benjamin
> os.path.exists(os.path.expanduser('~/')) Thanks Bob I should of remembered that... (Doh!)... I've read it a few times in the library reference... But my excuse of the day is that I normally program with Python on a Windows box... ~ doesn't exist there Oh well... I knew it had

Re: [Pythonmac-SIG] Augh? Is this possible? Python can not read ~/Library/Preferences/ByHost/com.apple.screensaver.003065980c94.plist

2005-08-04 Thread Bob Ippolito
On Aug 4, 2005, at 4:20 AM, Schollnick, Benjamin wrote: > Folks, > > This is strange... But I suspect it is a permissions issue > > 1) I can not seemingly read my screensaver preference file. > ~/Library/Preferences/ByHost/com.apple.screensaver.003065980c94.plist > > os.path.exists ( > r

Re: [Pythonmac-SIG] Augh? Is this possible? Python can not read ~/Library/Preferences/ByHost/com.apple.screensaver.003065980c94.plist

2005-08-04 Thread Steve Spicklemire
I don't think you can use the '~' shortcut in python: >>> os.path.exists('~/.bashrc') False >>> os.path.exists('/Users/steve/.bashrc') True -steve On Aug 4, 2005, at 9:20 AM, Schollnick, Benjamin wrote: > Folks, > > This is strange... But I suspect it is a permissions issue > > 1) I can

[Pythonmac-SIG] Augh? Is this possible? Python can not read ~/Library/Preferences/ByHost/com.apple.screensaver.003065980c94.plist

2005-08-04 Thread Schollnick, Benjamin
Folks, This is strange... But I suspect it is a permissions issue 1) I can not seemingly read my screensaver preference file. ~/Library/Preferences/ByHost/com.apple.screensaver.003065980c94.plist os.path.exists ( r"~/Library/Preferences/ByHost/com.apple.screensaver.003065980c94.plis

Re: [Pythonmac-SIG] Getting Sharing name of the Macintosh viaPython?

2005-08-04 Thread Schollnick, Benjamin
> Is `hostname` what you look for? I just confirmed The Command Line "hostname" application does indeed return the TCP/IP hostname... In this case the DHCP assigned hostname... But system_profiler does indeed for Local_host_name return the Sharing pref. Plane machine name Since I'm rea

Re: [Pythonmac-SIG] Getting Sharing name of the Macintosh via Python?

2005-08-04 Thread Bob Ippolito
On Aug 3, 2005, at 11:43 PM, Schollnick, Benjamin wrote: >> Anyone have any idea on how to get the Machine Name from the Sharing >> Preference pane? >> The only real solution that I have thought up is to find the plist >> and >> read it from there >> > >

Re: [Pythonmac-SIG] Getting Sharing name of the Macintosh viaPython?

2005-08-04 Thread Schollnick, Benjamin
I'll double check... to see how that shows up on Sol_Bianca... 1) But I believe that hostname will return the TCPIP name, which in this case would be DHCP207--y-...etc... 2) The system profiler does have networking configuration data, but I did not see the computer name in there...

Re: [Pythonmac-SIG] Getting Sharing name of the Macintosh via Python?

2005-08-04 Thread Schollnick, Benjamin
> Anyone have any idea on how to get the Machine Name from the Sharing > Preference pane? > The only real solution that I have thought up is to find the plist and > read it from there The major problem with this is that I'm trying for a pytho

Re: [Pythonmac-SIG] Getting Sharing name of the Macintosh via Python?

2005-08-04 Thread David Hughes
> *From:* "Schollnick, Benjamin" <[EMAIL PROTECTED]> > *To:* > *Date:* Wed, 3 Aug 2005 15:21:53 -0400 > > Anyone have any idea on how to get the Machine Name from the Sharing > Preference pane? import os def get_system_info(): """ Use system_profiler command to return a dict of info