Jay,
I'm running Apache under a Windows environment. I'm guessing Apache
is not allowing me to run OS commands (for safety reasons)... I'll
have to look into this a little further.
Moses
On Jun 26, 10:42 am, "Jay Parlar" <[EMAIL PROTECTED]> wrote:
> On 6/26/07, Moses Ting <[EMAIL PROTECTED]>
On 26 Giu, 16:24, "va:patrick.kranzlmueller"
<[EMAIL PROTECTED]> wrote:
> see:http://code.djangoproject.com/wiki/PyCallTag
>
> patrick
>
Really really bad (and OT). Please don't encourage the use of this
tag, it breaks MVC. Never mix html with programming logic.
--~--~-~--~~
On 6/26/07, Moses Ting <[EMAIL PROTECTED]> wrote:
>
> That's what I thought, but running the following command via a web
> request returns lines of length 0.
>
> command = 'c:\path\plink -ssh [EMAIL PROTECTED] -pw password dir'
> lines = os.popen(command).readlines()
>
> The exact command works ju
> That's what I thought, but running the following command via a web
> request returns lines of length 0.
>
> command = 'c:\path\plink -ssh [EMAIL PROTECTED] -pw password dir'
> lines = os.popen(command).readlines()
A couple things I'd check:
1) use raw strings when subjecting yourself to DOS p
sorry, didnĀ“t read carefully enough.
the cookbook example refers to a template (not a view).
patrick
Am 26.06.2007 um 16:24 schrieb va:patrick.kranzlmueller:
>
> see:
> http://code.djangoproject.com/wiki/PyCallTag
>
> patrick
>
> Am 26.06.2007 um 16:22 schrieb Moses Ting:
>
>>
>> Does anyone kn
That's what I thought, but running the following command via a web
request returns lines of length 0.
command = 'c:\path\plink -ssh [EMAIL PROTECTED] -pw password dir'
lines = os.popen(command).readlines()
The exact command works just fine when ran from either a regular
python prompt or within t
On 6/26/07, Moses Ting <[EMAIL PROTECTED]> wrote:
>
> Does anyone know if it's possible to make a system command call from a
> Django view? For example, I'd like to make the following call
> straight from Django.
>
> import os
> os.system('echo Hello World')
A view is just a regular Python funct
see:
http://code.djangoproject.com/wiki/PyCallTag
patrick
Am 26.06.2007 um 16:22 schrieb Moses Ting:
>
> Does anyone know if it's possible to make a system command call from a
> Django view? For example, I'd like to make the following call
> straight from Django.
>
> import os
> os.system('ech
Does anyone know if it's possible to make a system command call from a
Django view? For example, I'd like to make the following call
straight from Django.
import os
os.system('echo Hello World')
Thanks
--~--~-~--~~~---~--~~
You received this message because you
9 matches
Mail list logo