GH_CPython

GH_CPython is a CPython plugin for Grasshopper.

  • Blurp _ Dna

  • Mahmoud AbdelRahman

    This is great !. 

    Well done. 

    I have modified the unintended purple color that's appeared. 

    Thanks so much. 

     

  • Blurp _ Dna

    I downloaded the new version.

  • Mahmoud AbdelRahman

    Hi everyone, 

    Thanks so much for joining this group. 

    Any comments, feedback or contribution are most welcome to improve this tool, I'm working now on enabling RhinoScriptSynatx module, I have an idea to do this and I wish that everything goes well. 

    Thanks so much. 

    Mahmoud Abdelrahman

  • kheireddine Naib

    allah ybarek fik 

  • Mahmoud AbdelRahman

    Thanks  kheireddine Naib,  

    The same to you. 

  • Max Marschall

    Just realized that matplotlib also works with this...amazing! Great job Mahmoud!

  • Max Marschall

    Hi Mahmoud, is this the right place to post questions/issues?

    If so, is it possible to pass dictionaries between CPython components? The error I'm getting below is:

    1. Traceback (most recent call last):
    File "C:\GH_CPython\PythonFileWritten_7.py", line 1, in <module>
    exec('output_ = None\n_input = [\'a\': 1] \n\nclass fileInfo:\n def __init__(self):\n self.filePath = "C:/GH_CPython"\n self.fileName = "unname"\nghenv = fileInfo()\n\n\n')
    File "<string>", line 2
    _input = ['a': 1]
    ^
    SyntaxError: invalid syntax

    PS: There is no file C:\GH_CPython\PythonFileWritten_7.py

  • Max Marschall

    Hi again,

    Is there a way to pass matplotlib axes objects? I want to define a graph in one component, then pass it to another component in order to visualize (plt.show()) it. The error message is

    1. Traceback (most recent call last):
    File "C:\GH_CPython\PythonFileWritten_11.py", line 1, in <module>
    exec('ax = AxesSubplot(0.125,0.11;0.775x0.77) \nshow = True \n\nclass fileInfo:\n def __init__(self):\n self.filePath = "C:/GH_CPython"\n self.fileName = "unname"\nghenv = fileInfo()\n\n\n')
    File "<string>", line 1
    ax = AxesSubplot(0.125,0.11;0.775x0.77)
    ^
    SyntaxError: invalid syntax

    gh file attached

    matplotlib.gh

  • Charles Fried

    This could be a really great tool however every time I select and input a Tree it freezes.

    Autocomplete would also be hugely helpful!

  • Charles Fried

    After further investigation it crashes when you feed it either <null> or <empty> values

  • Francisco

    Hi Mahmoud, 

    I'm trying to run a script to modify an external file but process the data inside Grasshopper. I developed a script that allows me to do so if I'm working directly with python but I struggled when trying to integrate the script into GH. I tried using your component and pair it up with Anaconda, but it is not recognizing some dependencies.  Any chance you can identify the reason as to why the script is not running? I'm working with Python 3.7

  • Eliot

    hi

    I recently used this component so i'm new with it and need help

    I have an operation that I want to repeat for my different inputs

    for example :
    I need a code to do this once for x and once for y once for z and once for u and give all the answers 

  • YU

    Hi Mahmoud, 

    thank you for the plugin!

    I have a question regarding the output data type.

    I am using the librosa library to read and analysis sound file. 

    However, the output "stft" should be a list of float numbers.

    But it seems like it tooks extra and slow computing while I connect the output to the num param.

    I am not sure why this slow computing happened. If you have any thoughts on this? thanks