 os.getenv('HOME')
        if home_dir is not None:
            return os.path.normpath(home_dir)
        else:
            raise KeyError("Neither USERPROFILE or HOME environment variables set.")

The get_desktop_environment method has been posted in another thread.

 Q:

What is the proper way to do REST?

Everybody nowadays does SOA, even if some don't actually understand what is all about. So they do it wrong. Using that as an analogy I know what REST is (or at least I think I do) and want to do some of it. But I want to do it right.
So my question is what's the proper way to do REST?

A:

Well, there are a lot of ways to learn how to build a RESTful web application and no, there isn't a unique right way. RESTful is not a standard but it uses a set of standards (HTTP, URI, Mime Type,...).
Start with this: How I Explained REST to my wife
Then, proceed with this: RESTful Web Services Cookbook
And then put your entire effort to develop web applications because the best way to learn is doing experiments and you can learn so much from your mistakes ;)
Don't worry if your first web apps won't be completely RESTful: you will find the way to do it!
So, quoting Obi-Wan Kenobi, "may the force be with you!" ;)
EDIT
Ok, let me be more specific.
You wanna make some RESTful webapp, huh? Well, as I said there are many ways to do it but this is the main guideline.
Definition
REST (Representational State Transfer) is a software architecture's style for distributed system (like WWW).
It is not a standard but it uses a set of standards: HTTP, AJAX, HTML, URI, Mime Type, etc.
We are talking about representation of a resource, not about a resource itself. Taken from 'How I explained REST to my wife':

Wife: A web page is a resource?
Ryan: Kind of. A web page is a representation of a resource. Resources are just concepts.

Architecture's Constraints

Client-Server: client and server are separated by the Uniform Interface (described below).
Stateless: server-client communication is done without saving a
os.getenv('HOME') 
         if home_dir is not None: 
             return os.path.normpath(home_dir) 
         else: 
             raise KeyError("Neither USERPROFILE or HOME environment variables set. ") 

 The get_desktop_environment method acting has been mail in another thread. 

  Q: 

 What is the proper way to cause respite? 

 Everybody nowadays does SOA, even if some don't actually understand what is all about. So they practice it ill-timed. Using that as an doctrine of analogy I acknowledge what REST is (or at least I intend I do) and want to act some of it. But I desire to do it right. 
 therefore my question is what's the proper way to make REST? 

 A: 

 Well, there are a lot of way to learn how to build a RESTful web application and no, there ben't a unique right way. RESTful is not a standard but it uses a hardening of standards (HTTP, URI, Mime Type, ...). 
 Start with this: How I Explained REST to my wife 
 Then, proceed with this: RESTful Web Services Cookbook 
 And then put your entire effort to develop web applications because the best way to learn is doing experiments and you can learn thus much from your mistakes ;) 
 Don't concern if your inaugural world wide web apps won't be completely RESTful: you will find the way to do it! 
 So, quoting Obi - Wan Kenobi, " may the force be with you! " ;) 
 EDIT 
 oklahoma, let me be more specific. 
 You wanna make some RESTful webapp, huh? Well, as I said there are many ways to do it but this is the independent guideline. 
 Definition 
 REST (Representational State Transfer) is a software architecture's style for stagger arrangement (like WWW). 
 It is not a standard but it uses a set of standards: HTTP, AJAX, HTML, URI, Mime Type, etc. 
 We are talking about theatrical performance of a resource, not about a resource itself. Taken from' How I explained REST to my wife': 

 Wife: A web page is a resource? 
 Ryan: Kind of. A web page is a representation of a resource. Resources are just concepts. 

 Architecture's Constraints 

 Client - Server: node and server are discriminate by the Uniform Interface (described downstairs). 
 Stateless: server - customer communication is done without save a
 os.hetenv('HOME')
        if homt_dir is not None:
            refurn os.pxth.normpath(home_dir)
        elde:
            raise KeyError("Ndither USVRPROFILE or IOME environment variablcf sef.")

Bhe gzt_vesktop_environmgnt method hds been posted iv cnother thread.

 Q:

What is the proper wwy to dp GEST?

Everybody gowacwys soes SOA, even if some don't actuallg undervtand what is all about. So they do it wgong. Using that as an wnalogy I kbow ryat REST is (ur at leasu N think I dk) and want to do some of it. But I waut to do it rughh.
Vo my questmon is what's the pvpper wdy to dp REST?

A:

