[Tutor] Virtual environment can't find uno

2018-06-13 Thread Jim
Running Linux Mint 18. I have python 3.6 running in a virtual environment. I want to use a package called oosheet to work with libreoffice calc. When I try to import it I get the following error: >>> import oosheet Traceback (most recent call last): File "", line 1, in File "/home/jfb/EVs

Re: [Tutor] Import module function using variable

2018-06-13 Thread Slater, Joseph C.
> On Jun 13, 2018, at 3:37 AM, Peter Otten <__pete...@web.de> wrote: > > Slater, Joseph C. wrote: > >> Dear friends, >> >> I am trying to import a function in a module by variable name. The >> specific example is that my function allows the user to select which >> function my code will use (i

Re: [Tutor] Import module function using variable

2018-06-13 Thread Mats Wichmann
On 06/13/2018 08:35 AM, Mats Wichmann wrote: > On 06/13/2018 01:37 AM, Peter Otten wrote: >> Slater, Joseph C. wrote: >> >>> Dear friends, > > as others have said, I'll also say: your problem statement is fuzzy. Sorry folks, this was obviously in reply to a different thread, operator error! ([Tut

Re: [Tutor] Import module function using variable

2018-06-13 Thread Mats Wichmann
On 06/13/2018 01:37 AM, Peter Otten wrote: > Slater, Joseph C. wrote: > >> Dear friends, as others have said, I'll also say: your problem statement is fuzzy. if your data looks like this: > d23 87 9 NA 67 5 657 NA 76 8 87 78 90 800 > er 21 8 908 9008 9 7 5 46 3 5 757 7 5 is it meaningful that

Re: [Tutor] tab separated file handling

2018-06-13 Thread Neil Cerutti
On 2018-06-13, Niharika Jakhar wrote: > hi everyone! > I am working with a tsv file which has NA and empty values. > I have used csv package to make a list of list of the data. > I want to remove NA and empty values. Should the the data 40 50 NA 12 mean the same thing as 40 50 12? -- Neil Cerut

Re: [Tutor] tab separated file handling

2018-06-13 Thread Peter Otten
Niharika Jakhar wrote: > hi everyone! > I am working with a tsv file which has NA and empty values. > I have used csv package to make a list of list of the data. > I want to remove NA and empty values. > > This is what I wrote: > > > #removes row with NA values > for rows in self.datali

Re: [Tutor] tab separated file handling

2018-06-13 Thread Joel Goldstick
On Wed, Jun 13, 2018 at 6:03 AM, Niharika Jakhar wrote: > hi everyone! > I am working with a tsv file which has NA and empty values. > I have used csv package to make a list of list of the data. > I want to remove NA and empty values. > > This is what I wrote: > > > #removes row with NA values >

[Tutor] tab separated file handling

2018-06-13 Thread Niharika Jakhar
hi everyone! I am working with a tsv file which has NA and empty values. I have used csv package to make a list of list of the data. I want to remove NA and empty values. This is what I wrote: #removes row with NA values for rows in self.dataline: for i in rows:

Re: [Tutor] Import module function using variable

2018-06-13 Thread Peter Otten
Slater, Joseph C. wrote: > Dear friends, > > I am trying to import a function in a module by variable name. The > specific example is that my function allows the user to select which > function my code will use (in this case, which optimizer in scipy). There > is a default for a named variable. I

Re: [Tutor] Import module function using variable

2018-06-13 Thread Alan Gauld via Tutor
On 13/06/18 02:52, Slater, Joseph C. wrote: > I am trying to import a function in a module by variable name. I'd suggest getattr(): >>> import sys >>> xt = getattr(sys,exit) >>> xt() Alternatively, if its a fixed set of options (and it sound as if it is) set up a dictionary: funcs = {'exit':

[Tutor] Import module function using variable

2018-06-13 Thread Slater, Joseph C.
Dear friends, I am trying to import a function in a module by variable name. The specific example is that my function allows the user to select which function my code will use (in this case, which optimizer in scipy). There is a default for a named variable. I have thing working in a quite uncl