[Tutor] Where to store test-code?

2019-06-13 Thread Thomas Güttler
Up to now I use this structure: src/myapp/setup.py src/myapp/myapp/real_code.py Now I want to write a test for a method which is implemented real_code.py. Where should I write store the file which contains the unittest? Is there a guideline for the directory structure of tests? I know that

[Tutor] Next steps after creating virtualenv (new github project)?

2019-03-03 Thread Thomas Güttler Lists
want to store my small project in git and upload it to github later. What is the best practice for the directory layout? Are there (official) docs how to start a new project after creating the virtualenv? Regards,   Thomas Güttler -- Thomas Guettler http://www.thomas-guettler.de/ I am

Re: [Tutor] Percentage of installations without setuptools (Was if __name__=='__main__' ...)

2017-08-14 Thread Thomas Güttler
Am 13.08.2017 um 02:12 schrieb Steven D'Aprano: On Fri, Aug 11, 2017 at 02:35:00PM +0200, Thomas Güttler wrote: How high is the percentage of python installation which don't have setuptools? I have no clue. Is it 5%, 10%, 15% ...? I know there is no definite answer to this question

[Tutor] Percentage of installations without setuptools (Was if __name__=='__main__' ...)

2017-08-11 Thread Thomas Güttler
. Is it 5%, 10%, 15% ...? I know there is no definite answer to this question. But you can guess this better than me. Regards, Thomas Güttler Am 10.08.2017 um 12:01 schrieb Chris Warrick: > On 9 August 2017 at 23:15, Steven D'Aprano <st...@pearwood.info> wrote: >> On Tue, Aug

[Tutor] The sane default choice is entry_points console_scripts Was: if __name__=='main' vs entry points: What to teach new comers?

2017-08-09 Thread Thomas Güttler
Am 08.08.2017 um 12:56 schrieb Chris Warrick: On 8 August 2017 at 03:30, Ben Finney <ben+pyt...@benfinney.id.au> wrote: Thomas Güttler <guettl...@thomas-guettler.de> writes: Why is "the sane default is 'use console_scripts entry-point in setup.py'" not a good answer?

Re: [Tutor] setup.py "script" vs "console_scripts" Was: if __name__=='main' vs entry points: What to teach new comers?

2017-08-07 Thread Thomas Güttler
Am 05.08.2017 um 06:14 schrieb Ben Finney: Thomas Güttler <guettl...@thomas-guettler.de> writes: The underlaying question is: Imangine you are a newcomer. A newcomer is in a tough position when it comes to packaging and distributing Python code, especially the command-line pr

Re: [Tutor] setup.py "script" vs "console_scripts" Was: if __name__=='main' vs entry points: What to teach new comers?

2017-08-04 Thread Thomas Güttler
Am 04.08.2017 um 02:50 schrieb Ben Finney: Thomas Güttler <guettl...@thomas-guettler.de> writes: Why are there two ways: "script" vs "console_scripts entry-point"? Because Distutils implements only ‘scripts’, and that's not capable enough for what people need so S

[Tutor] setup.py "script" vs "console_scripts" Was: if __name__=='main' vs entry points: What to teach new comers?

2017-08-03 Thread Thomas Güttler
Am 02.08.2017 um 18:06 schrieb Wolfgang Maier: On 08/02/2017 04:57 PM, Steven D'Aprano wrote: On Wed, Aug 02, 2017 at 10:48:39PM +1000, Ben Finney wrote: Thomas Güttler <guettl...@thomas-guettler.de> writes: Maybe I am doing something wrong. I was proud because I did use “console_s

Re: [Tutor] if __name__=='main' vs entry points: What to teach new comers?

2017-08-02 Thread Thomas Güttler
Am 02.08.2017 um 05:51 schrieb Steven D'Aprano: On Wed, Aug 02, 2017 at 11:22:00AM +1000, Ben Finney wrote: Steven D'Aprano <st...@pearwood.info> writes: On Tue, Aug 01, 2017 at 04:54:40PM +0200, Thomas Güttler wrote: [...] I use Python since several years and I use console_

Re: [Tutor] if __name__=='main' vs entry points: What to teach new comers?

2017-08-02 Thread Thomas Güttler
Am 02.08.2017 um 05:35 schrieb Abdur-Rahmaan Janhangeer: what difference do you make between python scripts and python code files? are codes relating to file manipulation called scripts? Do you ask this question all people on this list, or only one particular person? I don't know the

[Tutor] __main__.py file Was: if __name__=='main' vs entry points: What to teach new comers?

2017-08-02 Thread Thomas Güttler
a setup.py), as opposed to just putting the script somewhere in $PATH. Up to now I never did this. Maybe I will do this in the future. thank you, Thomas Güttler -- Thomas Guettler http://www.thomas-guettler.de/ ___ Tutor maillist - Tutor@python.org

[Tutor] if __name__=='main' vs entry points: What to teach new comers?

2017-08-01 Thread Thomas Güttler
ears and I use console_script in entry_points of setup.py. I am very unsure if this is the right way if you want to teach a new comers the joy of python. In the current context we want to translate a bunch of shell scripts to python scripts. What do you think? Regards, Thomas Güttler

Re: [Tutor] classproperty: readonly and inheritance - not more needed

2017-04-24 Thread Thomas Güttler
stand you. Thank you Regards, Thomas Güttler -- Thomas Guettler http://www.thomas-guettler.de/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] classproperty: readonly and inheritance - not more needed

2017-04-23 Thread Thomas Güttler
Am 20.04.2017 um 14:26 schrieb Steven D'Aprano: On Thu, Apr 20, 2017 at 10:39:57AM +0200, Thomas Güttler wrote: - its hard to get classproperty to work right. What is "righ"? In my case a read-only classproperty is enough. Inheritance should be supported. I don't have

[Tutor] classproperty: readonly and inheritance - not more needed

2017-04-20 Thread Thomas Güttler
Am 19.04.2017 um 11:16 schrieb Steven D'Aprano: On Wed, Apr 19, 2017 at 09:28:26AM +0200, Thomas Güttler wrote: [code for a classproperty] Nice, if it is that simple. Is there a reason why this is not in the standard library? I haven't had a chance to test Peter's classproperty code yet

[Tutor] classproperty, three times in virtualenv

2017-04-20 Thread Thomas Güttler
Am 19.04.2017 um 09:43 schrieb Alan Gauld via Tutor: On 19/04/17 08:28, Thomas Güttler wrote: Nice, if it is that simple. Is there a reason why this is not in the standard library? Probably because it is such a rare use case and because its not that hard to do yourself if you really need

Re: [Tutor] classproperty for Python 2.7 (read-only enough)

2017-04-19 Thread Thomas Güttler
Am 18.04.2017 um 13:17 schrieb Peter Otten: Thomas Güttler wrote: I would like to have read-only class properties in Python. I found this http://stackoverflow.com/questions/128573/using-property-on-classmethods But there are a lot of discussions of things which I don't understand. I want

[Tutor] classproperty for Python 2.7 (read-only enough)

2017-04-18 Thread Thomas Güttler
. Regards, Thomas Güttler -- Thomas Guettler http://www.thomas-guettler.de/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor