Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » STARTED: Python in bazaar
Re: STARTED: Python in bazaar [message #31849 is a reply to message #31846] Thu, 31 March 2011 09:44 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
sound good...

my goal would be to only offer a small single interface to python, not too extensive.. focus on exporting some part of the API of a Upp side class to be available in python and vice versa.

this implys the Value - PyObject translation for the most common types in python

Value: PyObject:

int = long int
in64 = long long integer (theoretically it's unlimited)
double = real
bool = BOOL
String = String
Time = DateTime
Time = Time
Date = Date

Vector<Value> = tuple (Vector<> basicly to distinguish from list)
Array<Value> = list
ArrayMap<Value, Value> = dict


and ofcorse the methods for modules/classes or static funcitons API

i'm still thinnking of how to best do the latter part.
since somehow with the self PyObject we'd need to access the class instance..(module instance is always the same, for static functions self == NULL anyway). i think it'd be best to have the upp class have a python PyObject* instance of the python class, and have the PyObject instance have another PyObject* as private member (kind of a contect variable) which represents the this pointer of a upp class. so both classes are runtime connected without the need to use maps.

could you provide your sourcecode to learn?

BTW: have you been able to use the Python package in bazaar?

[Updated on: Thu, 31 March 2011 09:45]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: UppGL
Next Topic: Get MAC addresses for windows and linux
Goto Forum:
  


Current Time: Fri May 10 09:15:04 CEST 2024

Total time taken to generate the page: 0.01639 seconds