Add try/except clause around setting old_argv in case sys.argv is not defined.
Add try/except clause around setting old_argv in case sys.argv is not defined.

sys.argv may not be defined if Python interpreter is embedded in another program.
rmcgibbo/scipy,zaxliu/scipy,lhilt/scipy,perimosocordiae/scipy,Eric89GXL/scipy,trankmichael/scipy,vanpact/scipy,jsilter/scipy,gertingold/scipy,pyramania/scipy,efiring/scipy,zerothi/scipy,FRidh/scipy,kleskjr/scipy,matthewalbani/scipy,mortonjt/scipy,chatcannon/scipy,felipebetancur/scipy,Gillu13/scipy,felipebetancur/scipy,ales-erjavec/scipy,newemailjdm/scipy,minhlongdo/scipy,Stefan-Endres/scipy,Stefan-Endres/scipy,futurulus/scipy,behzadnouri/scipy,niknow/scipy,aarchiba/scipy,bkendzior/scipy,jonycgn/scipy,futurulus/scipy,pbrod/scipy,nmayorov/scipy,ndchorley/scipy,niknow/scipy,nonhermitian/scipy,zxsted/scipy,pnedunuri/scipy,WarrenWeckesser/scipy,jor-/scipy,gef756/scipy,nonhermitian/scipy,juliantaylor/scipy,haudren/scipy,sonnyhu/scipy,richardotis/scipy,jonycgn/scipy,Gillu13/scipy,mgaitan/scipy,gfyoung/scipy,njwilson23/scipy,kleskjr/scipy,newemailjdm/scipy,jakevdp/scipy,befelix/scipy,piyush0609/scipy,zerothi/scipy,njwilson23/scipy,pbrod/scipy,fernand/scipy,larsmans/scipy,niknow/scipy,fredrikw/scipy,Dapid/scipy,zerothi/scipy,WarrenWeckesser/scipy,richardotis/scipy,gertingold/scipy,mingwpy/scipy,zaxliu/scipy,sriki18/scipy,ales-erjavec/scipy,lhilt/scipy,maniteja123/scipy,rmcgibbo/scipy,kalvdans/scipy,endolith/scipy,WarrenWeckesser/scipy,aman-iitj/scipy,arokem/scipy,surhudm/scipy,piyush0609/scipy,arokem/scipy,mingwpy/scipy,mgaitan/scipy,apbard/scipy,andim/scipy,aarchiba/scipy,Dapid/scipy,jseabold/scipy,apbard/scipy,mortonjt/scipy,kalvdans/scipy,niknow/scipy,sauliusl/scipy,ortylp/scipy,dch312/scipy,zxsted/scipy,ortylp/scipy,maniteja123/scipy,newemailjdm/scipy,nmayorov/scipy,dch312/scipy,jjhelmus/scipy,gef756/scipy,kleskjr/scipy,hainm/scipy,woodscn/scipy,haudren/scipy,hainm/scipy,fernand/scipy,vanpact/scipy,gfyoung/scipy,scipy/scipy,anielsen001/scipy,mortada/scipy,ndchorley/scipy,zaxliu/scipy,maciejkula/scipy,lhilt/scipy,fredrikw/scipy,dominicelse/scipy,mikebenfield/scipy,ortylp/scipy,ndchorley/scipy,raoulbq/scipy,aeklant/scipy,gdooper/scipy,aman-iitj/scipy,anntzer/scipy,mhogg/scipy,Stefan-Endres/scipy,futurulus/scipy,mingwpy/scipy,Shaswat27/scipy,e-q/scipy,mortada/scipy,jonycgn/scipy,pyramania/scipy,mingwpy/scipy,aarchiba/scipy,matthew-brett/scipy,Newman101/scipy,gfyoung/scipy,jakevdp/scipy,ilayn/scipy,minhlongdo/scipy,befelix/scipy,sriki18/scipy,ndchorley/scipy,Newman101/scipy,witcxc/scipy,WillieMaddox/scipy,endolith/scipy,Dapid/scipy,josephcslater/scipy,apbard/scipy,andyfaff/scipy,ilayn/scipy,ilayn/scipy,ales-erjavec/scipy,raoulbq/scipy,vigna/scipy,petebachant/scipy,Eric89GXL/scipy,behzadnouri/scipy,Kamp9/scipy,fernand/scipy,argriffing/scipy,person142/scipy,pizzathief/scipy,woodscn/scipy,bkendzior/scipy,efiring/scipy,nmayorov/scipy,mingwpy/scipy,sauliusl/scipy,minhlongdo/scipy,vanpact/scipy,efiring/scipy,pschella/scipy,sonnyhu/scipy,raoulbq/scipy,jor-/scipy,sriki18/scipy,pizzathief/scipy,Shaswat27/scipy,witcxc/scipy,woodscn/scipy,petebachant/scipy,larsmans/scipy,cpaulik/scipy,zerothi/scipy,giorgiop/scipy,anielsen001/scipy,dominicelse/scipy,ogrisel/scipy,minhlongdo/scipy,giorgiop/scipy,jonycgn/scipy,ChanderG/scipy,ilayn/scipy,kleskjr/scipy,niknow/scipy,mikebenfield/scipy,gdooper/scipy,mhogg/scipy,futurulus/scipy,andyfaff/scipy,vhaasteren/scipy,aman-iitj/scipy,mgaitan/scipy,e-q/scipy,jor-/scipy,sriki18/scipy,sonnyhu/scipy,mgaitan/scipy,maniteja123/scipy,pizzathief/scipy,pnedunuri/scipy,felipebetancur/scipy,kleskjr/scipy,gfyoung/scipy,Srisai85/scipy,sauliusl/scipy,fernand/scipy,sriki18/scipy,richardotis/scipy,grlee77/scipy,josephcslater/scipy,dominicelse/scipy,hainm/scipy,arokem/scipy,rgommers/scipy,lukauskas/scipy,sauliusl/scipy,andyfaff/scipy,perimosocordiae/scipy,aeklant/scipy,andim/scipy,scipy/scipy,ortylp/scipy,jakevdp/scipy,pnedunuri/scipy,sonnyhu/scipy,WillieMaddox/scipy,njwilson23/scipy,mortonjt/scipy,aman-iitj/scipy,jor-/scipy,rgommers/scipy,chatcannon/scipy,ogrisel/scipy,vberaudi/scipy,Stefan-Endres/scipy,rmcgibbo/scipy,WillieMaddox/scipy,mtrbean/scipy,maniteja123/scipy,gfyoung/scipy,woodscn/scipy,trankmichael/scipy,jseabold/scipy,jsilter/scipy,ndchorley/scipy,mortada/scipy,mdhaber/scipy,larsmans/scipy,WarrenWeckesser/scipy,njwilson23/scipy,haudren/scipy,dch312/scipy,lukauskas/scipy,vberaudi/scipy,pbrod/scipy,juliantaylor/scipy,surhudm/scipy,pschella/scipy,Srisai85/scipy,zaxliu/scipy,gef756/scipy,Kamp9/scipy,jseabold/scipy,felipebetancur/scipy,maciejkula/scipy,vigna/scipy,Newman101/scipy,fredrikw/scipy,richardotis/scipy,nvoron23/scipy,apbard/scipy,rmcgibbo/scipy,ChanderG/scipy,gef756/scipy,rmcgibbo/scipy,ChanderG/scipy,aarchiba/scipy,njwilson23/scipy,Gillu13/scipy,hainm/scipy,mortonjt/scipy,sonnyhu/scipy,anielsen001/scipy,FRidh/scipy,gdooper/scipy,argriffing/scipy,tylerjereddy/scipy,matthew-brett/scipy,zxsted/scipy,kalvdans/scipy,nonhermitian/scipy,gef756/scipy,cpaulik/scipy,mhogg/scipy,matthew-brett/scipy,giorgiop/scipy,haudren/scipy,jjhelmus/scipy,arokem/scipy,piyush0609/scipy,lhilt/scipy,mgaitan/scipy,mdhaber/scipy,futurulus/scipy,matthewalbani/scipy,Stefan-Endres/scipy,nmayorov/scipy,befelix/scipy,gertingold/scipy,gef756/scipy,felipebetancur/scipy,Kamp9/scipy,andim/scipy,mdhaber/scipy,WarrenWeckesser/scipy,larsmans/scipy,mortada/scipy,e-q/scipy,jamestwebber/scipy,maciejkula/scipy,zaxliu/scipy,mdhaber/scipy,jjhelmus/scipy,tylerjereddy/scipy,josephcslater/scipy,bkendzior/scipy,andim/scipy,person142/scipy,matthew-brett/scipy,trankmichael/scipy,pbrod/scipy,zxsted/scipy,behzadnouri/scipy,perimosocordiae/scipy,vigna/scipy,rmcgibbo/scipy,gdooper/scipy,pyramania/scipy,vanpact/scipy,maciejkula/scipy,piyush0609/scipy,behzadnouri/scipy,jjhelmus/scipy,minhlongdo/scipy,Newman101/scipy,minhlongdo/scipy,pnedunuri/scipy,mhogg/scipy,nvoron23/scipy,Shaswat27/scipy,anntzer/scipy,WillieMaddox/scipy,Srisai85/scipy,befelix/scipy,mortonjt/scipy,Gillu13/scipy,chatcannon/scipy,mtrbean/scipy,andyfaff/scipy,newemailjdm/scipy,dominicelse/scipy,perimosocordiae/scipy,mhogg/scipy,anielsen001/scipy,aarchiba/scipy,pbrod/scipy,njwilson23/scipy,ilayn/scipy,Kamp9/scipy,jamestwebber/scipy,richardotis/scipy,chatcannon/scipy,jseabold/scipy,jseabold/scipy,vhaasteren/scipy,FRidh/scipy,juliantaylor/scipy,jsilter/scipy,anntzer/scipy,josephcslater/scipy,pizzathief/scipy,WillieMaddox/scipy,pnedunuri/scipy,vberaudi/scipy,aeklant/scipy,anielsen001/scipy,efiring/scipy,jonycgn/scipy,mtrbean/scipy,nonhermitian/scipy,FRidh/scipy,matthewalbani/scipy,anielsen001/scipy,ChanderG/scipy,rgommers/scipy,FRidh/scipy,rgommers/scipy,chatcannon/scipy,sauliusl/scipy,WarrenWeckesser/scipy,Gillu13/scipy,pbrod/scipy,jamestwebber/scipy,niknow/scipy,pschella/scipy,vhaasteren/scipy,Srisai85/scipy,mortada/scipy,vberaudi/scipy,apbard/scipy,e-q/scipy,jsilter/scipy,mhogg/scipy,haudren/scipy,cpaulik/scipy,argriffing/scipy,gdooper/scipy,lukauskas/scipy,jor-/scipy,Dapid/scipy,Srisai85/scipy,FRidh/scipy,juliantaylor/scipy,josephcslater/scipy,petebachant/scipy,ales-erjavec/scipy,jsilter/scipy,Newman101/scipy,Dapid/scipy,fernand/scipy,arokem/scipy,kleskjr/scipy,zaxliu/scipy,lukauskas/scipy,pschella/scipy,sriki18/scipy,vigna/scipy,person142/scipy,jseabold/scipy,witcxc/scipy,aman-iitj/scipy,aeklant/scipy,jonycgn/scipy,bkendzior/scipy,rgommers/scipy,fernand/scipy,andyfaff/scipy,nvoron23/scipy,mtrbean/scipy,pyramania/scipy,gertingold/scipy,Eric89GXL/scipy,endolith/scipy,cpaulik/scipy,chatcannon/scipy,tylerjereddy/scipy,e-q/scipy,larsmans/scipy,mdhaber/scipy,ales-erjavec/scipy,grlee77/scipy,vanpact/scipy,WillieMaddox/scipy,mingwpy/scipy,behzadnouri/scipy,kalvdans/scipy,fredrikw/scipy,Dapid/scipy,Eric89GXL/scipy,tylerjereddy/scipy,vberaudi/scipy,Kamp9/scipy,befelix/scipy,pnedunuri/scipy,zerothi/scipy,witcxc/scipy,haudren/scipy,ortylp/scipy,woodscn/scipy,zxsted/scipy,aeklant/scipy,scipy/scipy,perimosocordiae/scipy,andyfaff/scipy,pschella/scipy,anntzer/scipy,mikebenfield/scipy,fredrikw/scipy,argriffing/scipy,giorgiop/scipy,ogrisel/scipy,jakevdp/scipy,newemailjdm/scipy,matthewalbani/scipy,grlee77/scipy,behzadnouri/scipy,perimosocordiae/scipy,Stefan-Endres/scipy,trankmichael/scipy,Kamp9/scipy,futurulus/scipy,sonnyhu/scipy,vhaasteren/scipy,person142/scipy,Shaswat27/scipy,tylerjereddy/scipy,ortylp/scipy,cpaulik/scipy,ales-erjavec/scipy,efiring/scipy,jamestwebber/scipy,petebachant/scipy,woodscn/scipy,lukauskas/scipy,piyush0609/scipy,aman-iitj/scipy,scipy/scipy,juliantaylor/scipy,hainm/scipy,mikebenfield/scipy,matthew-brett/scipy,larsmans/scipy,felipebetancur/scipy,mortada/scipy,raoulbq/scipy,mtrbean/scipy,nonhermitian/scipy,mtrbean/scipy,mgaitan/scipy,anntzer/scipy,jamestwebber/scipy,nvoron23/scipy,ndchorley/scipy,maniteja123/scipy,grlee77/scipy,grlee77/scipy,matthewalbani/scipy,scipy/scipy,vberaudi/scipy,maciejkula/scipy,petebachant/scipy,vanpact/scipy,piyush0609/scipy,kalvdans/scipy,zerothi/scipy,giorgiop/scipy,surhudm/scipy,argriffing/scipy,lhilt/scipy,richardotis/scipy,Gillu13/scipy,hainm/scipy,surhudm/scipy,nvoron23/scipy,dominicelse/scipy,petebachant/scipy,endolith/scipy,Shaswat27/scipy,vhaasteren/scipy,surhudm/scipy,andim/scipy,witcxc/scipy,ogrisel/scipy,argriffing/scipy,scipy/scipy,fredrikw/scipy,pizzathief/scipy,Newman101/scipy,dch312/scipy,sauliusl/scipy,efiring/scipy,ogrisel/scipy,ilayn/scipy,jjhelmus/scipy,trankmichael/scipy,Eric89GXL/scipy,bkendzior/scipy,newemailjdm/scipy,gertingold/scipy,ChanderG/scipy,lukauskas/scipy,surhudm/scipy,anntzer/scipy,andim/scipy,Shaswat27/scipy,giorgiop/scipy,raoulbq/scipy,nmayorov/scipy,cpaulik/scipy,vhaasteren/scipy,trankmichael/scipy,dch312/scipy,jakevdp/scipy,nvoron23/scipy,ChanderG/scipy,raoulbq/scipy,vigna/scipy,pyramania/scipy,Eric89GXL/scipy,mdhaber/scipy,mortonjt/scipy,zxsted/scipy,endolith/scipy,person142/scipy,Srisai85/scipy,endolith/scipy,maniteja123/scipy,mikebenfield/scipy