Author Topic: Preliminary Python support - anyone wanna help?  (Read 6789 times)

Barry_Pearce

  • EA User
  • **
  • Posts: 70
  • Karma: +0/-0
    • View Profile
Preliminary Python support - anyone wanna help?
« on: July 02, 2004, 06:10:11 pm »
OK. I have got some preliminary Python code generation templates together .

Due to EA limitations these replace the Delphi templates...if you would like to test/help collaborate please drop me a private message or reply here!!!

AdamHearn

  • EA User
  • **
  • Posts: 58
  • Karma: +0/-0
    • View Profile
Re: Preliminary Python support - anyone wanna help
« Reply #1 on: July 04, 2004, 04:07:38 am »
Hey Barry,

I don't follow the limitation with EA...

Configuration
Language Datatypes
Add Product
'Python'
Add the types for that particular language

Configuration
Code Generation Templates
Python is listed in the list of languages
One thing to notes is that there is *no* default CGT data for the new language. You *have* to roll your own which could be rather tedious but not unreasonable.

Adding a class of that language type works as expected - i.e. Python is in the drop down list and the types are limited to those added previously.

Now CG the class to a file. It all should be there as you defined. That's what I had done when trying out the (as was) new CGT features when they were released.

Drop me an e-mail if you want to compare notes!

Barry_Pearce

  • EA User
  • **
  • Posts: 70
  • Karma: +0/-0
    • View Profile
Re: Preliminary Python support - anyone wanna help
« Reply #2 on: July 04, 2004, 03:59:08 pm »
Hi m8,

yeah. I see. I did try this - but the limitation is that you are forced to add a datatype to add the product - I hadnt realised that....

The reason I didnt do this is you dont declare 'types' in python.
Yeah there are strings, ints etc but you just bind these values to an 'identifier' and the 'identifer' is now related to that type.

i.e.

class X:
   x = 23
   x = "hello"

When the class finishes being defined x == the string hello. If in a function I now say X.x = 34.56 its now a floating point number!

Henceforth implementation of types for python is pretty ridiculous - you never say int x;

ive now defined a type called type and this has indeed caused the templates I needed to occur - I am now transfering over the data :)

And I pretty much am rolling my own CGT as there is little of use in the majority of the others anyway..(for python that is)


Cheers!
Barry
« Last Edit: July 04, 2004, 04:01:03 pm by Barry_Pearce »

mcoletti

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Preliminary Python support - anyone wanna help
« Reply #3 on: October 18, 2004, 02:00:23 am »
Hi,

I would be interested in a python template (I really was starting to create mine).

If you want, we can share the work.

Massimo
(max < a t > mcoletti.net

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8063
  • Karma: +118/-20
    • View Profile
Re: Preliminary Python support - anyone wanna help
« Reply #4 on: November 24, 2004, 06:59:02 pm »
Hi guys,

Have a look at http://www.sparxsystems.com.au/mdg_technologies.htm for Python support within EA.  It requires EA version 4.5.

Simon
« Last Edit: November 24, 2004, 07:01:05 pm by simonm »

PemanM

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Preliminary Python support - anyone wanna help
« Reply #5 on: October 02, 2013, 07:09:44 am »
Dear all,

I am interested in participating in this collaborative effort in creating python templates so that WORKING python code can be generated from an existing UML model. Feel free to contact me directly through PM or e-mail.


Cheers,

Peman

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Preliminary Python support - anyone wanna help
« Reply #6 on: October 02, 2013, 08:05:41 am »
You noticed that this collaboration was last mentioned about 10 years ago?

q.

PemanM

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Preliminary Python support - anyone wanna help
« Reply #7 on: October 02, 2013, 08:10:06 am »
Unfortunately not. Thanks for mentioning it. I guess the initiative died as no one else posted after that with python templates. Let's see if we can revive the movement and get something useful out of it.

P.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Preliminary Python support - anyone wanna help
« Reply #8 on: October 02, 2013, 08:21:24 am »
I tangent Python only randomly, but IIRC there is already quite some support build in EA.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8063
  • Karma: +118/-20
    • View Profile
Re: Preliminary Python support - anyone wanna help
« Reply #9 on: October 02, 2013, 08:23:27 am »
qwerty beat me to it...

Python has been a supported language in EA since version 6. Before that version 4.5 and above supported it through a downloadable MDG technology.

Maybe it would be more productive if you wanted to discuss what you see as the deficiencies in that support and see if any of those can be resolved.
« Last Edit: October 02, 2013, 08:25:05 am by simonm »

PemanM

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Preliminary Python support - anyone wanna help
« Reply #10 on: October 02, 2013, 08:27:54 am »
Unfortunately, most of the class and function definitions generated off of an UML are wrong/incomplete and python templates need major revisiting. What EA provides is really rudimentary, most of the time "pass" parameter is placed in the py file instead of the body of the element of interest. I am working with business rules and need them generated in WORKING FLAWLESS python. I only get 25% of what I need out of the code generator because the templates are incomplete and complete them manually. Therefore the search for python EA templates.

P.