| Exibir mensagem anterior :: Exibir próxima mensagem |
| Autor |
Mensagem |
igor.ol13 Novato

Registrado: Domingo, 6 de Dezembro de 2009 Mensagens: 5
|
Enviada: Sex Dez 11, 2009 7:32 pm Assunto: Como instalo o 'Python for Delphi' no Delphi 2010? |
|
|
Bom pessoal, da muitos erros ao compilar o script, alguns corrigi mas tem um que não faço a mínima idéia de como fazer, já procurei no google mas não me ajudou em nada... alguém pode me ajudar? o erro que está dando é o seguinte:
[DCC Error] PythonEngine.pas(8809): E2064 Left side cannot be assigned to
ah, já ia esquecendo, a procedure que contem uma das linhas com esse erro é a seguinte:
| Código: |
procedure TPythonType.Initialize;
begin
CheckEngine;
with Engine, TheType do
begin
ob_type := PPyTypeObject(PyType_Type);
ob_refcnt := 1;
tp_name := PChar(FTypeName);
{$IFDEF PYTHON20_OR_HIGHER}
tp_flags := TypeFlagsAsInt;
{$ENDIF}
end;
if Assigned(FModule) then
begin
if Module.Initialized then
AddTypeVar
else
Module.AddClient( Self );
end;
InitServices;
inherited;
end; |
a linha é essa:
| Código: | | ob_type := PPyTypeObject(PyType_Type); |
e PPyTypeObject = ^PyTypeObject;
e
| Código: | PyTypeObject = packed record
ob_refcnt: Integer;
ob_type: PPyTypeObject;
ob_size: Integer; // Number of items in variable part
tp_name: PChar; // For printing
tp_basicsize, tp_itemsize: Integer; // For allocation
// Methods to implement standard operations
tp_dealloc: pydestructor;
tp_print: printfunc;
tp_getattr: getattrfunc;
tp_setattr: setattrfunc;
tp_compare: cmpfunc;
tp_repr: reprfunc;
// Method suites for standard classes
tp_as_number: PPyNumberMethods;
tp_as_sequence: PPySequenceMethods;
tp_as_mapping: PPyMappingMethods;
// More standard operations (here for binary compatibility)
tp_hash: hashfunc;
tp_call: ternaryfunc;
tp_str: reprfunc;
tp_getattro: getattrofunc;
tp_setattro: setattrofunc;
{$IFDEF PYTHON20_OR_HIGHER}
/// jah 29-sep-2000 : updated for python 2.0
// Functions to access object as input/output buffer
tp_as_buffer: PPyBufferProcs;
// Flags to define presence of optional/expanded features
tp_flags: LongInt;
tp_doc: PChar; // Documentation string
// call function for all accessible objects
tp_traverse: traverseproc;
// delete references to contained objects
tp_clear: inquiry;
{$ENDIF}
{$IFDEF PYTHON21_OR_HIGHER}
// rich comparisons
tp_richcompare: richcmpfunc;
// weak reference enabler
tp_weaklistoffset: Longint;
{$ENDIF}
{$IFDEF PYTHON22_OR_HIGHER}
// Iterators
tp_iter : getiterfunc;
tp_iternext : iternextfunc;
// Attribute descriptor and subclassing stuff
tp_methods : PPyMethodDef;
tp_members : PPyMemberDef;
tp_getset : PPyGetSetDef;
tp_base : PPyTypeObject;
tp_dict : PPyObject;
tp_descr_get : descrgetfunc;
tp_descr_set : descrsetfunc;
tp_dictoffset : longint;
tp_init : initproc;
tp_alloc : allocfunc;
tp_new : newfunc;
tp_free : pydestructor; // Low-level free-memory routine
tp_is_gc : inquiry; // For PyObject_IS_GC
tp_bases : PPyObject;
tp_mro : PPyObject; // method resolution order
tp_cache : PPyObject;
tp_subclasses : PPyObject;
tp_weaklist : PPyObject;
{$ENDIF}
{$IFDEF PYTHON20}
//More spares
tp_xxx7: LongInt;
tp_xxx8: LongInt;
{$ENDIF}
{$IFDEF PYTHON15}
//More spares
tp_xxx7: LongInt;
tp_xxx8: LongInt;
{$ENDIF}
end; |
vlw pessoal!
abraços |
|
| Voltar ao Topo |
|
 |
igor.ol13 Novato

Registrado: Domingo, 6 de Dezembro de 2009 Mensagens: 5
|
Enviada: Dom Dez 13, 2009 5:02 pm Assunto: |
|
|
| ninguém sabe não? qualquer ajuda é bem vinda |
|
| Voltar ao Topo |
|
 |
williame.rocha Novato

Registrado: Segunda-Feira, 3 de Mai de 2010 Mensagens: 11 Localização: Em algum código fonte
|
Enviada: Sex Mai 07, 2010 9:37 am Assunto: |
|
|
Bom dia cara....a partir da versão 2009 houveram mudanças significativas na VCL e no compilador....
o primeiro erro....vc pode resolver retirando o [b]With[\b] e colocando nome do objeto antes da propriedade....como fazemos normalmente....
Eu particularmente detesto usar With....fica difícil de se compreender....
Esse link pode ajudar vc..
http://delphi.about.com/od/adptips2006/qt/record_property.htm
Eu não sabia dessa integração com o python, tbm sou fão dessa linguagem....já procurei e vou estudar tbm....e vou tentar instalar na versão 2010....se eu conseguir postarei aq pra vc...e para quem quiser....
Espero ter ajudado...
 |
|
| Voltar ao Topo |
|
 |
|