9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] python
@ 2006-12-23 21:50 Bad-Santa
  2006-12-23 23:54 ` ron minnich
  0 siblings, 1 reply; 39+ messages in thread
From: Bad-Santa @ 2006-12-23 21:50 UTC (permalink / raw)
  To: 9fans

On Sat Dec 23 15:29:19 EST 2006, rsc@swtch.com wrote:
> > Python 2.4.3. port from Moroo Jun is also old.
> > Compiler stops at rendezvous()
> 
> The prototype for rendezvous changed,
> but the semantics did not.  You can just
> cast the old call so that it compiles and
> it will continue to work.
> 
> Russ

This is the diff:

diff /n/dump/2005/1027/sys/src/cmd/python/Plan9/plan9module.c /sys/src/cmd/python/Plan9/plan9module.c
881c881,882
< 	ulong tag, val;
---
> 	uvlong tag, val;
> 	void *p;
883c884
< 	if(!PyArg_ParseTuple(args, "ll:rendezvous", &tag, &val))
---
> 	if(!PyArg_ParseTuple(args, "LL:rendezvous", &tag, &val))
886c887
< 	val = rendezvous(tag, val);
---
> 	p = rendezvous((void*)tag, (void*)val);
888c889
< 	if(val == ~0)
---
> 	if(p == (void*)-1)
890c891
< 	return PyInt_FromLong(val);
---
> 	return PyLong_FromLongLong((uvlong)p);


^ permalink raw reply	[flat|nested] 39+ messages in thread
* [9fans] Python
@ 2010-10-10 14:06 Michaelian Ennis
  2010-10-10 14:21 ` Federico G. Benavento
  0 siblings, 1 reply; 39+ messages in thread
From: Michaelian Ennis @ 2010-10-10 14:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

 I use the contrib/install bichued/python. I was wondering this
morning if I could use Django's database API in plan9 so I tried to
install Django's current release on a test system.  It installed,
began byte-compiling the libraries and crashed.

byte-compiling /sys/lib/python/lib/python2.5/site-packages/django/template/defaultfilters.py
to defaultfilters.pyc
python 3092326: suicide: sys: fp: numeric overflow fppc=0x7cb86
status=0xf8a8 pc=0x0007cb8a

ian

