Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
ecdb8d17
Commit
ecdb8d17
authored
Jul 13, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:kliment/Printrun
parents
6c11a1da
00156cc3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
prontserve.py
prontserve.py
+3
-3
setup.py
setup.py
+9
-3
No files found.
prontserve.py
View file @
ecdb8d17
...
@@ -100,7 +100,7 @@ class JobsHandler(tornado.web.RequestHandler):
...
@@ -100,7 +100,7 @@ class JobsHandler(tornado.web.RequestHandler):
def
post
(
self
):
def
post
(
self
):
self
.
read_bytes
=
0
self
.
read_bytes
=
0
self
.
total_bytes
=
self
.
request
.
content_length
self
.
total_bytes
=
self
.
request
.
content_length
self
.
body
=
''
self
.
chunks
=
[]
print
self
.
request
print
self
.
request
session_uuid
=
self
.
get_argument
(
"session_uuid"
,
None
)
session_uuid
=
self
.
get_argument
(
"session_uuid"
,
None
)
print
"me"
print
"me"
...
@@ -115,7 +115,7 @@ class JobsHandler(tornado.web.RequestHandler):
...
@@ -115,7 +115,7 @@ class JobsHandler(tornado.web.RequestHandler):
def
read_chunks
(
self
,
chunk
=
''
):
def
read_chunks
(
self
,
chunk
=
''
):
self
.
read_bytes
+=
len
(
chunk
)
self
.
read_bytes
+=
len
(
chunk
)
self
.
body
+=
chunk
self
.
chunks
.
append
(
chunk
)
if
chunk
:
self
.
process_chunk
()
if
chunk
:
self
.
process_chunk
()
chunk_length
=
min
(
100000
,
self
.
request
.
content_length
-
self
.
read_bytes
)
chunk_length
=
min
(
100000
,
self
.
request
.
content_length
-
self
.
read_bytes
)
...
@@ -123,7 +123,7 @@ class JobsHandler(tornado.web.RequestHandler):
...
@@ -123,7 +123,7 @@ class JobsHandler(tornado.web.RequestHandler):
self
.
request
.
connection
.
stream
.
read_bytes
(
self
.
request
.
connection
.
stream
.
read_bytes
(
chunk_length
,
self
.
read_chunks
)
chunk_length
,
self
.
read_chunks
)
else
:
else
:
self
.
request
.
_on_request_body
(
self
.
body
,
self
.
uploaded
)
self
.
request
.
_on_request_body
(
''
.
join
(
self
.
chunks
)
,
self
.
uploaded
)
def
process_chunk
(
self
):
def
process_chunk
(
self
):
print
self
.
get_argument
(
"session_uuid"
,
None
)
print
self
.
get_argument
(
"session_uuid"
,
None
)
...
...
setup.py
View file @
ecdb8d17
...
@@ -24,8 +24,10 @@ from distutils.command.install_data import install_data as _install_data
...
@@ -24,8 +24,10 @@ from distutils.command.install_data import install_data as _install_data
try
:
try
:
from
Cython.Build
import
cythonize
from
Cython.Build
import
cythonize
extensions
=
cythonize
(
"printrun/gcoder_line.pyx"
)
extensions
=
cythonize
(
"printrun/gcoder_line.pyx"
)
from
Cython.Distutils
import
build_ext
except
ImportError
:
except
ImportError
:
extensions
=
None
extensions
=
None
build_ext
=
None
INSTALLED_FILES
=
"installed_files"
INSTALLED_FILES
=
"installed_files"
...
@@ -142,6 +144,12 @@ for extra_data_dir in extra_data_dirs:
...
@@ -142,6 +144,12 @@ for extra_data_dir in extra_data_dirs:
destpath
=
os
.
path
.
join
(
"share"
,
"pronterface"
,
basedir
)
destpath
=
os
.
path
.
join
(
"share"
,
"pronterface"
,
basedir
)
data_files
.
append
((
destpath
,
files
))
data_files
.
append
((
destpath
,
files
))
cmdclass
=
{
"uninstall"
:
uninstall
,
"install"
:
install
,
"install_data"
:
install_data
}
if
build_ext
:
cmdclass
[
'build_ext'
]
=
build_ext
setup
(
setup
(
name
=
"Printrun"
,
name
=
"Printrun"
,
description
=
"Host software for 3D printers"
,
description
=
"Host software for 3D printers"
,
...
@@ -151,8 +159,6 @@ setup (
...
@@ -151,8 +159,6 @@ setup (
data_files
=
data_files
,
data_files
=
data_files
,
packages
=
[
"printrun"
,
"printrun.cairosvg"
,
"printrun.server"
,
"printrun.gl"
,
"printrun.gl.libtatlin"
],
packages
=
[
"printrun"
,
"printrun.cairosvg"
,
"printrun.server"
,
"printrun.gl"
,
"printrun.gl.libtatlin"
],
scripts
=
[
"pronsole.py"
,
"pronterface.py"
,
"plater.py"
,
"printcore.py"
,
"prontserve.py"
],
scripts
=
[
"pronsole.py"
,
"pronterface.py"
,
"plater.py"
,
"printcore.py"
,
"prontserve.py"
],
cmdclass
=
{
"uninstall"
:
uninstall
,
cmdclass
=
cmdclass
,
"install"
:
install
,
"install_data"
:
install_data
},
ext_modules
=
extensions
,
ext_modules
=
extensions
,
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment