i have a little programming with web2py, with import some library from
python-apt...
i want to show output from some command/function from that library to
the web page..
Output from that script showing on console, not showing on web page,
but only result on return value (True / false) send to web p
e
>
> Pseudo-code:
>
> on controller start
>
> # create obj
> # send all stdout to obj
> # return dict with obj content as message or another name to be
> processed by a web2py view
>
> On Dec 30, 12:21 am, blackshirt wrote:
>
>
>
>
>
>
>
>
python subprocess module to run the code is a
> separate process. The popen function has the ability to capture the
> output.
>
> On Dec 29, 9:21 pm, blackshirt wrote:
>
>
>
>
>
>
>
> > i have a little programming with web2py, with import some library fro
Okey Ross, if we using popen, can we doing it for real time (i mean,
streaming output) ?
On Jan 2, 12:20 am, Ross Peoples wrote:
> I use subprocess.Popen a lot to run shell commands from Python. There is no
> need for a specific web2py feature.
>
> This is the method I use whenever I need to call
like hard to implement.. i want simple approach for them
On Jan 3, 3:17 am, Paolo Caruccio wrote:
> There is another HTML5 technology to push stream from server to client :
> EventSource aka Sent-Server Events (http://dev.w3.org/html5/eventsource/).
> Its behaviour is like ajax long polling.
> I'
i'm still pretty newbie for them.. but i'll try to search.
On Jan 2, 11:42 pm, Ross Peoples wrote:
> Yes, you can, though it's much more difficult to stream it live to a web
> page. You would need to use JavaScript (comet or polling) to get the output
> as it is generated and display it in the br
Ross, i think i don't want to use external script, like
my_script.py ...
On Jan 2, 12:20 am, Ross Peoples wrote:
> I use subprocess.Popen a lot to run shell commands from Python. There is no
> need for a specific web2py feature.
>
> This is the method I use whenever I need to call something:
>
>
i have a little problem with web2py.
i'm doing simple writing application with web2py. the code look like
this
for controller :
import apt_pkg
def important():
apt_pkg.init()
cache = apt_pkg.Cache()
for pkg in cache.packages:
if pkg.essential:
return dict(t=pkg)
a
Thanks Anthony, it was works greatfully
On Jan 10, 10:53 am, Anthony wrote:
> > import apt_pkg
> > def important():
> > apt_pkg.init()
> > cache = apt_pkg.Cache()
> > for pkg in cache.packages:
> > if pkg.essential:
> > return dict(t=pkg)
>
> When you call "return" i
i have some a littel coding with web2py framework..
here is my controller and file :
def update():
cache = apt.Cache()
progress = apt.progress.TextFetchProgress()
res = cache.update(progress)
return dict(res = res)
in this related view..
{{extend 'layout.html'}}
{{=res}}
{{pass}}
t
ase I would go with 1.
>
> On Jan 12, 8:24 pm, blackshirt wrote:
>
>
>
> > i have some a littel coding with web2py framework..
> > here is my controller and file :
>
> > def update():
> > cache = apt.Cache()
> > progress = apt.progress.TextFetchProgr
end 'layout.html'}}
{{=output}}
{{=error}}
{{pass}}
and you can look output here
http://imageshare.web.id/images/48jjun7nv5kbdk95aw71.png
like scrambled... how to parse output line by line ??
Thanks again
On Jan 17, 2:29 am, Massimo Di Pierro
wrote:
> On Jan 15, 11:43 pm, blackshirt
i have a simply question about using PAM on linux to authenticate
user.
let's me explain my code.
we have a simple controller like this
def update():
cache = apt.Cache()
progress = apt.progress.TextFetchProgress()
res = cache.update(progress)
redirect(URL(r=request, c='statistic', f='
i just want to know, is it possible to reconstruct password entries on
parameters_PORTNUM.py file manually ??
if it possible, how we can build this password manually ??
Thanks
14 matches
Mail list logo