well not really but understand that if you use double quotes you can have a single quote put in if you use single you can put a double in. -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Alex Hall Sent: Monday, January 18, 2010 11:10 PM To: programmingblind@xxxxxxxxxxxxx Subject: Re: python current path function? There, it seems to be working now; I am not sure how it got fixed, unless there is a difference between single and double quotes in python... Thanks for the help! Have a great day, Alex Email: mehgcap@xxxxxxxxx ----- Original Message ----- From: "Ken Perry" <whistler@xxxxxxxxxxxxx> To: <programmingblind@xxxxxxxxxxxxx> Sent: Monday, January 18, 2010 20:51 Subject: RE: python current path function? > > > > Opps I meant > > os.path.split(blah) > > You really should search out python os and read it. heck any time you > have > this problem m you should search out the module on Google. > > Ken > > -----Original Message----- > From: programmingblind-bounce@xxxxxxxxxxxxx > [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Alex Hall > Sent: Monday, January 18, 2010 8:43 PM > To: programmingblind@xxxxxxxxxxxxx > Subject: Re: python current path function? > > I get a traceback saying "module os has no attribute 'split'". > > > Have a great day, > Alex > Email: mehgcap@xxxxxxxxx > ----- Original Message ----- > From: "Ken Perry" <whistler@xxxxxxxxxxxxx> > To: <programmingblind@xxxxxxxxxxxxx> > Sent: Monday, January 18, 2010 9:25 > Subject: RE: python current path function? > > >> >> do the following >> >> import os >> >> path=os.split(fileNamePath) >> >> >> >> -----Original Message----- >> From: programmingblind-bounce@xxxxxxxxxxxxx >> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Alex Hall >> Sent: Monday, January 18, 2010 6:52 AM >> To: programmingblind@xxxxxxxxxxxxx >> Subject: python current path function? >> >> Hi all, >> I am trying to point python to the currently running script's directory >> so >> it can find an ini file there. I was told to use >> ini=os.path.join(sys.argv[0],'name.ini') >> but that returns the name.ini filename attached to the full path, >> including >> the script name: >> c:\path\file.pyw\file.ini >> >> I want just the path to the script, not the script itself. Also, I think >> I >> need it as a raw string or with double backslashes. How do I do this? >> Thanks! >> >> >> Have a great day, >> Alex >> Email: mehgcap@xxxxxxxxx >> >> __________ >> View the list's information and change your settings at >> //www.freelists.org/list/programmingblind >> >> __________ >> View the list's information and change your settings at >> //www.freelists.org/list/programmingblind >> > > __________ > View the list's information and change your settings at > //www.freelists.org/list/programmingblind > > __________ > View the list's information and change your settings at > //www.freelists.org/list/programmingblind > __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind