If you just want to parse the HTML, use
@mikael isn't there a delegate that would let you filter by uri? I forget if the should_load_uri or whatever gets called for <img>'s -- in which case he could just return false for non-html urls.
Sorry I should have mentioned you need to
If you want to see what path your script is operating in, use
But when you got the play button pythonista sets the current path to the script path, so generally you can use open('filename') as long as filename is in the same folder as your main script.
If you place your script and csv file in the same folder, you can usually just use local path names.
A good way to debug this type of thing:
In the console:
The "My iPad" folder is
If you are trying to open a file in iCloud or external shared file, those work differently...
Radians are much more natural when computing sin/cos's.
sin(x) = x - x**3/3! + x**5/5! - ....
So, small angles are easy to work with in radians, because sin(x) = x. Also, from a beauty perspective, sin and cosine are defined this way -- using any other unit results in ugly equations, which therefore are less fundamental.
Consider other branches of physics/engineering where you deal with oscillators/wave equations. There you have sins/cos's of other unitless quantities, such as frequency times time, or distance divided by wavelength -- things get really clumsy if everything must be defined in degrees.
Degrees really only ever make sense when talking about geometrical things, though arguably "revolutions" is a more fundamental / intuitive concept..
@cvps code used polygon primatives -- so the data first has list of polygon lengths, then list of vertices making each face.
If you want to make your cube out of squares, you would need 8 vertices (cvp has 6), then if you ordered the vertices going clockwise in the first plane, then clockwise in the second plane, then you would have
[4,4,4,4,4,4, # six faces, each has 4 sides
0,3,2,1# bottom face
1,2,6,5,# right face
2,3,7,6# back face
3,0, 4,7# left face
0,1,5,4 # front face
Depending on how your order your vertices, it might be a little different for you.
You'll want to make sure you provide indexes in a clockwise order for each face as viewed from outside, otherwise some of the faces will be considered inside faces, which might screw with lighting/shading or applying textures.