[Info-vax] simple image processing
Jan-Erik Soderholm
jan-erik.soderholm at telia.com
Sun Aug 14 05:46:51 EDT 2011
VAXman- @SendSpamHere.ORG wrote 2011-08-14 01:53:
> In article<j26umk$3ub$2 at online.de>, helbig at astro.multiCLOTHESvax.de (Phillip Helbig---undress to reply) writes:
>> In article<00AB3D70.195A8D10 at SendSpamHere.ORG>, VAXman-
>> @SendSpamHere.ORG writes:
>>
>>> Mark Berryman ported it and it works well. Simple to install. Execute
>>> the PHP_SETUP and off you go.
>>
>> Today, I tried out his Ghostscript. Quite easy!
>>
>> I'm not using PHP with a web server (nor do I plan to anytime soon).
>> Can PHP be used in a "standalone mode" to do what I want? (For now, I'm
>> thinking mainly of things NOT served via HTTP but rather viewed in a
>> browser with file:///.)
>
>
> $ PHP -a ... for interactive mode...
> $ PHP -a -f<filename> ... will process a PHP source...
>
> $ PHP -a
> Interactive mode enabled
>
> <?php echo "Hello world!" ?>
> ^Z
> Hello world!
>
So you need that html-like program style even when not
running within a web-server environment ?
Well, why not a simple Python example at the same time :-)
$ python
Python 2.5.4 (r254:67916, May 21 2011, 22:09:43) [DECC] on OpenVMS
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> print "Hello World!"
Hello World!
>>> Exit
$
Or something maybe more usable. List users in UAF whith
interactiv logins, sorted on last login timestamp:
$ python
from vms import user, starlet
def fcmp(u1, u2):
return cmp(u2.lastlogin_i, u1.lastlogin_i)
all_username_values = user.all_users().values()
all_username_values.sort(fcmp)
for a_user in all_username_values :
if a_user.lastlogin_i > 0 :
print "%-20s %s" % (a_user.username,
starlet.asctim(a_user.lastlogin_i)[1])
<user1> 14-AUG-2011 11:08:00.39
<user2> 25-APR-2011 14:19:53.14
<user3> 24-FEB-2011 10:25:17.60
<user4> 11-AUG-2008 17:35:31.55
<user5> 13-JAN-2002 22:11:04.85
Less then 10 lines of code...
One of the nice things with the Python port is the large
amount of VMS specific interfaces. And the Rdb interface.
More information about the Info-vax
mailing list