Commits

Marek Kubica committed 8a6bdee

Implemented pushing numbers onto the stack

  • Participants
  • Parent commits 731309d

Comments (0)

Files changed (1)

     _stdin_handler = _stdout_handler
     _stderr_handler = _stdout_handler
 
+    def number(self, value):
+        gsu.run_code(self._instance, str(value))
+
+    def __getattr__(self, name):
+        print("Pushing {0} on stack".format(name))
+        return self
+
 def main():
     gsi = GhostScriptInterpreter()
+    gsi.number(1)
+    print(gsi)
 
 if __name__ == '__main__':
     main()