PyOBEX installation problem

2020-09-22 Thread Johny
I tried to install PyOBEX see the log below C:\Users\expor\Downloads\OBEX>setup.py install running install running bdist_egg running egg_info writing PyOBEX.egg-info\PKG-INFO writing top-level names to PyOBEX.egg-info\top_level.txt writing dependency_links to PyOBEX.egg-info\dependency_links.txt

Question from a "java background" developer

2020-09-22 Thread Agnese Camellini
Hello to everyone, I have a question. I come from a Java background and I would like to develop in python but i'm wondering: is there anything, in python, like Java "reflection"? I mean do i have a keyword to obtain all the methods and the attributes of a class in python? Thanks to anyone that can

Re: Question from a "java background" developer

2020-09-22 Thread Chris Angelico
On Tue, Sep 22, 2020 at 7:15 PM Agnese Camellini wrote: > > Hello to everyone, I have a question. I come from a Java background and I > would like to develop in python but i'm wondering: is there anything, in > python, like Java "reflection"? > I mean do i have a keyword to obtain all the methods

Re: Question from a "java background" developer

2020-09-22 Thread Mats Wichmann
On 9/22/20 3:25 AM, Chris Angelico wrote: > On Tue, Sep 22, 2020 at 7:15 PM Agnese Camellini > wrote: >> >> Hello to everyone, I have a question. I come from a Java background and I >> would like to develop in python but i'm wondering: is there anything, in >> python, like Java "reflection"? >> I

Importing from within package

2020-09-22 Thread Abdur-Rahmaan Janhangeer
Greeting list, I have this main script: https://github.com/Abdur-rahmaanJ/shopyo/blob/dev/shopyo/__main__.py However, i get errors after package installation saying: ImportError: cannot import name 'shopyoapi' from 'shopyo' I've tried from .shopyoapi also but to no avail. To reproduce: python

EuroPython "Ask me Anything"

2020-09-22 Thread M.-A. Lemburg
Dear Community, we want to try a new experiment and run an “Ask me Anything” (AMA) this Thursday to answer questions you may have, share our knowledge or help you in planning your online event. Some of the topics we can cover: - our tools research and findings - our concepts for running an online

Re: PyOBEX installation problem

2020-09-22 Thread Walter Penn
Johny wrote: I tried to install PyOBEX Maybe this one instead? pip install PyOBEX see https://pypi.org/project/PyOBEX/ regards. -- https://mail.python.org/mailman/listinfo/python-list

Fwd: Trouble with uninstalling Python 3.8 from windows10

2020-09-22 Thread Malkinson Guy
Hello I'm a Python beginner. I installed last week python 3.8 64bit on windows 10 for the purpose of working with tiff images. I next tried to import PIL (or pil), but was unsuccessful (all stackoverflow solutions didn't work either). I next thought this could be due to the python version, and

Re: Question from a "java background" developer

2020-09-22 Thread Dieter Maurer
Chris Angelico wrote at 2020-9-22 19:25 +1000: >On Tue, Sep 22, 2020 at 7:15 PM Agnese Camellini > wrote: >> >> Hello to everyone, I have a question. I come from a Java background and I >> would like to develop in python but i'm wondering: is there anything, in >> python, like Java "reflection"? >>

Re: Pythonic style

2020-09-22 Thread Stavros Macrakis
Thanks to everyone for the comments, especially Tim Chase for the simple and elegant tuple unpacking solution, and Léo El Amri for the detailed comments on the variants. Below are some more variants which *don't *use tuple unpacking, on the theory that the coding patterns may be useful in other cas

Re: Pythonic style

2020-09-22 Thread Chris Angelico
On Wed, Sep 23, 2020 at 3:52 AM Stavros Macrakis wrote: > > Thanks to everyone for the comments, especially Tim Chase for the simple > and elegant tuple unpacking solution, and Léo El Amri for the detailed > comments on the variants. Below are some more variants which *don't *use > tuple unpacking

List Partition Comprehension (Feature Suggestion)

2020-09-22 Thread Yakov Shalunov
Python list comprehension is substantially faster than plan iteration, to the point where ``` l0, l1 = [],[] for x in l: if cond(x): l0.append(x) else: l1.append(x) ``` runs at about the same speed as ``` l0 = [x for x in l if cond(x)] l1 = [x for x in l if not cond(x)] ```

