Example #1
0
from __future__ import division

import compas
from compas_rhino.forms import Form

try:
    import clr
    from System.Drawing import Size
    from System.Drawing import Point
    from System.Drawing import Color

    clr.AddReference("System.Windows.Forms.DataVisualization")
    from System.Windows.Forms.DataVisualization import Charting

except ImportError:
    if compas.is_ironpython() and compas.is_windows():
        raise

try:
    basestring
except NameError:
    basestring = str

__all__ = ['ChartForm']


class Series(object):
    pass


class ChartForm(Form):
Example #2
0
import compas

from compas.utilities import DataEncoder
from compas.utilities import DataDecoder

try:
    import cPickle as pickle
except ImportError:
    import pickle

try:
    from subprocess import Popen
    from subprocess import PIPE

except ImportError:
    if compas.is_windows():
        compas.raise_if_not_ironpython()
    elif not compas.is_mono():
        raise

__all__ = ['XFunc']

WRAPPER = """
import os
import sys
import importlib

import json

try:
    import cPickle as pickle
Example #3
0
 def _detect_display(self):
     if self.connection_type == 'gui' and system != 'darwin' and not compas.is_windows() and ('DISPLAY' not in os.environ):
         self.connection_type = 'direct'
         print('No display detected! Continuing without GUI.')