Problem in sharing .py file as it is indent based program

Forum for asking and answering questions related to use of the OpenSeesPy module

Moderators: silvia, selimgunay, Moderators

Post Reply
Prafullamalla
Posts: 160
Joined: Mon Feb 02, 2015 6:32 pm

Problem in sharing .py file as it is indent based program

Post by Prafullamalla » Sat May 30, 2020 7:33 am

As, I shared a python file, there will be problem in running a file shared here. The python program is indent based. So, the program would not run or may result erroneous as it will affect the loops. So, how can we share the files
Prafulla Malla, Nepal
Praf_malla@hotmail.com

mhscott
Posts: 874
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Problem in sharing .py file as it is indent based program

Post by mhscott » Sat May 30, 2020 7:59 am

Good point. I enabled BBcode, so now you should be able to use delimiters around your Python code

app.php/help/bbcode#f2r1

For example:

Code: Select all

for i in range(5):
	print(i)

Prafullamalla
Posts: 160
Joined: Mon Feb 02, 2015 6:32 pm

Re: Problem in sharing .py file as it is indent based program

Post by Prafullamalla » Sat May 30, 2020 8:29 am

Yes, the problem has been solved. Thanks Prof. Scott

Steps
--------------
1. Paste the code.
2. Select the code that you have pasted.
3. Click on the the the button </> just below the subject.
4. Submit
Prafulla Malla, Nepal
Praf_malla@hotmail.com

Post Reply