473,496 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

[PATCH] Some new stuff

Hi all.

Basically, I'd like to use python as my system shell. It's not suitable
for a general purpose shell but since it is very programmable it can
eventually do whatever bash does and even more.

One thing I'd like python to do is: attach the *python code* of a
function to a function object. The same for class.

This can be done in python as it is but it doesn't feel very right. I
think it should be the job of the parser. So there is a patch vs 2.3.4 at:
http://students.ceid.upatras.gr/~sxa...-PIESS.tar.bz2

With this patch when the command line option -P is passed to python,
all functions and classes have an extra member __pycode__ which is the
code of the thing!
This is very exciting because if combined with a function 'save()' which
looks for all the functions/classes in globals(), takes their __pycode__
and saves it to a file (along with it's own code: save.__pycode__) can
lead to a really fun Python Incremental Expert System Shell.

Such a sample system is also included in the tar file.
For example we can say:
lsfunc() # lists all functions
pr (lsfunc) # prints definition of lsfunc
ed (pr) # edits the function 'pr'
save () # saves all and we go to sleep

Cheers

Stelios
Jul 18 '05 #1
1 1373
On Sun, 14 Nov 2004 00:55:12 -0800, rumours say that Stelios Xanthakis
<sx****@ceid.upatras.gr> might have written:
Hi all.
Hi Stelios.
Basically, I'd like to use python as my system shell. It's not suitable
for a general purpose shell but since it is very programmable it can
eventually do whatever bash does and even more.
You might like to take a look at IPython then:

http://ipython.scipy.org/
One thing I'd like python to do is: attach the *python code* of a
function to a function object. The same for class.

This can be done in python as it is but it doesn't feel very right. I
think it should be the job of the parser. So there is a patch vs 2.3.4 at:
http://students.ceid.upatras.gr/~sxa...-PIESS.tar.bz2
If you don't have an account already in sourceforge.net (where Python
sources are located so far), you could create one, and submit your
patches there; you might also want to subscribe to the Python-Dev
mailing list:

http://mail.python.org/mailman/listinfo/python-dev

since your post would be considered more on-topic if posted there.
Nonetheless, you are most welcome as a contributing pythonista
("santinista pou'xw" - non-greeks forgive my greeklish pun :)
With this patch when the command line option -P is passed to python,
all functions and classes have an extra member __pycode__ which is the
code of the thing!


<snip>
--
TZOTZIOY, I speak England very best,
"Tssss!" --Brad Pitt as Achilles in unprecedented Ancient Greek
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1723
by: PatchFactory Support | last post by:
Description: Professional and easy-to-use patch building environment that can help you to create instant patch packages for software and file updating. Generated patch packages are small size...
6
6147
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
0
1981
by: Vorname.nachname | last post by:
<HTML> <BODY> <center><table><tr><td><a hrefjxxzmzykmrhref=onxof href="http://xarwdcdb.plusherbal.biz/patch/?gfsowahrz"><IMG SRC="http://213.4.130.210/personal7/bolik15/patch/enp2_01.gif"...
0
1612
by: Angelos Karantzalis | last post by:
Hi y'all, only recently, I've delved into creating installers with VS.NET. So far, I'd created a Deployment Solution, added a couple of Merge Modules to it & everything worked fine. Today, I...
4
1096
by: Mike Caputo | last post by:
What the hell is it with this new worm pretending to be a Microsoft patch? I've been getting flooded with these the last couple of weeks, and now I see them on the newsgroup too. Is Microsoft...
0
1558
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 391 open ( +7) / 3028 closed (+12) / 3419 total (+19) Bugs : 906 open ( -3) / 5519 closed (+19) / 6425 total (+16) RFE : 207 open...
0
325
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 398 open ( +5) / 3334 closed (+19) / 3732 total (+24) Bugs : 904 open ( -4) / 6011 closed (+36) / 6915 total (+32) RFE : 222 open...
34
2613
by: Larry Hastings | last post by:
This is such a long posting that I've broken it out into sections. Note that while developing this patch I discovered a Subtle Bug in CPython, which I have discussed in its own section below. ...
0
907
by: Kai Kuehne | last post by:
Hi, I just wanted to mention that I wrote a patch for delicious.py 0.2.5 that solves the 401 "bug". The delicious guys changed their api to use ssl and stuff. I already sent the patch to the...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6991
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6878
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.