Re: Posting code on stackoverflow

2021-06-06 Thread Rich Shepard

On Sat, 5 Jun 2021, Terry Reedy wrote:


Last time I tried *before*, it did not work. paste, reselect (a nuisance)
and click does.


Terry,

I had tried that and it didn't work any better. Bounding the code with two
sets of three backticks does work.

Regards,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Posting code on stackoverflow

2021-06-06 Thread Rich Shepard

On Sun, 6 Jun 2021, joseph pareti wrote:


you need to put the code between 2 lines defined as follows:
```
then it will be formatted for you


Thanks, Joseph. I figured that out on the web page.

Regards,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Posting code on stackoverflow

2021-06-06 Thread joseph pareti
you need to put the code between 2 lines defined as follows:
```
then it will be formatted for you

Am Sa., 5. Juni 2021 um 23:40 Uhr schrieb Rich Shepard <
rshep...@appl-ecosys.com>:

> I tried to post a question on stackoverflow.com which included a bunch of
> code (entered after clicking the box 'code'). I noticed that lines were
> wrapped but could not find how to expand the input box so they would not
> wrap.
>
> SO wouldn't let me post the question because of the wrapped code. As I've
> not asked a question ther for a long time, and it didn't involve long lines
> of code, I need to learn a) how to enter code if it's not just clicking on
> the 'code' box before pasting text and b) how to keep code lines from
> wrapping so a horizontal scroll bar is made available.
>
> TIA,
>
> Rich
> --
> https://mail.python.org/mailman/listinfo/python-list
>


-- 
Regards,
Joseph Pareti - Artificial Intelligence consultant
Joseph Pareti's AI Consulting Services
https://www.joepareti54-ai.com/
cell +49 1520 1600 209
cell +39 339 797 0644
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Posting code on stackoverflow

2021-06-06 Thread dn via Python-list
On 06/06/2021 13.56, Terry Reedy wrote:
> On 6/5/2021 5:36 PM, Rich Shepard wrote:
>> I tried to post a question on stackoverflow.com which included a bunch of
>> code (entered after clicking the box 'code'). I noticed that lines were
>> wrapped but could not find how to expand the input box so they would not
>> wrap.
>>
>> SO wouldn't let me post the question because of the wrapped code. As I've
>> not asked a question ther for a long time, and it didn't involve long
>> lines
>> of code, I need to learn a) how to enter code if it's not just
>> clicking on
>> the 'code' box before pasting text
> 
> Last time I tried *before*, it did not work.  paste, reselect (a
> nuisance) and click does.


Using text-mode email formatting and copy-pasting 'here', works well!
-- 
Regards,
=dn
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Posting code on stackoverflow

2021-06-05 Thread Terry Reedy

On 6/5/2021 5:36 PM, Rich Shepard wrote:

I tried to post a question on stackoverflow.com which included a bunch of
code (entered after clicking the box 'code'). I noticed that lines were
wrapped but could not find how to expand the input box so they would not
wrap.

SO wouldn't let me post the question because of the wrapped code. As I've
not asked a question ther for a long time, and it didn't involve long lines
of code, I need to learn a) how to enter code if it's not just clicking on
the 'code' box before pasting text


Last time I tried *before*, it did not work.  paste, reselect (a 
nuisance) and click does.


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


Re: Posting code on stackoverflow

2021-06-05 Thread Rich Shepard

On Sun, 6 Jun 2021, Roel Schroeven wrote:


There are several ways to format code on StackOverflow, see
https://meta.stackoverflow.com/questions/251361/how-do-i-format-my-code-blocks


Roel,

Thanks very much for the URL.


What I do most of the time is indent the code by 4 spaces and make sure
there are blank lines before and after the code block.


Just now I noticed a link 'code' along the top of the window. Clicking on
that I read that a code block can be identified as such by surrounding it
with sets of three backticks (```). That worked.

Regards,

Rich
--
https://mail.python.org/mailman/listinfo/python-list


Re: Posting code on stackoverflow

2021-06-05 Thread Roel Schroeven

Rich Shepard schreef op 5/06/2021 om 23:36:

I tried to post a question on stackoverflow.com which included a bunch of
code (entered after clicking the box 'code'). I noticed that lines were
wrapped but could not find how to expand the input box so they would not
wrap.

SO wouldn't let me post the question because of the wrapped code. As I've
not asked a question ther for a long time, and it didn't involve long lines
of code, I need to learn a) how to enter code if it's not just clicking on
the 'code' box before pasting text and b) how to keep code lines from
wrapping so a horizontal scroll bar is made available.


There are several ways to format code on StackOverflow, see 
https://meta.stackoverflow.com/questions/251361/how-do-i-format-my-code-blocks


What I do most of the time is indent the code by 4 spaces and make sure 
there are blank lines before and after the code block.




--
"Honest criticism is hard to take, particularly from a relative, a
friend, an acquaintance, or a stranger."
-- Franklin P. Jones

Roel Schroeven

--
https://mail.python.org/mailman/listinfo/python-list


Posting code on stackoverflow

2021-06-05 Thread Rich Shepard

I tried to post a question on stackoverflow.com which included a bunch of
code (entered after clicking the box 'code'). I noticed that lines were
wrapped but could not find how to expand the input box so they would not
wrap.

SO wouldn't let me post the question because of the wrapped code. As I've
not asked a question ther for a long time, and it didn't involve long lines
of code, I need to learn a) how to enter code if it's not just clicking on
the 'code' box before pasting text and b) how to keep code lines from
wrapping so a horizontal scroll bar is made available.

TIA,

Rich
--
https://mail.python.org/mailman/listinfo/python-list