lokeshh_rubypython 0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/.autotest +3 -0
  3. data/.gitignore +18 -0
  4. data/.hgignore +20 -0
  5. data/.hgtags +12 -0
  6. data/.rspec +2 -0
  7. data/Contributors.rdoc +11 -0
  8. data/History.rdoc +214 -0
  9. data/License.rdoc +26 -0
  10. data/Manifest.txt +46 -0
  11. data/PostInstall.txt +16 -0
  12. data/README.rdoc +272 -0
  13. data/Rakefile +118 -0
  14. data/autotest/discover.rb +1 -0
  15. data/lib/rubypython/blankobject.rb +23 -0
  16. data/lib/rubypython/conversion.rb +332 -0
  17. data/lib/rubypython/interpreter.rb +262 -0
  18. data/lib/rubypython/macros.rb +56 -0
  19. data/lib/rubypython/operators.rb +120 -0
  20. data/lib/rubypython/pygenerator.rb +61 -0
  21. data/lib/rubypython/pymainclass.rb +80 -0
  22. data/lib/rubypython/pyobject.rb +189 -0
  23. data/lib/rubypython/python.rb +199 -0
  24. data/lib/rubypython/pythonerror.rb +80 -0
  25. data/lib/rubypython/rubypyproxy.rb +328 -0
  26. data/lib/rubypython/tuple.rb +10 -0
  27. data/lib/rubypython/type.rb +20 -0
  28. data/lib/rubypython.rb +229 -0
  29. data/spec/basic_spec.rb +50 -0
  30. data/spec/callback_spec.rb +53 -0
  31. data/spec/conversion_spec.rb +68 -0
  32. data/spec/pymainclass_spec.rb +24 -0
  33. data/spec/pyobject_spec.rb +202 -0
  34. data/spec/python_helpers/basics.py +23 -0
  35. data/spec/python_helpers/errors.py +2 -0
  36. data/spec/python_helpers/objects.py +48 -0
  37. data/spec/pythonerror_spec.rb +52 -0
  38. data/spec/refcnt_spec.rb +98 -0
  39. data/spec/rubypyclass_spec.rb +10 -0
  40. data/spec/rubypyproxy_spec.rb +261 -0
  41. data/spec/rubypython_spec.rb +59 -0
  42. data/spec/spec_helper.rb +71 -0
  43. data/website/index.rhtml +36 -0
  44. data/website/robots.txt +5 -0
  45. data/website/stylesheets/960.css +549 -0
  46. data/website/stylesheets/border-radius.htc +143 -0
  47. data/website/stylesheets/screen.css +132 -0
  48. metadata +297 -0
