Skip to content

Commit

Permalink
MAINT: fix Python code.
Browse files Browse the repository at this point in the history
  • Loading branch information
oddkiva committed Dec 20, 2023
1 parent 6d6c5ae commit b376c56
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions python/oddkiva/sara/graphics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from PySide2.QtGui import QImage
from PySide2.QtWidgets import QApplication

from do.sara.graphics.derived_qobjects.graphics_context import GraphicsContext
import do.sara.graphics.image_draw as image_draw
from oddkiva.sara.graphics.derived_qobjects.graphics_context import GraphicsContext
import oddkiva.sara.graphics.image_draw as image_draw


def millisleep(ms):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from PySide2.QtCore import QObject, Qt
from PySide2.QtWidgets import QApplication

from do.sara.graphics.derived_qobjects.painting_window import PaintingWindow
from do.sara.graphics.derived_qobjects.user_thread import UserThread
from oddkiva.sara.graphics.derived_qobjects.painting_window import PaintingWindow
from oddkiva.sara.graphics.derived_qobjects.user_thread import UserThread


class Singleton(type):
Expand Down
6 changes: 3 additions & 3 deletions python/oddkiva/sara/graphics/examples/hello_sara.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

import numpy as np

import do.sara as sara
import do.shakti as shakti
import oddkiva.sara as sara
import oddkiva.shakti as shakti


def user_main():
video_file = sys.argv[1]
video_stream = sara.VideoStream()
video_stream.open(video_file)
video_stream.open(video_file, True)

h, w, _ = video_stream.sizes()

Expand Down
4 changes: 2 additions & 2 deletions python/oddkiva/sara/graphics/examples/hello_square.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def initialize_geometry_on_gpu(self):
raise ValueError('Could not create VBO')
self.vbo.bind()
self.vbo.setUsagePattern(QOpenGLBuffer.StaticDraw)
vertices_data = self.vertices.tostring()
vertices_data = self.vertices.tobytes()
self.vbo.allocate(len(vertices_data))
self.vbo.write(0, vertices_data, len(vertices_data))

Expand All @@ -96,7 +96,7 @@ def initialize_geometry_on_gpu(self):
raise ValueError('Could not create EBO')
self.ebo.bind()
self.ebo.setUsagePattern(QOpenGLBuffer.StaticDraw)
triangles_data = self.triangles.tostring()
triangles_data = self.triangles.tobytes()
self.ebo.allocate(len(triangles_data))
self.ebo.write(0, triangles_data, len(triangles_data))

Expand Down

0 comments on commit b376c56

Please sign in to comment.