Skip to content

Delete node does not work if used from a method #278

Open
@arpicheck

Description

@arpicheck

Which Plugin?

python-scripting-plugin

Expected Behavior

del statement work from methods as well

Current Behavior

Using del statement works well when issued from the console, but does not have any effect, when used inside of a method.

Possible Solution

Steps to Reproduce

def removeNodes()
for node in g.nodes:
del node

removeNodes()

The above statement should result in all nodes removed from the graph. Instead, it has no effect.
As far as I know, the plugin does not give any other solution for removing nodes.

I tried
g.nodes.remove(...)

but couldn't figure out if this would work with any key.

Context

I can't use python scripts solving complex solutions. One has to always copy/paste scripts into console.

Your Environment

  • Gephi Version used: Gephi 0.9.7 202208031831
  • Plugin Version used: 0.9.2
  • Operating System: Windows 8.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions