[Tutor] Assessing local variable outside function

2016-10-28 Thread nils wagenaar
Hello, Could i use a variable defined in a function in another function? I have now: def DatasetToSubset(file, LatUpbound, LatLowBound, LonUpBound, LonLowBound): nc=netCDF4.Dataset(file) lats=nc.variables['lat'][:]; lons=nc.variables['lon'][:] latselect=np.logical_and(lats > Lat

Re: [Tutor] comp.lang.python on gmane

2016-10-28 Thread Random832
On Thu, Oct 27, 2016, at 20:40, Jim Byrnes wrote: > Is comp.lang.python available on gmane? > > I've googled and found references to it being on gmane but I can't find > it there. I'd like to use gmane because Comcast doesn't do usenet > anymore. I don't know about the current viability of gmane

Re: [Tutor] Assessing local variable outside function

2016-10-28 Thread Alan Gauld via Tutor
On 28/10/16 02:38, nils wagenaar wrote: > Hello, > > > Could i use a variable defined in a function in another function? By returning it to the caller. > def DatasetToSubset(file, LatUpbound, LatLowBound, LonUpBound, LonLowBound): > nc=netCDF4.Dataset(file) > lats=nc.variables['lat'][

Re: [Tutor] Assessing local variable outside function

2016-10-28 Thread Peter Otten
nils wagenaar wrote: > Hello, > > > Could i use a variable defined in a function in another function? > > I have now: > > > def DatasetToSubset(file, LatUpbound, LatLowBound, LonUpBound, > LonLowBound): > nc=netCDF4.Dataset(file) > lats=nc.variables['lat'][:]; lons=nc.variables['lon

Re: [Tutor] Assessing local variable outside function

2016-10-28 Thread Ben Finney
Alan Gauld via Tutor writes: > On 28/10/16 02:38, nils wagenaar wrote: > > Could i use a variable defined in a function in another function? My answer would be: You can't because Python variables don't exist outside their namespace. You can make the object available in various ways, but not the

Re: [Tutor] comp.lang.python on gmane

2016-10-28 Thread Jim Byrnes
On 10/27/2016 09:54 PM, Random832 wrote: On Thu, Oct 27, 2016, at 20:40, Jim Byrnes wrote: Is comp.lang.python available on gmane? I've googled and found references to it being on gmane but I can't find it there. I'd like to use gmane because Comcast doesn't do usenet anymore. I don't know ab

Re: [Tutor] comp.lang.python on gmane

2016-10-28 Thread Danny Yoo
>>> >>> Is comp.lang.python available on gmane? >>> >>> I've googled and found references to it being on gmane but I can't find >>> it there. I'd like to use gmane because Comcast doesn't do usenet >>> anymore. >> >> >> I don't know about the current viability of gmane in general, but it's >> calle

Re: [Tutor] comp.lang.python on gmane

2016-10-28 Thread Danny Yoo
Ah. The wiki link does point to the expected place after all. I think, then, that the initial assessment is accurate, that Gmane is still recovering their archives, and that eventually the link will work again. ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] Assessing local variable outside function

2016-10-28 Thread nils wagenaar
Thank you all! It is clear now:) Verstuurd vanaf mijn iPhone > Op 28 okt. 2016 om 19:31 heeft Ben Finney het > volgende geschreven: > > Alan Gauld via Tutor writes: > >>> On 28/10/16 02:38, nils wagenaar wrote: >>> Could i use a variable defined in a function in another function? > > My ans

Re: [Tutor] run local script on a remote machine

2016-10-28 Thread Steven D'Aprano
If you're trying to do remote command execution, you should forget about rolling your own, and use a well-established RPC solution. I can recommend either of pyro or rpyc: https://pypi.python.org/pypi/Pyro4 https://pypi.python.org/pypi/rpyc If you need a standard library solution, you can try: