On Thu, May 13, 2021 at 5:27 PM Robin Becker wrote:
>
> On 12/05/2021 20:17, Mirko via Python-list wrote:
> > Am 12.05.2021 um 20:41 schrieb Robin Becker:
> >> ...
> >>>
> >...
> >> since GvR has been shown to have time traveling abilities such a
> >> script could paradoxically appear
On 12/05/2021 20:17, Mirko via Python-list wrote:
Am 12.05.2021 um 20:41 schrieb Robin Becker:
...
...
since GvR has been shown to have time traveling abilities such a
script could paradoxically appear acausally.
--
yrs-not-too-seriously
Robin Becker
Not sure, if that's what y
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
...
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
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:
> >
> > =
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
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], "