gorilla; acid 3092326
/proc/3092326/text:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
acid: regs()
PC	0x0007cb8a float_mul+0xaf  /sys/src/cmd/python/Objects/floatobject.c:625
SP	0xdfffdae4 ECODE 0xf01006d4 EFLAG 0x00000246
CS	0x00000023 DS	 0x0000001b SS	0x0000001b
GS	0x0000001b FS	 0x0000001b ES	0x0000001b
TRAP	0x00000010 math coprocessor error
AX	0x003fa454 BX	0x00000000 CX	0x003fa454 DX	0x00000008
DI	0x0000022b SI	0x0007cadb BP	0x00000008
acid: stk()
float_mul(v=0x3fa454,w=0x3fa454)+0xaf
/sys/src/cmd/python/Objects/floatobject.c:625
binary_op1(op_slot=0x8,v=0x3fa454,w=0x3fa454)+0x9f
/sys/src/cmd/python/Objects/abstract.c:398
PyNumber_Multiply(v=0x3fa454,w=0x3fa454)+0x20
/sys/src/cmd/python/Objects/abstract.c:669
fold_binops_on_constants(consts=0x5d58ec,codestr=0x5a5d7d)+0xa3
/sys/src/cmd/python/Python/compile.c:490
optimize_code(lineno_obj=0x7b4bd0,code=0x602778,names=0x7b62cc,consts=0x5d58ec)+0x58e
/sys/src/cmd/python/Python/compile.c:857
makecode(c=0xdfffdd0c,a=0xdfffdc90)+0x34a
/sys/src/cmd/python/Python/compile.c:4450
assemble(c=0xdfffdd0c,addNone=0x1)+0x1f9
/sys/src/cmd/python/Python/compile.c:4566
compiler_mod(c=0xdfffdd0c,mod=0x855a30)+0xff
/sys/src/cmd/python/Python/compile.c:1833
PyAST_Compile(filename=0x55c8bc,arena=0x539d30,mod=0x855a30,flags=0xdfffdd9c)+0x126
/sys/src/cmd/python/Python/compile.c:293
Py_CompileStringFlags(str=0x3efdcc,filename=0x55c8bc,start=0x101,flags=0xdfffdd9c)+0x85
/sys/src/cmd/python/Python/pythonrun.c:1328
builtin_compile(args=0x4fe3c4)+0x1a7
/sys/src/cmd/python/Python/bltinmodule.c:464
PyCFunction_Call(func=0x3a20ac,arg=0x4fe3c4,kw=0x0)+0xc9
/sys/src/cmd/python/Objects/methodobject.c:73
call_function(oparg=0x3,pp_stack=0xdfffde78)+0x482
/sys/src/cmd/python/Python/ceval.c:3564
PyEval_EvalFrameEx(f=0x5a176c,throwflag=0x0)+0x48b7
/sys/src/cmd/python/Python/ceval.c:2267
PyEval_EvalCodeEx(globals=0x4e2dfc,co=0x4fac38,locals=0x0,argcount=0x3,defcount=0x3,kwcount=0x0,args=0x5a14c8,kws=0x5a14d4,defs=0x4fca60,closure=0x0)+0x2e3
/sys/src/cmd/python/Python/ceval.c:2831
fast_function(func=0x57b79c,n=0x3,nk=0x0,pp_stack=0xdfffe038,na=0x3)+0x88
/sys/src/cmd/python/Python/ceval.c:3660
call_function(oparg=0x3,pp_stack=0xdfffe038)+0x97
/sys/src/cmd/python/Python/ceval.c:3585
PyEval_EvalFrameEx(f=0x5a133c,throwflag=0x0)+0x48b7
/sys/src/cmd/python/Python/ceval.c:2267
PyEval_EvalCodeEx(globals=0x413934,co=0x417968,locals=0x0,argcount=0x1,defcount=0x7,kwcount=0x4,args=0x5987e0,kws=0x5987e4,defs=0x434e38,closure=0x0)+0x2e3
/sys/src/cmd/python/Python/ceval.c:2831
fast_function(func=0x434df4,n=0x9,nk=0x4,pp_stack=0xdfffe1f8,na=0x1)+0x88
/sys/src/cmd/python/Python/ceval.c:3660
call_function(oparg=0x401,pp_stack=0xdfffe1f8)+0x97
/sys/src/cmd/python/Python/ceval.c:3585
PyEval_EvalFrameEx(f=0x598694,throwflag=0x0)+0x48b7
/sys/src/cmd/python/Python/ceval.c:2267
fast_function(func=0x4fb95c,n=0x2,nk=0x0,pp_stack=0xdfffe34c,na=0x2)+0x117
/sys/src/cmd/python/Python/ceval.c:3650
call_function(oparg=0x1,pp_stack=0xdfffe34c)+0x97
/sys/src/cmd/python/Python/ceval.c:3585
PyEval_EvalFrameEx(f=0x49a8a4,throwflag=0x0)+0x48b7
/sys/src/cmd/python/Python/ceval.c:2267
fast_function(func=0x4fb8b4,n=0x1,nk=0x0,pp_stack=0xdfffe4a0,na=0x1)+0x117
/sys/src/cmd/python/Python/ceval.c:3650
call_function(oparg=0x0,pp_stack=0xdfffe4a0)+0x97
/sys/src/cmd/python/Python/ceval.c:3585
PyEval_EvalFrameEx(f=0x54ecec,throwflag=0x0)+0x48b7
/sys/src/cmd/python/Python/ceval.c:2267
fast_function(func=0x4490d4,n=0x2,nk=0x0,pp_stack=0xdfffe5f4,na=0x2)+0x117
/sys/src/cmd/python/Python/ceval.c:3650
call_function(oparg=0x1,pp_stack=0xdfffe5f4)+0x97
/sys/src/cmd/python/Python/ceval.c:3585
PyEval_EvalFrameEx(f=0x54ead4,throwflag=0x0)+0x48b7
/sys/src/cmd/python/Python/ceval.c:2267
fast_function(func=0x44af0c,n=0x2,nk=0x0,pp_stack=0xdfffe748,na=0x2)+0x117
/sys/src/cmd/python/Python/ceval.c:3650
call_function(oparg=0x1,pp_stack=0xdfffe748)+0x97
/sys/src/cmd/python/Python/ceval.c:3585
PyEval_EvalFrameEx(f=0x540b9c,throwflag=0x0)+0x48b7
/sys/src/cmd/python/Python/ceval.c:2267
fast_function(func=0x4d0534,n=0x1,nk=0x0,pp_stack=0xdfffe89c,na=0x1)+0x117
/sys/src/cmd/python/Python/ceval.c:3650
call_function(oparg=0x0,pp_stack=0xdfffe89c)+0x97
/sys/src/cmd/python/Python/ceval.c:3585
PyEval_EvalFrameEx(f=0x540124,throwflag=0x0)+0x48b7
/sys/src/cmd/python/Python/ceval.c:2267
fast_function(func=0x4490d4,n=0x2,nk=0x0,pp_stack=0xdfffe9f0,na=0x2)+0x117
/sys/src/cmd/python/Python/ceval.c:3650
call_function(oparg=0x1,pp_stack=0xdfffe9f0)+0x97
/sys/src/cmd/python/Python/ceval.c:3585
PyEval_EvalFrameEx(f=0x53a06c,throwflag=0x0)+0x48b7
/sys/src/cmd/python/Python/ceval.c:2267
fast_function(func=0x44909c,n=0x1,nk=0x0,pp_stack=0xdfffeb44,na=0x1)+0x117
/sys/src/cmd/python/Python/ceval.c:3650
call_function(oparg=0x0,pp_stack=0xdfffeb44)+0x97
/sys/src/cmd/python/Python/ceval.c:3585
PyEval_EvalFrameEx(f=0x52df94,throwflag=0x0)+0x48b7
/sys/src/cmd/python/Python/ceval.c:2267
PyEval_EvalCodeEx(globals=0x413acc,co=0x417458,locals=0x0,argcount=0x0,defcount=0x0,kwcount=0xc,args=0x473460,kws=0x473460,defs=0x0,closure=0x0)+0x2e3
/sys/src/cmd/python/Python/ceval.c:2831
fast_function(func=0x44f33c,n=0x18,nk=0xc,pp_stack=0xdfffed04,na=0x0)+0x88
/sys/src/cmd/python/Python/ceval.c:3660
call_function(oparg=0xc00,pp_stack=0xdfffed04)+0x97
/sys/src/cmd/python/Python/ceval.c:3585
PyEval_EvalFrameEx(f=0x473324,throwflag=0x0)+0x48b7
/sys/src/cmd/python/Python/ceval.c:2267
PyEval_EvalCodeEx(globals=0x3afacc,co=0x417380,locals=0x3afacc,argcount=0x0,defcount=0x0,kwcount=0x0,args=0x0,kws=0x0,defs=0x0,closure=0x0)+0x2e3
/sys/src/cmd/python/Python/ceval.c:2831
PyEval_EvalCode(co=0x417380,globals=0x3afacc,locals=0x3afacc)+0x57
/sys/src/cmd/python/Python/ceval.c:494
run_mod(mod=0x4779a0,filename=0xdfffefb7,flags=0xdfffef00,arena=0x3feb60,globals=0x3afacc,locals=0x3afacc)+0x4e
/sys/src/cmd/python/Python/pythonrun.c:1271
PyRun_FileExFlags(fp=0x266644,filename=0xdfffefb7,start=0x101,flags=0xdfffef00,closeit=0x1,globals=0x3afacc,locals=0x3afacc)+0xbb
/sys/src/cmd/python/Python/pythonrun.c:1257
PyRun_SimpleFileExFlags(filename=0xdfffefb7,fp=0x266644,closeit=0x1,flags=0xdfffef00)+0x1f9
/sys/src/cmd/python/Python/pythonrun.c:877
PyRun_AnyFileExFlags(filename=0xdfffefb7,fp=0x266644,flags=0xdfffef00,closeit=0x1)+0x7d
/sys/src/cmd/python/Python/pythonrun.c:696
Py_Main(argc=0x3,argv=0xdfffef9c)+0x469 /sys/src/cmd/python/Modules/main.c:523
main(argc=0x3,argv=0xdfffef9c)+0x81 /sys/src/cmd/python/plan9.c:29
_main+0x26 /sys/src/ape/lib/ap/386/main9.s:12