Re: List Partition Comprehension (Feature Suggestion)

2020-09-22 Thread Yakov Shalunov
A possible alternative would be a partition library function in the same vein as `map` and `filter` ``` def partition(n, key, iter): """ Partitions a list. Args: (n: the number of partitions), (key: function which takes elements and returns the index of the partition to place them in)

Re: Importing from within package

2020-09-22 Thread Chris Angelico
On Wed, Sep 23, 2020 at 9:24 AM Dennis Lee Bieber wrote: > > On Tue, 22 Sep 2020 20:14:01 +0400, Abdur-Rahmaan Janhangeer > declaimed the following: > > >I have this main script: > >https://github.com/Abdur-rahmaanJ/shopyo/blob/dev/shopyo/__main__.py > > > > Well, that file name scares me

Re: Question from a "java background" developer

2020-09-22 Thread David Lowry-Duda
On Tue, Sep 22, 2020 at 11:13:50AM +0200, Agnese Camellini wrote: > I mean do i have a keyword to obtain all the methods and the > attributes of > a class in python? In addition to the `dir()` that others have mentioned, I'll add that developing interactively is very common, especially in ipytho

Re: List Partition Comprehension (Feature Suggestion)

2020-09-22 Thread Greg Ewing
On 23/09/20 7:16 am, Yakov Shalunov wrote: l0, l1 = ([x for x in l if cond(x) else x]) l0, l1, l2 = ([x for x in l if cond0(x) else x**2 if cond1(x) else x**3]) This syntax seems a bit convoluted. One of the result expressions is at the beginning as usual, but the rest are tacked on the end. An

Re: Importing from within package

2020-09-22 Thread 黃炳熙
Chris Angelico writes: > ... > In a package, __main__.py does that same job. Sorry ChrisA, would you please some example? Because i am working in progress with Python things... Sicnerely, Byung-Hee -- ^고맙습니다 _布德天下_ 감사합니다_^))// -- https://mail.python.org/mailman/listinfo/python-list

Re: Importing from within package

2020-09-22 Thread Terry Reedy
On 9/22/2020 8:31 PM, Chris Angelico wrote: On Wed, Sep 23, 2020 at 9:24 AM Dennis Lee Bieber wrote: On Tue, 22 Sep 2020 20:14:01 +0400, Abdur-Rahmaan Janhangeer declaimed the following: I have this main script: https://github.com/Abdur-rahmaanJ/shopyo/blob/dev/shopyo/__main__.py

Re: List Partition Comprehension (Feature Suggestion)

2020-09-22 Thread Terry Reedy
On 9/22/2020 3:16 PM, Yakov Shalunov wrote: Python list comprehension is substantially faster than plan iteration, to the point where ``` l0, l1 = [],[] for x in l: if cond(x): l0.append(x) else: l1.append(x) ``` runs at about the same speed as ``` l0 = [x for x in l

Python 3.8.5 Not Launching

2020-09-22 Thread yehudisgru
Hi,   I installed Python 3.8.5 on Windows 10 When I click on a python file it launches the program but it closes immediately.   Please help, thanks.   Yehudis Gruber     -- https://mail.python.org/mailman/listinfo/python-list

Re: Importing from within package

2020-09-22 Thread Chris Angelico
On Wed, Sep 23, 2020 at 2:16 PM Terry Reedy wrote: > > On 9/22/2020 8:31 PM, Chris Angelico wrote: > > On Wed, Sep 23, 2020 at 9:24 AM Dennis Lee Bieber > > wrote: > >> > >> On Tue, 22 Sep 2020 20:14:01 +0400, Abdur-Rahmaan Janhangeer > >> declaimed the following: > >> > >>> I have this main sc

Re: Python 3.8.5 Not Launching

2020-09-22 Thread Igor Korot
Hi, On Tue, Sep 22, 2020 at 11:25 PM wrote: > >Hi, > > > >I installed Python 3.8.5 on Windows 10 > >When I click on a python file it launches the program but it closes >immediately. What is the content of this file? Is it a py or pyc file? Thank you. > > > >Please help, tha

Re: Importing from within package

2020-09-22 Thread Abdur-Rahmaan Janhangeer
Greetings list, In case this might help, i am on Python3.8 and running in a virtual env This command also does not work: python -m shopyo new . test2 Kind Regards, Abdur-Rahmaan Janhangeer about | blog github