@@ -0,0 +1,549 @@
1
+ /* Containers */
2
+ .container_24 {
3
+ margin-left: auto;
4
+ margin-right: auto;
5
+ width: 960px;
6
+ }
7
+
8
+ /* Grid >> Children (Alpha ~ First, Omega ~ Last) */
9
+ .alpha {
10
+ margin-left: 0 !important;
11
+ }
12
+
13
+ .omega {
14
+ margin-right: 0 !important;
15
+ }
16
+
17
+ /* Grid >> Global */
18
+ .grid_1,
19
+ .grid_2,
20
+ .grid_3,
21
+ .grid_4,
22
+ .grid_5,
23
+ .grid_6,
24
+ .grid_7,
25
+ .grid_8,
26
+ .grid_9,
27
+ .grid_10,
28
+ .grid_11,
29
+ .grid_12,
30
+ .grid_13,
31
+ .grid_14,
32
+ .grid_15,
33
+ .grid_16,
34
+ .grid_17,
35
+ .grid_18,
36
+ .grid_19,
37
+ .grid_20,
38
+ .grid_21,
39
+ .grid_22,
40
+ .grid_23,
41
+ .grid_24 {
42
+ display: inline;
43
+ float: left;
44
+ position: relative;
45
+ margin-left: 10.0px;
46
+ margin-right: 10.0px;
47
+ }
48
+
49
+ /* Grid >> 2 Columns */
50
+ .container_24 .grid_1 {
51
+ width: 20px;
52
+ }
53
+
54
+ .container_24 .grid_2 {
55
+ width: 60px;
56
+ }
57
+
58
+ .container_24 .grid_3 {
59
+ width: 100px;
60
+ }
61
+
62
+ .container_24 .grid_4 {
63
+ width: 140px;
64
+ }
65
+
66
+ .container_24 .grid_5 {
67
+ width: 180px;
68
+ }
69
+
70
+ .container_24 .grid_6 {
71
+ width: 220px;
72
+ }
73
+
74
+ .container_24 .grid_7 {
75
+ width: 260px;
76
+ }
77
+
78
+ .container_24 .grid_8 {
79
+ width: 300px;
80
+ }
81
+
82
+ .container_24 .grid_9 {
83
+ width: 340px;
84
+ }
85
+
86
+ .container_24 .grid_10 {
87
+ width: 380px;
88
+ }
89
+
90
+ .container_24 .grid_11 {
91
+ width: 420px;
92
+ }
93
+
94
+ .container_24 .grid_12 {
95
+ width: 460px;
96
+ }
97
+
98
+ .container_24 .grid_13 {
99
+ width: 500px;
100
+ }
101
+
102
+ .container_24 .grid_14 {
103
+ width: 540px;
104
+ }
105
+
106
+ .container_24 .grid_15 {
107
+ width: 580px;
108
+ }
109
+
110
+ .container_24 .grid_16 {
111
+ width: 620px;
112
+ }
113
+
114
+ .container_24 .grid_17 {
115
+ width: 660px;
116
+ }
117
+
118
+ .container_24 .grid_18 {
119
+ width: 700px;
120
+ }
121
+
122
+ .container_24 .grid_19 {
123
+ width: 740px;
124
+ }
125
+
126
+ .container_24 .grid_20 {
127
+ width: 780px;
128
+ }
129
+
130
+ .container_24 .grid_21 {
131
+ width: 820px;
132
+ }
133
+
134
+ .container_24 .grid_22 {
135
+ width: 860px;
136
+ }
137
+
138
+ .container_24 .grid_23 {
139
+ width: 900px;
140
+ }
141
+
142
+ .container_24 .grid_24 {
143
+ width: 940px;
144
+ }
145
+
146
+ /* Prefix Extra Space >> 2 Columns */
147
+ .container_24 .prefix_1 {
148
+ padding-left: 40px;
149
+ }
150
+
151
+ .container_24 .prefix_2 {
152
+ padding-left: 80px;
153
+ }
154
+
155
+ .container_24 .prefix_3 {
156
+ padding-left: 120px;
157
+ }
158
+
159
+ .container_24 .prefix_4 {
160
+ padding-left: 160px;
161
+ }
162
+
163
+ .container_24 .prefix_5 {
164
+ padding-left: 200px;
165
+ }
166
+
167
+ .container_24 .prefix_6 {
168
+ padding-left: 240px;
169
+ }
170
+
171
+ .container_24 .prefix_7 {
172
+ padding-left: 280px;
173
+ }
174
+
175
+ .container_24 .prefix_8 {
176
+ padding-left: 320px;
177
+ }
178
+
179
+ .container_24 .prefix_9 {
180
+ padding-left: 360px;
181
+ }
182
+
183
+ .container_24 .prefix_10 {
184
+ padding-left: 400px;
185
+ }
186
+
187
+ .container_24 .prefix_11 {
188
+ padding-left: 440px;
189
+ }
190
+
191
+ .container_24 .prefix_12 {
192
+ padding-left: 480px;
193
+ }
194
+
195
+ .container_24 .prefix_13 {
196
+ padding-left: 520px;
197
+ }
198
+
199
+ .container_24 .prefix_14 {
200
+ padding-left: 560px;
201
+ }
202
+
203
+ .container_24 .prefix_15 {
204
+ padding-left: 600px;
205
+ }
206
+
207
+ .container_24 .prefix_16 {
208
+ padding-left: 640px;
209
+ }
210
+
211
+ .container_24 .prefix_17 {
212
+ padding-left: 680px;
213
+ }
214
+
215
+ .container_24 .prefix_18 {
216
+ padding-left: 720px;
217
+ }
218
+
219
+ .container_24 .prefix_19 {
220
+ padding-left: 760px;
221
+ }
222
+
223
+ .container_24 .prefix_20 {
224
+ padding-left: 800px;
225
+ }
226
+
227
+ .container_24 .prefix_21 {
228
+ padding-left: 840px;
229
+ }
230
+
231
+ .container_24 .prefix_22 {
232
+ padding-left: 880px;
233
+ }
234
+
235
+ .container_24 .prefix_23 {
236
+ padding-left: 920px;
237
+ }
238
+
239
+ /* Suffix Extra Space >> 2 Columns */
240
+ .container_24 .suffix_1 {
241
+ padding-right: 40px;
242
+ }
243
+
244
+ .container_24 .suffix_2 {
245
+ padding-right: 80px;
246
+ }
247
+
248
+ .container_24 .suffix_3 {
249
+ padding-right: 120px;
250
+ }
251
+
252
+ .container_24 .suffix_4 {
253
+ padding-right: 160px;
254
+ }
255
+
256
+ .container_24 .suffix_5 {
257
+ padding-right: 200px;
258
+ }
259
+
260
+ .container_24 .suffix_6 {
261
+ padding-right: 240px;
262
+ }
263
+
264
+ .container_24 .suffix_7 {
265
+ padding-right: 280px;
266
+ }
267
+
268
+ .container_24 .suffix_8 {
269
+ padding-right: 320px;
270
+ }
271
+
272
+ .container_24 .suffix_9 {
273
+ padding-right: 360px;
274
+ }
275
+
276
+ .container_24 .suffix_10 {
277
+ padding-right: 400px;
278
+ }
279
+
280
+ .container_24 .suffix_11 {
281
+ padding-right: 440px;
282
+ }
283
+
284
+ .container_24 .suffix_12 {
285
+ padding-right: 480px;
286
+ }
287
+
288
+ .container_24 .suffix_13 {
289
+ padding-right: 520px;
290
+ }
291
+
292
+ .container_24 .suffix_14 {
293
+ padding-right: 560px;
294
+ }
295
+
296
+ .container_24 .suffix_15 {
297
+ padding-right: 600px;
298
+ }
299
+
300
+ .container_24 .suffix_16 {
301
+ padding-right: 640px;
302
+ }
303
+
304
+ .container_24 .suffix_17 {
305
+ padding-right: 680px;
306
+ }
307
+
308
+ .container_24 .suffix_18 {
309
+ padding-right: 720px;
310
+ }
311
+
312
+ .container_24 .suffix_19 {
313
+ padding-right: 760px;
314
+ }
315
+
316
+ .container_24 .suffix_20 {
317
+ padding-right: 800px;
318
+ }
319
+
320
+ .container_24 .suffix_21 {
321
+ padding-right: 840px;
322
+ }
323
+
324
+ .container_24 .suffix_22 {
325
+ padding-right: 880px;
326
+ }
327
+
328
+ .container_24 .suffix_23 {
329
+ padding-right: 920px;
330
+ }
331
+
332
+ /* Push Space >> 2 Columns */
333
+ .container_24 .push_1 {
334
+ left: 40px;
335
+ }
336
+
337
+ .container_24 .push_2 {
338
+ left: 80px;
339
+ }
340
+
341
+ .container_24 .push_3 {
342
+ left: 120px;
343
+ }
344
+
345
+ .container_24 .push_4 {
346
+ left: 160px;
347
+ }
348
+
349
+ .container_24 .push_5 {
350
+ left: 200px;
351
+ }
352
+
353
+ .container_24 .push_6 {
354
+ left: 240px;
355
+ }
356
+
357
+ .container_24 .push_7 {
358
+ left: 280px;
359
+ }
360
+
361
+ .container_24 .push_8 {
362
+ left: 320px;
363
+ }
364
+
365
+ .container_24 .push_9 {
366
+ left: 360px;
367
+ }
368
+
369
+ .container_24 .push_10 {
370
+ left: 400px;
371
+ }
372
+
373
+ .container_24 .push_11 {
374
+ left: 440px;
375
+ }
376
+
377
+ .container_24 .push_12 {
378
+ left: 480px;
379
+ }
380
+
381
+ .container_24 .push_13 {
382
+ left: 520px;
383
+ }
384
+
385
+ .container_24 .push_14 {
386
+ left: 560px;
387
+ }
388
+
389
+ .container_24 .push_15 {
390
+ left: 600px;
391
+ }
392
+
393
+ .container_24 .push_16 {
394
+ left: 640px;
395
+ }
396
+
397
+ .container_24 .push_17 {
398
+ left: 680px;
399
+ }
400
+
401
+ .container_24 .push_18 {
402
+ left: 720px;
403
+ }
404
+
405
+ .container_24 .push_19 {
406
+ left: 760px;
407
+ }
408
+
409
+ .container_24 .push_20 {
410
+ left: 800px;
411
+ }
412
+
413
+ .container_24 .push_21 {
414
+ left: 840px;
415
+ }
416
+
417
+ .container_24 .push_22 {
418
+ left: 880px;
419
+ }
420
+
421
+ .container_24 .push_23 {
422
+ left: 920px;
423
+ }
424
+
425
+ /* Pull Space >> 2 Columns */
426
+ .container_24 .pull_1 {
427
+ right: 40px;
428
+ }
429
+
430
+ .container_24 .pull_2 {
431
+ right: 80px;
432
+ }
433
+
434
+ .container_24 .pull_3 {
435
+ right: 120px;
436
+ }
437
+
438
+ .container_24 .pull_4 {
439
+ right: 160px;
440
+ }
441
+
442
+ .container_24 .pull_5 {
443
+ right: 200px;
444
+ }
445
+
446
+ .container_24 .pull_6 {
447
+ right: 240px;
448
+ }
449
+
450
+ .container_24 .pull_7 {
451
+ right: 280px;
452
+ }
453
+
454
+ .container_24 .pull_8 {
455
+ right: 320px;
456
+ }
457
+
458
+ .container_24 .pull_9 {
459
+ right: 360px;
460
+ }
461
+
462
+ .container_24 .pull_10 {
463
+ right: 400px;
464
+ }
465
+
466
+ .container_24 .pull_11 {
467
+ right: 440px;
468
+ }
469
+
470
+ .container_24 .pull_12 {
471
+ right: 480px;
472
+ }
473
+
474
+ .container_24 .pull_13 {
475
+ right: 520px;
476
+ }
477
+
478
+ .container_24 .pull_14 {
479
+ right: 560px;
480
+ }
481
+
482
+ .container_24 .pull_15 {
483
+ right: 600px;
484
+ }
485
+
486
+ .container_24 .pull_16 {
487
+ right: 640px;
488
+ }
489
+
490
+ .container_24 .pull_17 {
491
+ right: 680px;
492
+ }
493
+
494
+ .container_24 .pull_18 {
495
+ right: 720px;
496
+ }
497
+
498
+ .container_24 .pull_19 {
499
+ right: 760px;
500
+ }
501
+
502
+ .container_24 .pull_20 {
503
+ right: 800px;
504
+ }
505
+
506
+ .container_24 .pull_21 {
507
+ right: 840px;
508
+ }
509
+
510
+ .container_24 .pull_22 {
511
+ right: 880px;
512
+ }
513
+
514
+ .container_24 .pull_23 {
515
+ right: 920px;
516
+ }
517
+
518
+ /* Clear Floated Elements */
519
+ .clear {
520
+ clear: both;
521
+ display: block;
522
+ overflow: hidden;
523
+ visibility: hidden;
524
+ width: 0;
525
+ height: 0;
526
+ }
527
+
528
+ .clearfix:after {
529
+ clear: both;
530
+ content: ' ';
531
+ display: block;
532
+ font-size: 0;
533
+ line-height: 0;
534
+ visibility: hidden;
535
+ width: 0;
536
+ height: 0;
537
+ }
538
+
539
+ .clearfix {
540
+ display: inline-block;
541
+ }
542
+
543
+ * html .clearfix {
544
+ height: 1%;
545
+ }
546
+
547
+ .clearfix {
548
+ display: block;
549
+ }
@@ -0,0 +1,143 @@
1
+ --Do not remove this if you are using--
2
+ Original Author: Remiz Rahnas
3
+ Original Author URL: http://www.htmlremix.com
4
+ Published date: 2008/09/24
5
+
6
+ Changes by Nick Fetchak:
7
+ - IE8 standards mode compatibility
8
+ - VML elements now positioned behind original box rather than inside of it - should be less prone to breakage
9
+ Published date : 2009/11/18
10
+
11
+
12
+ <public:attach event="oncontentready" onevent="oncontentready('v08vnSVo78t4JfjH')" />
13
+ <script type="text/javascript">
14
+
15
+ // findPos() borrowed from http://www.quirksmode.org/js/findpos.html
16
+ function findPos(obj) {
17
+ var curleft = curtop = 0;
18
+
19
+ if (obj.offsetParent) {
20
+ do {
21
+ curleft += obj.offsetLeft;
22
+ curtop += obj.offsetTop;
23
+ } while (obj = obj.offsetParent);
24
+ }
25
+
26
+ return({
27
+ 'x': curleft,
28
+ 'y': curtop
29
+ });
30
+ }
31
+
32
+ function oncontentready(classID) {
33
+ if (this.className.match(classID)) { return(false); }
34
+
35
+ if (!document.namespaces.v) { document.namespaces.add("v", "urn:schemas-microsoft-com:vml"); }
36
+
37
+ this.className = this.className.concat(' ', classID);
38
+ var arcSize = Math.min(parseInt(this.currentStyle['-moz-border-radius'] ||
39
+ this.currentStyle['-webkit-border-radius'] ||
40
+ this.currentStyle['border-radius'] ||
41
+ this.currentStyle['-khtml-border-radius']) /
42
+ Math.min(this.offsetWidth, this.offsetHeight), 1);
43
+ var fillColor = this.currentStyle.backgroundColor;
44
+ var fillSrc = this.currentStyle.backgroundImage.replace(/^url\("(.+)"\)$/, '$1');
45
+ var strokeColor = this.currentStyle.borderColor;
46
+ var strokeWeight = parseInt(this.currentStyle.borderWidth);
47
+ var stroked = 'true';
48
+ if (isNaN(strokeWeight)) {
49
+ strokeWeight = 0;
50
+ strokeColor = fillColor;
51
+ stroked = 'false';
52
+ }
53
+
54
+ this.style.background = 'transparent';
55
+ this.style.borderColor = 'transparent';
56
+
57
+ // Find which element provides position:relative for the target element (default to BODY)
58
+ var el = this;
59
+ var limit = 100, i = 0;
60
+ while ((typeof(el) != 'unknown') && (el.currentStyle.position != 'relative') && (el.tagName != 'BODY')) {
61
+ el = el.parentElement;
62
+ i++;
63
+ if (i >= limit) { return(false); }
64
+ }
65
+ var el_zindex = parseInt(el.currentStyle.zIndex);
66
+ if (isNaN(el_zindex)) { el_zindex = 0; }
67
+ //alert('got tag '+ el.tagName +' with pos '+ el.currentStyle.position);
68
+
69
+ var rect_size = {
70
+ 'width': this.offsetWidth - strokeWeight,
71
+ 'height': this.offsetHeight - strokeWeight
72
+ };
73
+ var el_pos = findPos(el);
74
+ var this_pos = findPos(this);
75
+ this_pos.y = this_pos.y + (0.5 * strokeWeight) - el_pos.y;
76
+ this_pos.x = this_pos.x + (0.5 * strokeWeight) - el_pos.x;
77
+
78
+ var rect = document.createElement('v:roundrect');
79
+ rect.arcsize = arcSize +'px';
80
+ rect.strokecolor = strokeColor;
81
+ rect.strokeWeight = strokeWeight +'px';
82
+ rect.stroked = stroked;
83
+ rect.style.display = 'block';
84
+ rect.style.position = 'absolute';
85
+ rect.style.top = this_pos.y +'px';
86
+ rect.style.left = this_pos.x +'px';
87
+ rect.style.width = rect_size.width +'px';
88
+ rect.style.height = rect_size.height +'px';
89
+ rect.style.antialias = true;
90
+ rect.style.zIndex = el_zindex - 1;
91
+
92
+ var fill = document.createElement('v:fill');
93
+ fill.color = fillColor;
94
+ fill.src = fillSrc;
95
+ fill.type = 'tile';
96
+
97
+ rect.appendChild(fill);
98
+ el.appendChild(rect);
99
+
100
+ var css = el.document.createStyleSheet();
101
+ css.addRule("v\\:roundrect", "behavior: url(#default#VML)");
102
+ css.addRule("v\\:fill", "behavior: url(#default#VML)");
103
+
104
+ isIE6 = /msie|MSIE 6/.test(navigator.userAgent);
105
+ // IE6 doesn't support transparent borders, use padding to offset original element
106
+ if (isIE6 && (strokeWeight > 0)) {
107
+ this.style.borderStyle = 'none';
108
+ this.style.paddingTop = parseInt(this.currentStyle.paddingTop || 0) + strokeWeight;
109
+ this.style.paddingBottom = parseInt(this.currentStyle.paddingBottom || 0) + strokeWeight;
110
+ }
111
+
112
+ if (typeof(window.rounded_elements) == 'undefined') {
113
+ window.rounded_elements = new Array();
114
+
115
+ if (typeof(window.onresize) == 'function') { window.previous_onresize = window.onresize; }
116
+ window.onresize = window_resize;
117
+ }
118
+ this.element.vml = rect;
119
+ window.rounded_elements.push(this.element);
120
+ }
121
+
122
+ function window_resize() {
123
+ if (typeof(window.rounded_elements) == 'undefined') { return(false); }
124
+
125
+ for (var i in window.rounded_elements) {
126
+ var el = window.rounded_elements[i];
127
+
128
+ var strokeWeight = parseInt(el.currentStyle.borderWidth);
129
+ if (isNaN(strokeWeight)) { strokeWeight = 0; }
130
+
131
+ var parent_pos = findPos(el.vml.parentNode);
132
+ var pos = findPos(el);
133
+ pos.y = pos.y + (0.5 * strokeWeight) - parent_pos.y;
134
+ pos.x = pos.x + (0.5 * strokeWeight) - parent_pos.x;
135
+
136
+ el.vml.style.top = pos.y +'px';
137
+ el.vml.style.left = pos.x +'px';
138
+ }
139
+
140
+ if (typeof(window.previous_onresize) == 'function') { window.previous_onresize(); }
141
+ }
142
+ </script>
143
+