ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-tutor
python-tutor
Re: [Tutor] [Linux] open a file in any home "~" ?
by Learner404 other posts by this author
Apr 19 2006 11:41AM messages near this date
Re: [Tutor] [Linux] open a file in any home "~" ? | Re: [Tutor] [Linux] open a file in any home "~" ?
It works great, thanks very much to the three of you for these light-speed
answers ... I love this list !

Wesley, I've just pre-order your new edition "Core Python programming" on
amazon France, it looks great. :)

Thanks


On 19/04/06, w chun <wescpy@[...].com>  wrote:
> 
>  >  f=open("~/.myapp.conf","r")  # but it returns a IOError: [Errno 2] No
>  such
>  > file or directory:
>  >
>  >  How can I do to access this file whatever the user is ?
> 
>  use os.path.expanduser(path)
> 
>  http://www.python.org/doc/2.4.3/lib/module-os.path.html
> 
>  hope this helps!
>  -- wesley
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>  "Core Python Programming", Prentice Hall, (c)2007,2001
>      http://corepython.com
> 
>  wesley.j.chun :: wescpy-at-gmail.com
>  python training and technical consulting
>  cyberweb.consulting : silicon valley, ca
>  http://cyberwebconsulting.com
> 
Thread:
Learner404
Paidhi Aiji
K Weinert
Alan Gauld
Alan Gauld
W Chun
Learner404
W Chun
Matthew White

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved