Re: Python script accessing own source code

2021-05-12 Thread Mirko via Python-list
Am 12.05.2021 um 20:41 schrieb Robin Becker: > ... >> >> with open(__file__) as myself: >> print(myself.read(), end='') > > very nice, but accessing code that's already seems quite easy. I > think the real problem is to get a python script name that creates > and writes itself. So I would

Re: Python script accessing own source code

2021-05-12 Thread Robin Becker
... with open(__file__) as myself:     print(myself.read(), end='') very nice, but accessing code that's already seems quite easy. I think the real problem is to get a python script name that creates and writes itself. So I would ask if any one has the solution to the self writing script

Re: Python script accessing own source code

2021-05-12 Thread Stestagg
On 2021-05-12 15:48, Michael F. Stemper wrote: > > On 12/05/2021 08.26, Dino wrote: > > > >> Hi, here's my (probably unusual) problem. Can a Python (3.7+) script > >> access its own source code? > > > > Here is a fairly simple python program that reads itself: > > > > =

Re: Python script accessing own source code

2021-05-12 Thread MRAB
On 2021-05-12 15:48, Michael F. Stemper wrote: On 12/05/2021 08.26, Dino wrote: Hi, here's my (probably unusual) problem. Can a Python (3.7+) script access its own source code? Here is a fairly simple python program that reads itself: #!/usr/b

Re: Python script accessing own source code

2021-05-12 Thread Michael F. Stemper
On 12/05/2021 08.26, Dino wrote: Hi, here's my (probably unusual) problem. Can a Python (3.7+) script access its own source code? Here is a fairly simple python program that reads itself: #!/usr/bin/python import sys with open( sys.argv[0], "

Re: The importance of mental health

2021-05-12 Thread tommy yama
I do not know you and your past but guess destigmatization of mental illnesses is an important agenda to people, On Tue, May 11, 2021 at 8:34 AM Mirko via Python-list < python-list@python.org> wrote: > Am 10.05.2021 um 15:16 schrieb Kyle Stanley: > > Hey all, > > > > In these last few months, I