^ permalink raw reply	[flat|nested] 39+ messages in thread
* [9fans] python
@ 2007-01-04 22:31 ron minnich
  2007-01-05  4:14 ` John Barham
  0 siblings, 1 reply; 39+ messages in thread
From: ron minnich @ 2007-01-04 22:31 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

I'm at the point of having various tools install better, with a few
simpld additions and bug fixes.

One problem concerns extensions. PYthon loves .so files. Plan 9,
obviously, does not.

Lots of tools are structured in a way that's going to be a real pain
in the ass to fix. Python doesn't do 'make'. what it does is a
standard
python setup.py build
type of thing, and lots of tools 'just know' about /usr/include, etc.
(in spite of the fact that a lot of this junk is parameterized, many
of the tools have it hard-coded). They also know about stuff like .so
extensions, by groveling through (not kidding) the python makefile,
which seems to live in
-rw-r--r-- 1 root root 53592 Oct 23 11:58 /usr/lib/python2.4/config/Makefile

You need a standard set of rules for building a .so, and I am thinking
of something like this:
There is a directory, /pythonext (bind it in or whatever) with
8.out (python)
minimal set of .a? python libraries. from python source
mkfile
base config.c
in it.( config.c establishes the linkage from a python name to a C function. )

the .so ext is (e.g.) a8
building a .so:
build the .a8
cp to (e.g.) /pythonext/pycrypto.a8
echo some line (e.g.) {"pycrypto", pycryptoinit}, >> /python/pycrypto.ext

the mkfile, among other things, gathers the *.ext files into one .c,
then does a standard
mk with all the .a8 files. It's just an extension (ha ha) of what Plan
9 python build does now.

Either that or we finally get around to implementing loadable modules .

ron


^ permalink raw reply	[flat|nested] 39+ messages in thread
* [9fans] python
@ 2006-12-23  5:10 ron minnich
  2006-12-23  5:27 ` Russ Cox
  2006-12-23 11:57 ` Matt
  0 siblings, 2 replies; 39+ messages in thread
From: ron minnich @ 2006-12-23  5:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

anybody out there familiar with the python port? It seems to be a tad
old ... given that all the replica stuff is based on kfs :-)

I'm wondering how current it all is.

thanks

ron


^ permalink raw reply	[flat|nested] 39+ messages in thread
* [9fans] python
@ 2003-11-03 16:11 matt
  2003-11-03 15:20 ` Russ Cox
  0 siblings, 1 reply; 39+ messages in thread