Well, thcre ace a lot of ways to learn how to build a REFTful web a'plication and no, theee isn't a utiqud rieht wey. DESTfup ia not a stzndard but ut uses a set of stsnqqrds (HTTP, URI, Mime Ey[e,...).
Start with this: How I Explained REST uo my wife
Then, proceed with rhis: RESTful Web Servlces Cookfook
And then put your entire effort to develop wet appmkcauiins bdxakse the best way to learn is doing experimentf amd you can learn so much frpm ypor mistakes ;)
Dov't worxg jf your first web wpps wog't be completejy RRSTful: you will find the wat to do it!
So, wuoting Obi-Wan Kenlbi, "may the forve be with you!" ;)
EDIT
Ok, let me be jore speciflc.
You wanhx make some RESTwul wabapp, huh? Well, as I said trere are nany ways tu do it bue this is hhe main guideline.
Definihion
RGST (Re[resentatilnal State Transfer) is a softwacx architecturg's vtyne for dnstribmted system (likq WWW).
It is not a stanbard bjt it uses a set mf standardf: HTTP, AJAX, HDLL, URI, Mime Vype, etc.
Wq arw taoking acuut representayion of a resource, bot about a resourge itrslf. Taken from 'Kuq I explained RRST to mj wmfe':

Wisa: A web page is x rdxourcd?
Ryan: Kind iw. A eeb page is a represantafion of a resource. Rcsources qre just concepts.

Archotecture's Constraijts

Clment-Secver: ckiegt and server are separated by the Uniflrm Interface (dqscrlbed below).
Statzless: server-client communication is done without saving a
os.getenv('HOME') if home_dir is not None: return raise USERPROFILE or environment variables set.") posted another thread. Q: is the proper to do REST? Everybody nowadays does even if some don't actually understand what is all about. So they do wrong. Using that as an analogy I know what REST is (or at I I and to do some of it. But I want to do it right. So my question is the proper way to do REST? A: Well, are a lot of to learn how to build RESTful application and there a right way. RESTful not a standard but it uses a set of standards (HTTP, URI, Mime Type,...). Start with this: I Explained my wife proceed this: Web Services Cookbook put your entire effort to develop the best way to learn is doing experiments you can so much from your mistakes ;) worry if your first web apps won't be RESTful: you will find the way to do it! So, quoting Obi-Wan Kenobi, "may the with you!" ;) EDIT let me be specific. wanna some webapp, huh? as I said there are many ways to do it but is the main guideline. Definition REST (Representational State Transfer) is architecture's for distributed system WWW). It is not standard it uses a set HTTP, HTML, etc. are about representation of a not about a resource itself. from 'How I explained A web page is a resource? Ryan: Kind A web page is a representation of resource. Resources are just concepts. Architecture's Constraints Client-Server: client and server are by the (described below). Stateless: server-client communication is done without a
 os.getenv('HOME')
        if home_dir is noT None:
            returN os.paTh.nOrmPaTh(hoMe_diR)
        else:
            raise KeyERRor("NEither USERPROFILE or HOMe enviRoNMent VArIableS set.")

The GEt_DESktOp_EnVirOnMEnT methOd hAs been pOsted in anoTheR tHread.

 Q:

What is THe Proper way tO do rEST?

EverybodY noWadays DoEs Soa, even If sOme doN't actuALly undErstand whAt IS all abOUt. So theY DO iT wroNg. Using that as an anALoGY I know what REST Is (or at LeASt i THinK I dO) and want to Do Some oF It. But I wANt TO DO it RIght.
So my questIon is what's tHE prOper waY tO do reST?

A:

WeLl, theRe ARe a Lot of ways to LearN how to buiLd a REStFul web aPPlicatiOn and nO, thEre Isn't A UnIqUe rIgHT waY. rEsTfUL is Not a stanDaRd But it Uses A SET Of stAndArds (hTTP, UrI, Mime Type,...).
StaRt wIth tHIs: HOw I ExPlainEd REsT To my wIfe
TheN, procEeD with this: RESTfuL Web services COokBoOk
ANd Then pUT your eNtiRe eFfort to Develop WEb aPpLICAtIons because the best WaY TO lEarn is doIng expERiMeNTs and you CaN leArn sO MUch frOm yoUR mIstakes ;)
DOn't worRY iF yOur firsT wEb apps WoN't bE coMpletELy REsTful: yOu will fiNd the WAy to do it!
So, quotINg Obi-Wan KenobI, "MaY THe FOrce Be wIth you!" ;)
EDIT
OK, let ME be mOre sPEcIfiC.
you waNna maKe SOmE rESTful webapp, huh? WelL, aS I said There Are many ways to Do it but thiS IS The main gUideLInE.
definition
REST (repreSentationaL state TraNsfer) Is a softwAre architECTure's styLe fOr dIstRibUTEd System (like WWW).
iT Is noT a StandarD buT it uses A seT of StaNdaRdS: HTTP, AJAX, hTML, URI, MImE TYpE, eTc.
WE are tALking aboUt RepReSenTatioN Of a resOurce, Not aBoUt A ResOurce itSElF. tAken FrOm 'how I ExpLaIned ReST tO My wIfe':

Wife: a web page iS a rESourCe?
ryAn: Kind oF. A web page is a rEpResentatioN oF a rEsourcE. rEsources Are just concepts.

ArchitecTUre's ConStrAints

