Python Forum
xvfb - Python Module - simpe_3dviz - wxpython - gui
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
xvfb - Python Module - simpe_3dviz - wxpython - gui
#1
Hello all - Jayson Here... and i have an issue with a Program that uses WxPython now for a gui, hopefully with flask later for web visability on my Virtual Machine.

The .py file makes an solid.stl file reads it and displays the stl mesh, however, my issue comes up on the last line of code.

and it is with the x display.

Code: stl.py
from solid2 import *
from jupyterscad import view
from simple_3dviz import Mesh
from simple_3dviz.window import show
from simple_3dviz.utils import render
import os
import subprocess
from subprocess import Popen, PIPE, STDOUT

subprocess.Popen('sudo Xvfb :1', shell=True, stdout=subprocess.PIPE, stderr=STDOUT)
os.environ['DISPLAY'] = '127.0.0.1:1'

d = cube(5) + sphere(5).right(5) - cylinder(r=2, h=6)
scad = (scad_render(d))
view(scad, outfile='/var/www/design.stl')
m = Mesh.from_file('/var/www/design.stl', color=(0.1,0.5,0.1))
show(m, camera_position=(-60., -160, 120), camera_target=(0., 0, 40), light=(-60, -160, 120))
say i run the program, with
sudo python3 /var/www/cgi-bin/stl.py
this happens....
   


Any knowledge that could get me closer to a screen? maybe on the web too...
Reply


Messages In This Thread
xvfb - Python Module - simpe_3dviz - wxpython - gui - by JayToll - Apr-11-2024, 09:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [WxPython] wxpython and python 3.6 on linux Barrowman 3 6,886 Mar-15-2018, 06:57 PM
Last Post: Larz60+
  wxPython install on raspberry pi3 and python 3.6.2. djdan_23 3 7,211 Sep-13-2017, 11:49 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020