Re: Getting file extensions [linux fs]

2019-03-30 Thread Paulo da Silva
Às 22:18 de 28/03/19, Cameron Simpson escreveu: > On 28Mar2019 01:12, Paulo da Silva wrote: >> Às 23:09 de 27/03/19, Cameron Simpson escreveu: ... > > Oh, just tangential to this. > > If you were doing this ad hoc, yes calling the filefrag executable is > very expensive. But if you are always d

Re: Library for parsing binary structures

2019-03-30 Thread Cameron Simpson
On 30Mar2019 10:29, Paul Moore wrote: On Fri, 29 Mar 2019 at 23:21, Cameron Simpson wrote: On 27Mar2019 18:41, Paul Moore wrote: >I'm looking for a library that lets me parse binary data structures. >The stdlib struct module is fine for simple structures, but when it >gets to more complicate

Re: Syntax for one-line "nonymous" functions in "declaration style"

2019-03-30 Thread Ian Kelly
On Sat, Mar 30, 2019, 5:32 AM Alexey Muranov wrote: > > On ven., Mar 29, 2019 at 4:51 PM, python-list-requ...@python.org wrote: > > > > There could perhaps be a special case for lambda expressions such > > that, > > when they are directly assigned to a variable, Python would use the > > variable

Re: Why do I need to use pip3 but not pip

2019-03-30 Thread Peter J. Holzer
On 2019-03-30 15:57:55 +0530, Arup Rakshit wrote: > This is awesome. Now where should I put my source code? I see many folders > into it. You don't. In my opinion virtual environments should be expendable: You can destroy and recreate them at will. That leaves two possibilies: 1) Use a "central

Re: Syntax for one-line "nonymous" functions in "declaration style"

2019-03-30 Thread Alexey Muranov
On ven., Mar 29, 2019 at 4:51 PM, python-list-requ...@python.org wrote: On Thu, Mar 28, 2019 at 2:30 PM Alexey Muranov  wrote: On jeu., mars 28, 2019 at 8:57 PM, Terry Reedy wrote: > Throwing the name away is foolish. Testing functions is another > situation in which function names

Re: Python-list Digest, Vol 186, Issue 31

2019-03-30 Thread Alexey Muranov
On ven., Mar 29, 2019 at 4:51 PM, python-list-requ...@python.org wrote: On Thu, Mar 28, 2019 at 2:30 PM Alexey Muranov wrote: On jeu., mars 28, 2019 at 8:57 PM, Terry Reedy wrote: > Throwing the name away is foolish. Testing functions is another > situation in which function names are

Re: Library for parsing binary structures

2019-03-30 Thread Paul Moore
On Fri, 29 Mar 2019 at 23:21, Cameron Simpson wrote: > > On 27Mar2019 18:41, Paul Moore wrote: > >I'm looking for a library that lets me parse binary data structures. > >The stdlib struct module is fine for simple structures, but when it > >gets to more complicated cases, you end up doing a lot o

Re: Why do I need to use pip3 but not pip

2019-03-30 Thread Arup Rakshit
Hi Peter, This is awesome. Now where should I put my source code? I see many folders into it. Thanks, Arup Rakshit a...@zeit.io > On 30-Mar-2019, at 3:26 PM, Peter Otten <__pete...@web.de> wrote: > > Arup Rakshit wrote: > >> Hello All, >> >> Thanks I got it now. >> >> One related questi

Re: Why do I need to use pip3 but not pip

2019-03-30 Thread Peter Otten
Arup Rakshit wrote: > Hello All, > > Thanks I got it now. > > One related question: Can I use pip3 for example to install packages > project specific, but not globally? So that when I delete the project, all > of them gone also from my disk. For that you can create a "virtual environment": $ p

Re: Why do I need to use pip3 but not pip

2019-03-30 Thread Arup Rakshit
Hello All, Thanks I got it now. One related question: Can I use pip3 for example to install packages project specific, but not globally? So that when I delete the project, all of them gone also from my disk. Thanks, Arup Rakshit a...@zeit.io > On 30-Mar-2019, at 2:05 PM, Cameron Simpson

Re: Understanding the MRO with multiple inheritance

2019-03-30 Thread Chris Angelico
On Sat, Mar 30, 2019 at 7:08 PM Arup Rakshit wrote: > > Thanks Chris and Dieter. I think I got it. It seems it follows the __mro__ of > the caller class, not the current class __mro_. That is correct. It is the object that has an MRO, and it's that object's MRO that matters to super. ChrisA --

Re: Why do I need to use pip3 but not pip

2019-03-30 Thread Nagy László Zsolt
  Hello, It depends on the operating system. For example on Ubuntu, the default python version is still 2.7. When you install both python2.7 and python3 on a system, then usually the "pip" will be a symlink to pip version 2 or 3. The default python interpreter can be different on different system

Re: Why do I need to use pip3 but not pip

2019-03-30 Thread Cameron Simpson
On 30Mar2019 13:50, Arup Rakshit wrote: When I read this https://pip.pypa.io/en/stable/installing/ it says I have the pip installed when I installed the python from official doc. But when I run the `pip` command from shell, I get error, but pip3 works. ~/python_playground ▶ pip --version zs

Why do I need to use pip3 but not pip

2019-03-30 Thread Arup Rakshit
Hi, When I read this https://pip.pypa.io/en/stable/installing/ it says I have the pip installed when I installed the python from official doc. But when I run the `pip` command from shell, I get error, but pip3 works. ~/python_playground

Re: Understanding the MRO with multiple inheritance

2019-03-30 Thread Arup Rakshit
Thanks Chris and Dieter. I think I got it. It seems it follows the __mro__ of the caller class, not the current class __mro_. if __name__ == '__main__': print('MRO of SortedIntList {}'.format(SortedIntList.__mro__)) print('MRO of IntList {}'.format(IntList.__mro__)) # MRO of SortedIntLi