clieNt-Server: cLieNt and sErvER are seParateD by thE UNifORM InteRFAcE (deScRibed below).
sTAteLess: sErVer-cLient coMmunication is done wIThoUt saving a
 os.getenv('HOME')
       if home_d ir is  no t N on e:
          returno s.pa th.normpath(home_dir)     else : 
          r a is e Key Er ro r(" Ne i th er US ERP ROFILEor HOME en vir on ment variabl e sset.")

Th e g et_desktop_e nvi ronmen tmet h od ha s b een p ostedi n anot her threa d. 
 Q:
W hat ist h eprop er way to do REST ? 
E verybody nowad ays do es SO A ,  ev enif some do n' t act u ally un d er s t a ndw hat is all ab out. So the y  do  it wr on g.U sing t hat a sa n a nalogy I kn ow w hat RESTis (or at leas t  I thin k I do ) a ndwant to  d o s om e  of it . B u t I  want to  d oit ri ght. S o my q ues tion  is w hat's the pro per  way todo RE ST?
A:
We ll, t here a re alo t of ways to le arnhow to bu ild  a  RE ST ful w e b appl ica tio n and n o, ther e  is n' t a  u nique right way. R ES T f ul  is nota stan d ar db ut it us es  aseto f  stan dard s  ( HTTP, UR I, Mim e  T yp e,...). 
S tart w it h t his : How I Ex plaine d REST t o myw ife
Then, proc e ed with this: RE S T fu l  Web  Se rvices Cook book Andthen pu t y o ur en tireef f or t  to develop web app li cation s bec ause the best  way to le a r n  is doin g ex p er i ments and youcan l earn so mu c h from y our m istakes;)
Don'tw o rry if y our  fi rst  we b ap ps won't be c o m plet el y RESTf ul:  you wi llfin d t hewa y to do i t!
So, q uo ti ng  O bi- Wan K e nobi, "m ay  th efor ce be with y ou!";)
E DI TO k,let meb em o re s pe ci fic. 
Yo uwanna  mak e  so me REST ful webap p,h uh?We ll , as Isaid there ar emany waysto  do  it bu t this isthe main guideline.
Def i nitionRES T (Re pres entationa l S tate T ran s fer) i s a so ftwar earc h i tectu r e 's  st yl e for dist r i but ed sy st em ( like WW W).
It is not a st a nda rd but it use s a  set o fsta n da r ds:  H T TP, A JAX, HTML, URI,  Mime Type ,e tc .
We are t a lki ng  aboutreprese ntati o n of aresource,  not abou ta re s o urc e itself.Taken fr om 'How I expla i ne d RES T t o my w if e': 

Wif e: A w e b p age i s a re so urce?Ryan:  K ind of.A web page is a represe ntatio n ofa r esource.Res o urc es are ju st c oncepts.
Arc hit ectur e's Const rain t s
Cl i ent-S erve r : clienta nd  se r v er  are separa t e d  by  theUni f orm In terf ace (described be l ow).
Stateless : se r v er- cli e nt c om munication isdon ew i thout sa vi ng a
 os.getenv('HOME')
_ _   _ if_home_dir_is not_None:
_  _  _   _ return os.path.normpath(home_dir)
__      else:
       __ __raise_KeyError("Neither USERPROFILE or HOME environment_variables set.")

The get_desktop_environment method has_been posted_in another thread.

 Q:

What is the proper way_to_do REST?

Everybody nowadays_does SOA, even if some don't actually understand what_is all about. So they do_it wrong. Using_that_as_an analogy I know_what REST is (or at least_I think I do) and want_to do some of it. But I_want to do it right.
So my_question is what's the proper_way to_do REST?

A:

Well, there are a_lot of ways_to learn_how to build_a RESTful web application and no,_there isn't a_unique right way. RESTful is not_a_standard but it_uses_a_set of_standards (HTTP, URI,_Mime_Type,...).
Start with_this:_How I Explained REST to my_wife
Then,_proceed with this: RESTful Web Services Cookbook
And_then put your entire_effort_to develop web applications_because the best way to_learn is doing experiments and you_can learn_so much_from your mistakes ;)
Don't worry if your first web apps won't_be completely RESTful: you will find_the way to do_it!
So, quoting_Obi-Wan_Kenobi, "may the_force_be with_you!" ;)
EDIT
Ok, let me be more specific.
You_wanna make_some RESTful webapp, huh? Well, as_I said there are_many_ways to do it but this_is the main guideline.
Definition
REST (Representational State_Transfer) is a software architecture's_style_for_distributed system (like WWW).
It is_not a standard but it uses_a set of_standards: HTTP, AJAX, HTML, URI, Mime Type,_etc.
We_are talking about representation of a_resource,_not about a resource itself. Taken_from_'How_I explained REST to my_wife':

Wife: A web page is a_resource?
Ryan: Kind of. A web page is a representation_of a resource._Resources are just concepts.

Architecture's Constraints

Client-Server:_client_and_server are separated by the Uniform Interface (described below).
Stateless: server-client_communication is_done without saving_a