File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ class PythonObject : public ObjectWrap {
5050 result->SetAccessor (String::NewSymbol (" toString" ), ToStringAccessor);
5151 result->SetAccessor (String::NewSymbol (" valueOf" ), ValueOfAccessor);
5252 result->SetAccessor (String::NewSymbol (" call" ), CallAccessor);
53+ result->SetCallAsFunctionHandler (Call, Handle<Value>());
5354 // result->SetAccessor(String::New("getAttribute"), get_attribute->GetFunction());
5455 // result->SetAccessor(String::New("CALL_NON_FUNCTION"), call->GetFunction());
5556 return scope.Close (result);
Original file line number Diff line number Diff line change 11var sys = require ( 'sys' ) ,
22 puts = sys . puts ,
3- binding = require ( './binding' ) ;
3+ binding = require ( './binding' ) ,
4+ http = require ( 'http' ) ;
45
56var sys = binding . import ( 'sys' ) ;
67var posix = binding . import ( 'os' ) ;
78
8- sys . path . append . call ( posix . getcwd . call ( ) . toString ( ) ) ;
9+ sys . path . append ( posix . getcwd ( ) . toString ( ) ) ;
910var gary_busey = binding . import ( "gary_busey" ) ;
1011var result = gary_busey . say_hey . call ( "man i suck" ) ;
1112
13+ /*
14+ var django_wsgi = binding.import('django.core.handlers.wsgi');
15+
16+ var wsgi_handler = django_wsgi.WSGIHandler.call()
17+
18+ http.createServer(function (req, res) {
19+ var wsgi_request = django_wsgi.WSGIRequest.call({
20+ 'path':req.url,
21+ });
22+ var result = wsgi_handler.get_response.call(wsgi_request);
23+
24+ res.writeHead(200, {'Content-Type':'text/plain'});
25+ res.write('Heyyyyy\n');
26+ res.close();
27+ }).listen(8000);
28+ */
1229puts ( result . toString ( ) ) ;
You can’t perform that action at this time.
0 commit comments