Jump to content

Search the Community

Showing results for tags 'tpythonmodule'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 1 result

  1. I'm having the following problem with TPythonDelphiVar component. I use the next method to create one instance of this component on-the-fly: function TForm1.NewVariable(AVarName :string):TPythonDelphiVar; begin Result := TPythonDelphiVar.Create(nil); Result.Engine := PythonEngine; Result.Module := '__main__'; Result.VarName := AVarName; Result.Initialize; end; I have a Private variable declared in the TForm1class, like this: public FVariable :TPythonDelphiVar; And I use the next code to create on-the-fly my variable QUANTITY: FVariable := NewVariable('QUANTITY'); FVariable.Value := 1.0; All seems ok, but when I execute the program, and I try to print the value of QUANTITY: (Phyton script). print(QUANTITY) I get the following message error in a message error window: "NameError: 'QUANTITY' is not defined. " And in the output memo of the PythonEngine, the next one: Traceback (most recent call last): File "<string>", line 13, in <module> NameError: name 'QUANTITY' is not defined I can't understand why creating the TPythonDelphiVar on-the-fly doesn't work while creating the same component in design time works well. Do you understand what the problem is?
×