Re: PYTHONBREAKPOINT=remote_pdb.set_trace

2021-03-14 Thread Haroldo Stenger
hi again 

Now I've found about "RemotePDB Client", which reconnects aturomatically. That 
helps. Alas, I've seen taht typing 'cont' or 'continue' stalls the session. But 
Typing just 'c' works. Just to mention since haven't seen it mentioned anywhere.

best

Haroldo



El Sunday, March 14, 2021 a la(s) 4:22:10 AM UTC-3, Haroldo Stenger escribió:
> hi, I'm using the new PYTHONBREAKPOINT=remote_pdb.set_trace feature in python 
> 3.9.2. After breakpoint() is reached, the telnet server is enabled and I can 
> connect to the debugger. Then f.i. I do 'cont' for resuming execution, and 
> when the breakpoint() is reached again, the telnet session is stalled. I 
> telnet again, and then I can type debug commands again, and the former telnet 
> session is closed. After a 'cont' the same repeats. Is that how it is meant 
> to work ? What am I missing or getting wrong? Any help is highly appreciated 
> 
> ps. I now understand that under the PYTHONBREAKPOINT=remote_pdb.set_trace , 
> the interpreter will set a different telnet server when breakpoint() is 
> reached. That's propably not what one wants under normal functioning. But 
> then, how does one set a new breakpoint without interrupting the debugging 
> session flow? 
> 
> thanks a lot 
> 
> Haroldo
-- 
https://mail.python.org/mailman/listinfo/python-list


file location/directory

2021-03-14 Thread Quentin Bock
how can I change the path that python takes to run certain files, I'm
starting to create game and I want those in separate folders, so how can I
change it so that python runs the program with the files from that folder?


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: file location/directory

2021-03-14 Thread dn via Python-list
On 15/03/2021 07.44, Quentin Bock wrote:
> how can I change the path that python takes to run certain files, I'm
> starting to create game and I want those in separate folders, so how can I
> change it so that python runs the program with the files from that folder?


Perhaps I'm confused:
a) are we talking about multiple Python program[me]s, or
b) multiple data-files which will be accessed by the same code?

a) Python will set the current directory according to where/how it is
started from the command-line.

b) consider that a file is addressed by more than just its name. Let's
over-simplify and talk about it having a "file-name", and having a
location which is described by a "path". Python will happily choose a
file based upon its "file-name" only - which implies that it is located
in the "current working directory"; or you can use both components, eg

open( os.path.join( path, file_name )...

So, now by setting the "path" according to "that folder", and adding the
requisite file-name(s), will that answer the need?

Remember that a path may be "absolute" or "relative", according to need.
-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list