# Converting a python script into AMPL (AMPLIDE console) script

**URL:** https://discuss.ampl.com/t/converting-a-python-script-into-ampl-amplide-console-script/1990
**Category:** Support
**Created:** [November 22, 2024, 3:09pm UTC](https://discuss.ampl.com/t/converting-a-python-script-into-ampl-amplide-console-script/1990 "2024-11-22T15:09:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Davids\_David2](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.ampl.com/davids_david2/32/862_2.png) [@Davids\_David2](https://discuss.ampl.com/u/Davids_David2)
#### Post date: [November 22, 2024, 3:09pm UTC](https://discuss.ampl.com/t/converting-a-python-script-into-ampl-amplide-console-script/1990/1 "2024-11-22T15:09:18Z")

</div>

Dear Sir,

I normally use AMPL on AMPLIDE and I am familiar with its scripts. A friend shared with me a work that is written to implement the benders decomposition. However, the work is developed in python it is an amplpy file which I am not familiar with. Is there any other way to transform this amplpy file into a script that I can run as a .mod and .run file? attached is the amplpy file that I would like to transform into a kind of .mod and .run file in amplide console scripts.

Besides, I there anyone who developed a benders decomposition or a C&CG algorithm implementation scripts and they don’t mind sharing the script with me?

Ihope that you can help me in one or another way.

Regards  
[BD\_simple\_example.zip](https://discuss.ampl.com/uploads/short-url/4HGsOeHGFzl565OXYPKUHMZQFwI.zip) (1.7 KB)
