Ok, I've given it the interface I want, and made it less of an
attractive nuisance. http://www.mired.org/home/mwm/try_python/ is now ready for people to
play with. There's no tutorial information on it yet, that's the next
thing to do. However, I won't be able to work on it for a while, so if
you want to make suggestions about what that should look like, all
such suggestions will be given proper consideration.
<mike
--
Mike Meyer <mw*@mired.or g> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. 20 1636
Pretty neat =)
But aren't you concerned about security? Letting anybody execute
arbitrary Python expressions (and therefore also arbitrary system
commands?!) on your box --- even from within a FreeBSD jail --- seems a
bit dangerous.
Mike Meyer wrote: Ok, I've given it the interface I want, and made it less of an attractive nuisance.
http://www.mired.org/home/mwm/try_python/ is now ready for people to play with. There's no tutorial information on it yet, that's the next thing to do. However, I won't be able to work on it for a while, so if you want to make suggestions about what that should look like, all such suggestions will be given proper consideration.
<mike
I suggest it should work like IDLE do and not remain limited to
evaluating of expressions. One can easily get the impression Python is
very limited and this is not what can help Python to show its strengths.
By the way:
The page doesn't work for me in MSIE (I am on a Windows system) 1+1
SyntaxError: unexpected EOF while parsing (line 1)
It does work for me in FireFox and Netscape: 1+1
2
but in Opera I get: 1+1
祓瑮硡牅潲 㩲*敮灸捥 整佅⁆桷 汩慰獲湩 氨湩⤱ >>>
I am most curious about the last one with no idea how it comes?
Maybe the subject of your posting should be changed to:
Try my skills in processing form requests from different Internet browser?
Claudio
Lonnie Princehouse wrote: Pretty neat =)
But aren't you concerned about security? Letting anybody execute arbitrary Python expressions (and therefore also arbitrary system commands?!) on your box --- even from within a FreeBSD jail --- seems a bit dangerous.
I found out about the FreeBSD jail myself, too ;-)
Removing __import__ from the builtins would make such detective work
much harder, though ;-)
-- Gerhard
Mike Meyer wrote: Ok, I've given it the interface I want, and made it less of an attractive nuisance.
http://www.mired.org/home/mwm/try_python/ is now ready for people to play with. There's no tutorial information on it yet, that's the next thing to do. However, I won't be able to work on it for a while, so if you want to make suggestions about what that should look like, all such suggestions will be given proper consideration.
I was bored so I wrote some code that takes input one line at a time
and spits out the a tuple representing the state and a message to be
echoed. It handles statements on multiple lines, too. So it might be
helpful, since your tutorial doesn't seem to handle multiple lines or
statements.
You can see it at <http://www.datamech.co m/devan/bastille.txt>
"Lonnie Princehouse" <fi************ **@gmail.com> writes: Pretty neat =) But aren't you concerned about security? Letting anybody execute arbitrary Python expressions (and therefore also arbitrary system commands?!) on your box --- even from within a FreeBSD jail --- seems a bit dangerous.
What's there is actually more restricted than a FreeBSD jail. This one
has been tightened down to a statically linked Python interpreter, the
statically linked cgi program which does nothing but launch the Python
interpreter with the right arguments, and python library files. I've
even removed most of the latter that aren't used by the python
script. So yeah - you can run arbitrary system commands, except there
shouldn't be any.
The previous version was in a jail, which is why I didn't want it
generally announced. The logs made amusing reading. I like Gerhard's
idea of removing __import__, and have done that.
<mike
--
Mike Meyer <mw*@mired.or g> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Claudio Grondi <cl************ @freenet.de> writes: Mike Meyer wrote: Ok, I've given it the interface I want, and made it less of an attractive nuisance. http://www.mired.org/home/mwm/try_python/ is now ready for people to play with. There's no tutorial information on it yet, that's the next thing to do. However, I won't be able to work on it for a while, so if you want to make suggestions about what that should look like, all such suggestions will be given proper consideration. <mike I suggest it should work like IDLE do and not remain limited to evaluating of expressions. One can easily get the impression Python is very limited and this is not what can help Python to show its strengths.
I thought about that. It's not clear that it's fixable at this
level. If not, it'll be documented.
By the way: The page doesn't work for me in MSIE (I am on a Windows system) >>> 1+1 SyntaxError: unexpected EOF while parsing (line 1)
Yeah, I know. I poked at it briefly, but couldn't figure out what was
goiing on. MSIE on the Mac doesn't work at all (no AJAT), and I don't
have regular access to a Windows box to try it on.
It does work for me in FireFox and Netscape: >>> 1+1 2
Also Safari, Mozilla and Netscape. If you try it with a browser
without XMLHttpRequest, it'll suggest them.
but in Opera I get: >>> 1+1 祓瑮硡牅潲 㩲*敮灸捥 整佅⁆桷 汩慰獲湩 氨湩⤱ >>>
Yup, I've seen that one as well. I have *no* idea what Opera thinks
it's doing. Adding a charset to the content-type didn't solve the
problem. I checked opera's web site, and couldn't find a page for web
developers.
I've added a note about these problems.
Maybe the subject of your posting should be changed to: Try my skills in processing form requests from different Internet browser?
Actually, it's doing form processing. It's doing XMLHttpRequests .
<mike
--
Mike Meyer <mw*@mired.or g> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. It does work for me in FireFox and Netscape: >>> 1+1 2
Mike> Also Safari, Mozilla and Netscape.
I tried 4+3 in Safari and got
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>500 Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error</H1>
The server encountered an internal error or
misconfiguratio n and was unable to complete
your request.<P>
Please contact the server administrator, we*******@mired .org and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.<P>
More information about this error may be available
in the server error log.<P>
<HR>
<ADDRESS>Apac he/1.3.26 Server at www.mired.org Port 80</ADDRESS>
</BODY></HTML>
in the terminal just now (9:05 or so CST).
Skip
Mike Meyer wrote: The previous version was in a jail, which is why I didn't want it generally announced. The logs made amusing reading. I like Gerhard's idea of removing __import__, and have done that.
Oh, you have, eh? Are you absolutely sure? Try running "grep 'all your
base' log".
-- David
"David Wahler" <dw*****@gmail. com> writes: Mike Meyer wrote: The previous version was in a jail, which is why I didn't want it generally announced. The logs made amusing reading. I like Gerhard's idea of removing __import__, and have done that. Oh, you have, eh? Are you absolutely sure? Try running "grep 'all your base' log".
Yup, removing it securely is more trouble than it's worth. Which is
why this is running in a sandbox inside a jail - I knew that securing
Python was a probably impossible.
I put __import__ back, and even imported os just to save you some
time. I also put the expression that will get do the equivalent of "ls
-R /" up for anyone to read.
<mike
--
Mike Meyer <mw*@mired.or g> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Greg |
last post by:
The following article from microsoft describes a workaroind for a bug
in hte beta version of VISUAL PYTHON DOT NET
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/askgui04032001.asp
When did microsoft put python into the visual studio beta? How did
this not make big news in developmnt circles?
A.E.
|
by: John Machin |
last post by:
I am pleased to announce a new general release (0.5.2) of xlrd, a Python
package for extracting data from Microsoft Excel spreadsheets.
CHANGES:
* Book and sheet objects can now be pickled and unpickled. Instead of
reading a large spreadsheet multiple times, consider pickling it once
and loading the saved pickle; can be much faster.
* Now works with Python 2.1. Backporting to Python 2.1 was partially
|
by: Gregory (Grisha) Trubetskoy |
last post by:
The Apache Software Foundation and The Apache HTTP Server Project are
pleased to announce the 3.3.0b (Beta) release of mod_python.
Version 3.3.0b of mod_python features several new functions and
attributes providing better access to apache internals, as well as
many bug fixes and various performance and security improvements. A
detailed description of the changes is available in Appendix A of the
mod_python manual, also available here
...
|
by: Steven Knight |
last post by:
SCons is a software construction tool (build tool, or make tool) written
in Python. It is based on the design which won the Software Carpentry
build tool competition in August 2000.
Version 0.97 of SCons has been released and is available for download
from the SCons web site:
http://www.scons.org/download.php
An RPM package and a Win32 installer are all available, in addition to
|
by: Wingware |
last post by:
Hi,
We're happy to announce the release of Wing IDE 3.0, an advanced
development environment for the Python programming language.
It is available from:
http://wingware.com/
Wing IDE provides powerful debugging, editing, code intelligence,
testing, and search capabilities that reduce development and debugging
| |
by: giles.thomas |
last post by:
We're proud to announce that today Resolver One, our flagship
application, entered its public Beta phase. It can be downloaded from
<http://www.resolversystems.com/download/(free registration
required), and we would very much welcome feedback from the Python
community.
Resolver One is a Rapid Application Development tool for analysing and
presenting business data using a familiar spreadsheet interface - or,
to put it another way, it is...
|
by: Steven Knight |
last post by:
SCons is a software construction tool (build tool, or make tool) written
in Python. It is based on the design which won the Software Carpentry
build tool competition in August 2000.
Version 0.98.1 of SCons has been released and is now available at the
SCons download page:
http://www.scons.org/download.php
RPM and Debian packages and a Win32 installer are all available, in
|
by: mh |
last post by:
I'm pleased to announce the initial release of OraPIG,
the Oracle Python Interface Generator.
OraPIG generates Python wrapper classes for Oracle packages.
If you use Oracle and Python, this might be a pretty useful
package for you. Download it and let us know what
you think!
Cheers,
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
| |