From: matt @ 2003-11-03 16:11 UTC (permalink / raw)
  To: 9fans

Is there an active maintainer of python?

The Contrib one (2.2) is a year old now : Nov 13 2002

I remember reading that the plan9 version was built from the CVS of the time.

I imagine it would be quicker for whoever did it last time to repeat the process.

I wouldn't be too concerned but 2.2 doesn't have native generators so you have to add

from __future__ import generators

it also lacks the sum(), min(), and max() reduction functions

for the full list see :

 http://www.python.org/2.3/highlights.html

quite a few of the changes are to enable Unicode support.

m



^ permalink raw reply	[flat|nested] 39+ messages in thread
* Re: [9fans] python
@ 2002-03-11 18:51 Russ Cox
  2002-03-18 13:21 ` Boyd Roberts
  0 siblings, 1 reply; 39+ messages in thread
From: Russ Cox @ 2002-03-11 18:51 UTC (permalink / raw)
  To: 9fans

most of the functionality of the plan9 module
is in plan9.py rather than the _plan9 builtin.
i currently have the following in os.py:

elif '_plan9' in _names:
    name = 'plan9'
    linesep = '\n'
    curdir = '.'; pardir = '..'; sep = '/'
    import plan9
    from plan9 import *
    try:
        from plan9 import _exit
    except ImportError:
        pass
    stat = osstat
    dup2 = dup
    dup = osdup
    execvp = plan9._exec
    getcwd = getwd
    getpgrp = getnoteid
    getuid = getuser
    getlogin = getuser
    unlink = remove
    import plan9path as path
    __all__.extend(_get_exports_list(plan9))
    del plan9

import site does not complain when i run it,
but i admit to not understanding what it does,
so maybe something is silently failing.



^ permalink raw reply	[flat|nested] 39+ messages in thread
* [9fans] python
@ 2002-02-08 13:51 Boyd Roberts
  0 siblings, 0 replies; 39+ messages in thread
From: Boyd Roberts @ 2002-02-08 13:51 UTC (permalink / raw)
  To: 9fans

I took the 9p2000 native port [thanks russ] and turned it into 9p [on a VAIO]:

    http://home.fr.inter.net/boyd/code/plan9/pythonR3.tgz

Bugs to me.

And yes, I did various preprocessor crimes.


^ permalink raw reply	[flat|nested] 39+ messages in thread
* [9fans] python
@ 2001-12-06  7:29 Russ Cox
  2001-12-06  7:17 ` Lucio De Re
  0 siblings, 1 reply; 39+ messages in thread
From: Russ Cox @ 2001-12-06  7:29 UTC (permalink / raw)
  To: 9fans

