Re: FileNotFoundError: [Errno 2] No such file or directory: ''

2021-04-14 Thread Eryk Sun
On 4/14/21, Quentin Bock wrote: > > this is the only part of the code that causes the error > > file = open('Egils Saga 1-15.txt', "r") Here's an app_abspath() function to resolve a filename against the directory of the main script: import os import sys def get_main_file():

Re: Website

2021-04-14 Thread Mladen Gogala via Python-list
On Wed, 14 Apr 2021 15:41:37 +0200, Rainyis wrote: > Hello, > I am Sergio Llorente, and I want to create a web about python. I will > publish apps, scripts.. made by python. I will like to put python in the > domain. The domain will be like all-about-python.com but in Spanish( > todosobrepython.co

Re: port to PDOS (especially mainframe)

2021-04-14 Thread Paul Edwards
On Thursday, April 15, 2021 at 4:32:51 AM UTC+10, Alan Gauld wrote: > On 14/04/2021 11:35, Paul Edwards wrote: > > I have succeeded in producing a Python 3.3 executable > ... > > However, the executable doesn't work yet. > Late to this party but how big is the assembler? Assuming the stuff in "a

Re: FileNotFoundError: [Errno 2] No such file or directory: ''

2021-04-14 Thread Michael F. Stemper
On 14/04/2021 12.55, Dan Stromberg wrote: Open a cmd.exe, command.exe or powershell, and: cd c:\my\dir\ect\ory Then run your script. Or put an os.chdir(r'c:\my\dir\ect\ory') at the top of your script. Or use file = open(r'c:\my\dir\ect\ory\Egils Saga 1-15.txt', 'r') BTW, "file" means somethin

Re: Ann: New Python curses book

2021-04-14 Thread Rich Shepard
On Wed, 14 Apr 2021, Alan Gauld via Python-list wrote: The paper version should be fine (apart from one error on p44 which has now been fixed!). Alan, What's the error and correction so I can change it in my dead tree version? Rich -- https://mail.python.org/mailman/listinfo/python-list

Re: port to PDOS (especially mainframe)

2021-04-14 Thread Alan Gauld via Python-list
On 14/04/2021 11:35, Paul Edwards wrote: > I have succeeded in producing a Python 3.3 executable ... > However, the executable doesn't work yet. Late to this party but how big is the assembler? It might be easier to translate the Python to C! I've done that in the past and with the aid of a few fun

Re: Ann: New Python curses book

2021-04-14 Thread Alan Gauld via Python-list
On 30/03/2021 12:12, Alan Gauld via Python-list wrote: > I've just published, in Kindle and paperback formats, I've just noticed that the kindle version has several indentation problems in the code listings. I can't do anything to fix it because it is all perfectly aligned in the Word file I submi

Re: FileNotFoundError: [Errno 2] No such file or directory: ''

2021-04-14 Thread Dan Stromberg
Open a cmd.exe, command.exe or powershell, and: cd c:\my\dir\ect\ory Then run your script. Or put an os.chdir(r'c:\my\dir\ect\ory') at the top of your script. Or use file = open(r'c:\my\dir\ect\ory\Egils Saga 1-15.txt', 'r') BTW, "file" means something to python other than just a variable name.

Re: FileNotFoundError: [Errno 2] No such file or directory: ''

2021-04-14 Thread jak
Il 14/04/2021 18:13, Quentin Bock ha scritto: I receive this error when I try to open a file The file (what I'm trying to open) is in the same folder as the program I'm trying to open it from; why is it saying no such file or directory? this is the only part of the code that causes the error fi

Re: FileNotFoundError: [Errno 2] No such file or directory: ''

2021-04-14 Thread Dan Stromberg
On Wed, Apr 14, 2021 at 9:14 AM Quentin Bock wrote: > I receive this error when I try to open a file > The file (what I'm trying to open) is in the same folder as the program I'm > trying to open it from; why is it saying no such file or directory? > > this is the only part of the code that cause

FileNotFoundError: [Errno 2] No such file or directory: ''

2021-04-14 Thread Quentin Bock
I receive this error when I try to open a file The file (what I'm trying to open) is in the same folder as the program I'm trying to open it from; why is it saying no such file or directory? this is the only part of the code that causes the error file = open('Egils Saga 1-15.txt', "r") file.clos

Re: Website

2021-04-14 Thread Paul Bryan
Yes. On Wed, 2021-04-14 at 15:41 +0200, Rainyis wrote: > Hello, > I am Sergio Llorente, and I want to create a web about python. I > will publish apps, scripts.. made by python. I will like to put > python in > the domain. The domain will be like all-about-python.com but in > Spanish( > todosobrep

Website

2021-04-14 Thread Rainyis
Hello, I am Sergio Llorente, and I want to create a web about python. I will publish apps, scripts.. made by python. I will like to put python in the domain. The domain will be like all-about-python.com but in Spanish( todosobrepython.com). Can I use it? Thanks in advance, Sergio -- https://mail.

Re: port to PDOS (especially mainframe)

2021-04-14 Thread Paul Edwards
I have succeeded in producing a Python 3.3 executable despite being built with a C library that only supports C90. I had to provide my own mini-posix wrappers that convert open() into fopen() etc. With that in place, plus a compiler where char = wchar_t, there were not a lot of changes required to