To talk on Icrontic, just register!

It only takes 30 seconds.

Have an account? Sign in:

Forgot?
matlab4t
Getting settled in
matlab4t
7 Posts

changing a variable in a file

hi guys,

i have a file 121.py. its a python script file from abaqus. i have to change a single variable in that file and make it to run again . the value which i have to change in my 121.py is a node number, and i have the node numbers from matlab , which are to be placed in the script file. can anyone let me know how to do it.
JB
Radeon_Man in another life
JB
417 Posts
If the numbers from Matlab are deterministic you can simply run that script once and then store the results to a file or a hard-coded array in your Python script.
matlab4t
Getting settled in
matlab4t
7 Posts
If the numbers from Matlab are deterministic you can simply run that script once and then store the results to a file or a hard-coded array in your Python script.

i am having few nodes numbers stored in c = [27 52 102 345]. i have them from matlab. now i have to send these numbers into my script file (121.py) and run cases for all those node numbers. so i wanted to know if i can send these numbers one by one into the script file (121.py) and run it.

can u elaborate on your method.

thank you for ur reply

Matlab4t
JB
Radeon_Man in another life
JB
417 Posts
Well, it depends on how your script is implemented. If it expects parameters to be passed in on the command line then you have to write a loop from your shell.

If you hard code the array in the script you have to write a loop in Python to iterate through all the values.
Similar Threads
Thread Thread Starter Forum Replies Last Post
my mistake earns me trojan.download.small.cml Precast Resolved / Inactive 20 18 Jun 2007 4:19am
Registry Issue? HJT Log sect Resolved / Inactive 9 28 May 2006 10:13am
Stupid Popups lieutenantdano Resolved / Inactive 1 20 Dec 2005 11:21pm
User response needed please: Please help me get rid of trojan-spy.html.smitfraud.c Richard114 Resolved / Inactive 12 29 Apr 2005 11:41am
HijackThis log - Christian Michael - new CWS infection Christian Michael Resolved / Inactive 5 14 Sep 2004 4:59am

Go Back   Icrontic Forums > Tech: Software > General Software > Matlab Help
Jump to
This Thread Search this Thread
Search this Thread:

Advanced Search


Current time: 1:18pm (GMT)
Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Get Vanilla instead. Trust me.