blob8108 wrote:
Hardmath123 wrote:
To test it on an iPad, dump this file into a the snap source, add changes.js to the HTML file, and then run this server:
Code:
#!/usr/bin/python from twisted.web.server import Site from twisted.web.static import File from twisted.web.resource import Resource from twisted.internet import reactor import socket IP = socket.gethostbyname(socket.gethostname()) root = Resource() mstatic = File(raw_input("Input the directory where Snap! is located:\n>>> ")) root.putChild("snap",mstatic) factory = Site(root) reactor.listenTCP(8000, factory, interface=IP) print "Connection successful. Open Safari on an iPad and go to:" print IP+":8000/snap/snap.html" reactor.run()Is that just a static webserver to serve up a directory?
Yeah—a nice convenient way to test stuff on an iPad.
Offline
nXIII wrote:
Well, Opera mini doesn't.
![]()
Apparently Opera mobile does. 0_0
Offline
I was ill today, so I wrote a little JS tool to generate scratchblocks code straight from 2.0 projects. @Hardmath Thanks for mentioning corsproxy!
The 2.0 format is much cleaner. @n Have you written that JSON format for Snap! yet?
If I still feel ill tomorrow, I'll get started on that Snap! web browser...
EDIT: eh heh heh.
Last edited by blob8108 (2013-03-22 18:14:44)
Offline
So was the rest of the community…
Offline
bharvey wrote:
technoboy10 wrote:
Snapduino pre-pre-alpha is out now (you can turn on and off a digital pin
)! http://www.github.com/technoboy10/snapduino
You're awesome. Let us know when it's ready to put on the Snap! page.
Thanks! It'll probably be ready in a week or so. (I still don't know to handle multiple Arduinos, though).
Last edited by technoboy10 (2013-03-23 07:46:54)
Offline
bharvey wrote:
Hardmath123 wrote:
So was the rest of the community…
Ah, you're online. I replied to your comment.
Yeah, I wrote back—check your messages. Thanks a lot, Brian.
Offline
This might be an interesting project to watch:
https://github.com/TsvetanUsunov/SNAP-OLinuXino
It's a Snap! extension for an embedded Linux board.
Offline
technoboy10 wrote:
a Snap! extension for an embedded Linux board.
Looks like so far the project is just a readme... Maybe you should collaborate with the guy? Or just point him at your code for one of the other devices?
(Or should I do that, since we don't know him and I'm an adult?)
Offline
bharvey wrote:
technoboy10 wrote:
a Snap! extension for an embedded Linux board.
Looks like so far the project is just a readme... Maybe you should collaborate with the guy? Or just point him at your code for one of the other devices?
(Or should I do that, since we don't know him and I'm an adult?)
Actually, it's going to be based on my code. I just need to put up some documentation on how to make an extension.
Last edited by technoboy10 (2013-03-24 11:59:32)
Offline
bharvey wrote:
technoboy10 wrote:
![]()
!
Hey, can you program a robot to dig through the huge pile of paper on my desk and find all the income-tax-related ones?![]()
If they're all labeled with QR codes, why not?
Offline
Hardmath123 wrote:
I'll give you the gdocs zip link…
EDIT: Here's the closed-source mac-only version: https://docs.google.com/file/d/0B1UC0dD … sp=sharing. I'll make a new ZIP with annotated source and instructions later today, but for now this should suffice.![]()
What I'd like is a single URL to which we can send people of all operating systems where they can download the right thing for their platform. Tnx.
Offline
If anyone's willing to host a makeshift HTML on their dropbox, I can whip something up. Do you care about the source? Also, would you like me to try and compile everything with the SLeopard Python compiler (that was removed in Lion/ML for reasons unknown to mortals…), or are you ok with telling people to execute shell scripts/batch scripts?
Offline
Hardmath123 wrote:
If anyone's willing to host a makeshift HTML on their dropbox, I can whip something up. Do you care about the source? Also, would you like me to try and compile everything with the SLeopard Python compiler (that was removed in Lion/ML for reasons unknown to mortals…), or are you ok with telling people to execute shell scripts/batch scripts?
On the Mac we can wrap a shell script in a Platypus app.
Won't sourceforge or github work as a repository? If you don't want to make an account there, perhaps you could send files to tb10, who's done this before for his projects.
Offline
bharvey wrote:
Won't sourceforge or github work as a repository? If you don't want to make an account there, perhaps you could send files to tb10, who's done this before for his projects.
I'd be happy to put snapin8r on GitHub for you (since I'm going to be adding it to Kurt at some point anyway... )
Hardmath123 wrote:
If anyone's willing to host a makeshift HTML on their dropbox, I can whip something up.
You can use Github Pages for hosting, too. That's how I hosted the scratchblocks2 test page; it's essentially just a separate branch on GitHub.
Do you care about the source? Also, would you like me to try and compile everything with the SLeopard Python compiler (that was removed in Lion/ML for reasons unknown to mortals…), or are you ok with telling people to execute shell scripts/batch scripts?
Just distribute the source Python files (like the ones you sent me), and then it should work across platforms...
Last edited by blob8108 (2013-03-25 10:57:13)
Offline
bharvey wrote:
blob8108 wrote:
Just distribute the source Python files (like the ones you sent me), and then it should work across platforms...
Umm, we want people who aren't software developers to be able to use it!
Oh, absolutely! But Python sources is much better than compiled pyc files...
Offline
bharvey wrote:
Won't sourceforge or github work as a repository? If you don't want to make an account there, perhaps you could send files to tb10, who's done this before for his projects.
Yeah, GitHub is really nice for this kind of thing.
Offline
Darn, I was going to reverse engineer the source with Uncompyle but you used Python 3, didn't you?
Offline
shadow_7283 wrote:
Darn, I was going to reverse engineer the source with Uncompyle but you used Python 3, didn't you?
If you mean Snapin8r — it's definitely not Python 3. </impersonate=Hardmath>
Last edited by blob8108 (2013-03-25 19:28:38)
Offline
blob8108 wrote:
bharvey wrote:
Won't sourceforge or github work as a repository? If you don't want to make an account there, perhaps you could send files to tb10, who's done this before for his projects.
I'd be happy to put snapin8r on GitHub for you (since I'm going to be adding it to Kurt at some point anyway...
)
Hardmath123 wrote:
If anyone's willing to host a makeshift HTML on their dropbox, I can whip something up.
You can use Github Pages for hosting, too. That's how I hosted the scratchblocks2 test page; it's essentially just a separate branch on GitHub.
Ok, great!
Do you care about the source? Also, would you like me to try and compile everything with the SLeopard Python compiler (that was removed in Lion/ML for reasons unknown to mortals…), or are you ok with telling people to execute shell scripts/batch scripts?
Just distribute the source Python files (like the ones you sent me), and then it should work across platforms...
Alright. I'll also add an optional shell script for Unix and see if I can write a simple Batch script for Windows.
Should I use tkinter for a GUI, or are people ok with typing on a command-line? I really don't want tkinter, because it's iffy on Windows and I always found it rather glitchy on Mac (excessive flickering with askstring…).
Offline
Hardmath123 wrote:
Alright. I'll also add an optional shell script for Unix and see if I can write a simple Batch script for Windows.
I vote for slick spiffy installers (just an app will do on the Mac, but probably an Inno Setup installer for Windows) for the normal-people OSes. It can be as ugly as you like for Linux.
Offline
Can someone test this neat trick I found for Windows? Add this to the top of a Python file:
@setlocal enabledelayedexpansion && python -x "%~f0" %* & exit /b !ERRORLEVEL!
and it should be double-clickable…
http://halotis.com/2009/08/21/running-p … z2OczZyBfy
Offline