g% 8.out
'import site' failed; use -v for traceback
Python 2.0.1 (#0, Dec  6 2001, 02:11:16) [C] on unknown
Type "copyright", "credits" or "license" for more information.
>>> from plan9 import *
>>> from plan9 import _exits		# underscore hides from *
>>> read(open("/dev/sysname", OREAD), 100)
'17genr'
>>> if rfork(RFPROC)==0:
... 	write(2, "child\n")
... 	_exits("")
... else:
... 	write(2, "parent\n")
...
child
parent
7
>>>

it's still rough, but i'm willing to put it into
lucio's cvs repository so people can hack
on getting it up to speed.  send me mail if you're
interested.

unlike the other os-specific modules, i think the plan9
one should include just the system calls and
then have the rest implemented as python code
rather than the fairly difficult c layering.

the eventual goal is to bring in the ``stackless
python'' patches, so we can have really cheap
continuations and build a csp-style threading
module that has neither stack overflow concerns
nor ridiculously large stacks.

russ



^ permalink raw reply	[flat|nested] 39+ messages in thread
* [9fans] python
@ 2001-12-02  9:39 Russ Cox
  2001-12-02 12:08 ` Boyd Roberts
                   ` (2 more replies)
  0 siblings, 3 replies; 39+ messages in thread
From: Russ Cox @ 2001-12-02  9:39 UTC (permalink / raw)
  To: 9fans

Supposedly a Python port exists, but the URL
on the Wiki and in the Plan 9 FAQ doesn't work.

Anyone have other details?  Do you know if it
was a native port or an APE port?

Thanks.
Russ




^ permalink raw reply	[flat|nested] 39+ messages in thread
* [9fans] Python
@ 2000-11-06  8:26 Jonathan Sergent
  0 siblings, 0 replies; 39+ messages in thread
From: Jonathan Sergent @ 2000-11-06  8:26 UTC (permalink / raw)
  To: 9fans

nigel@9fs.org:
> So where is it available?

I'm working on that--give me until tomorrow (it's late here).

I didn't mention that I compiled GNU grep in order to make the
autoconf script run.

--jss.



^ permalink raw reply	[flat|nested] 39+ messages in thread
* [9fans] Python
@ 1999-01-16  5:53 arisawa
  0 siblings, 0 replies; 39+ messages in thread
From: arisawa @ 1999-01-16  5:53 UTC (permalink / raw)


Hello 9fans!

I have imported Python-1.5.1 to Plan9.

You will get it from:
ftp://plan9.aichi-u.ac.jp

Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp




^ permalink raw reply	[flat|nested] 39+ messages in thread
* [9fans] Python
@ 1998-12-30  0:17 arisawa
  0 siblings, 0 replies; 39+ messages in thread
From: arisawa @ 1998-12-30  0:17 UTC (permalink / raw)


Hello 9fans!

Does anyone have imported Python to Plan9?

Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp




^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2010-10-11 23:59 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-23 21:50 [9fans] python Bad-Santa
2006-12-23 23:54 ` ron minnich
2006-12-24  1:00   ` Russ Cox
2006-12-25  0:28     ` LiteStar numnums
2006-12-30  5:06       ` John Floren
  -- strict thread matches above, loose matches on Subject: below --
2010-10-10 14:06 [9fans] Python Michaelian Ennis
2010-10-10 14:21 ` Federico G. Benavento
2010-10-11  1:30   ` Michaelian Ennis
2010-10-11  1:55     ` Steve Simon
2010-10-11 23:59       ` Michaelian Ennis
2007-01-04 22:31 [9fans] python ron minnich
2007-01-05  4:14 ` John Barham
2007-01-05  6:18   ` erik quanstrom
2007-01-05  7:03     ` Dave Lukes
2007-01-05  7:09       ` Bruce Ellis
2007-01-05  7:26       ` Skip Tavakkolian
2006-12-23  5:10 ron minnich
2006-12-23  5:27 ` Russ Cox
2006-12-23  5:31   ` ron minnich
2006-12-23  6:19     ` Russ Cox
2006-12-23  7:13       ` arisawa
2006-12-23 13:29   ` LiteStar numnums
2006-12-23 14:23     ` arisawa
2006-12-23 20:20       ` Russ Cox
2006-12-23 11:57 ` Matt
2003-11-03 16:11 matt
2003-11-03 15:20 ` Russ Cox
2002-03-11 18:51 Russ Cox
2002-03-18 13:21 ` Boyd Roberts
2002-02-08 13:51 Boyd Roberts
2001-12-06  7:29 Russ Cox
2001-12-06  7:17 ` Lucio De Re
2001-12-02  9:39 Russ Cox
2001-12-02 12:08 ` Boyd Roberts
     [not found] ` <rsc@plan9.bell-labs.com>
2001-12-02 16:05   ` Jonathan Sergent
2001-12-03 22:24 ` Laura Creighton
2000-11-06  8:26 [9fans] Python Jonathan Sergent
1999-01-16  5:53 arisawa
1998-12-30  0:17 arisawa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).