FWIW, I'm trying to write a python program that does the equivalent this perl
program:
http://devcentral.f5.com/downloads/iControl/SDK/sslvpn.public.pl.txt
I don't see any code there that refers to a public key, but it works fine.
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
> i think the function shouldn't complain if dir already exists. How is a
> programer to distinguish if the dir already exists, or if there's a
> problem creating the dir?
Of course it should thrown an exception because it was unable to do
what it was asked: create a directory. Th
I am using the subprocess module in 2.4. Here's the fragment:
bufcaller.py:
import sys, subprocess
proc = subprocess.Popen('python bufcallee.py', bufsize=0, shell=True,
stdout=subprocess.PIPE)
for line in proc.stdout:
sys.stdout.write(line)
bufcallee.py:
Unfortunatley that doesn't help. Even when callee is started using the
-u, I get the same behavior.
--
http://mail.python.org/mailman/listinfo/python-list
So here it is: handle unbuffered output from a child process.
Here is the child process script (bufcallee.py):
import time
print 'START'
time.sleep(10)
print 'STOP'
In Perl, I do:
open(FILE, "python bufcallee.py |");
while ($line = )
{
Well, I finally managed to solve it myself by looking at some code.
The solution in Python is a little non-intuitive but this is how to get
it:
while 1:
line = stdout.readline()
if not line:
break
print 'LINE:', line,
If anyone can do it the more Pythonic way with some sort of
I was explaining the difference between irony and sarcasm to my
daughter just the other day. It was nice of Asad to provide us with
such a besutiful example. Not that I'm sure that was his intent...
Jeff
--
http://mail.python.org/mailman/listinfo/python-list
I have a tool that outputs data in either html or text output.
Currently I'm writing chucnks like:
if html:
print ''
print ''
print ''
print 'Differences %s: %s' % (htypestr, lbl1)
if html:
...
This seems clunky and my next step was going to be to define generic
functions whi
I'm trying to build Python 2.4.1 on HP-UX 11.00 with full tcl/tk IDLE
support. So far, I haven't had any luck. I always wind up getting
errors of the form:
ld: DP relative code in file
/ptg/devtools/hppa1.1/pre/lib/libtk8.4.a(tkWindow.o) - shared library
must be position independent. Use +z or
errors--if I code I'm debugging raises an
> uncaught exception, the editor jumps directly to it. Even works for
> web development, if I hit a page in my dev server that raises an
> exception, it brings my editor right there.
>
> and lots more (version control integration, easy mappin
ago.If
> NumPy doesn't work with py2exe then we need help figuring out why. The
> beta-release period is the perfect time to fix that. I've never used
> py2exe myself, but I seem to recall that some have been able to make it
> work.
>
> The problem may just be listing the right set of modules to carry along
> because you may not be able to get that with just the Python-side
> imports. Post any errors you receive to
> [email protected]
>
> Thanks,
>
>
> -Travis
>
>
Bruce Who
--
http://mail.python.org/mailman/listinfo/python-list
I'm always disappointed when I find something that Python doesn't
handle in a platform independent way. It seems to me that file
locking is in that boat.
1. I don't see a way to atomically open a file for writing if and only
if it doesn't exist without resorting to os.open and specialized
platfor
Don't Feed The Trolls :-)
--
http://mail.python.org/mailman/listinfo/python-list
What's more amazing is that anyone would click on the link at all given
the increasing number of website that provide hidden content that tries
to deliver spyware or viruses just by getting visitors.
Jeff
Bjoern Schliessmann wrote:
> new wrote:
>
> > www.magicoz.com
> > amazing
>
> Yeah, it *is*
Technically, I would call it a manfesto. The manifesto module is
probably the most facinating module in Python since it's the only one
whose functions consist entirely of doc strings followed by a pass and
do no useful work.
Jeff
Tim Daneliuk wrote:
> [EMAIL PROTECTED] wrote:
> > This article is
I have the .py file in Eclipse
#...@pydevcodeanalysisignore
from ffnet import ffnet, mlgraph
topology = mlgraph( (2, 3, 1) )
nn = ffnet(topology)
I select RunAs / Python Run
I get the error
from ffnet import ffnet, mlgraph
ImportError: No module named ffnet
In the folder Python26\lib\site-pack
\Program Files\\Python26\\lib\\plat-win',
'E:\\Program Files\\Python26\\lib\\site-packages',
Python is at
E:\Python26
but other things like java are at E:\Program Files
Showhow it is looking in the wrong place and I don't know how to fix it.
I checked the registry. The e
I found out I had something installed wrong.
" Cal Who" wrote in message
news:[email protected]...
>
>
> I have the .py file in Eclipse
> #...@pydevcodeanalysisignore
> from ffnet import ffnet, mlgraph
> topology = mlgraph( (2, 3, 1) )
> nn
data = readdata( 'data/input.dat', delimiter = ',' )
input = data[:, :9]#nine data columns
Where can I find documentation for the
data[:,9]
in the code above.
Been looking and found many examples but would like to know the definition.
I need to skip the first column and then read 9
I wou
"Robert Kern" wrote in message
news:[email protected]...
> On 2010-03-11 13:01 PM, Cal Who wrote:
>> data = readdata( 'data/input.dat', delimiter = ',' )
>>
>> input = data[:, :9]#nine data columns
>>
&
"Martin P. Hellwig" wrote in message
news:[email protected]...
> On 03/11/10 22:08, Cal Who wrote:
>
>> Thanks, that helped a lot.
>>
>> I'm having trouble knowing what to search for to find documenatation. For
>> example, is
The below code produces the error as indicated. But, in
E:\Python26\Lib\site-packages\ffnet\tools I see:
drawffnet.py
drawffnet.pyc
drawffnet.pyo
Is that what it is looking for?
I'm not sure what "not callable" means.
Could it be referencing to "nn" rather than drawffnet?
What should
- Original Message -
From: Stephen Hansen
To: Cal Who
Cc: [email protected]
Sent: Sunday, March 14, 2010 2:33 PM
Subject: Re: What does Error: 'module' object is not callable Mean?
On Sun, Mar 14, 2010 at 10:20 AM, Cal Who wrote:
from ffnet.to
Thanks for the replies.
That fixed it but produced another problem.
There are two plotting routines below.
Either one will work without error.
But the combo produces:
The exception unknown software exception (0x4015) occurred in the
application at location 0x1e05b62a.
in a dialog box and the
"MRAB" wrote in message
news:[email protected]...
> Cal Who wrote:
>> The below code produces the error as indicated. But, in
>> E:\Python26\Lib\site-packages\ffnet\tools I see:
>> drawffnet.py
>> drawffnet.pyc
&g
"Terry Reedy" wrote in message
news:[email protected]...
> On 3/14/2010 2:20 PM, Cal Who wrote:
>>
>> The below code produces the error as indicated. But, in
>> E:\Python26\Lib\site-packages\ffnet\tools I see:
>> d
I cleaned up the code by moving all the imports to the top.
There are two plotting routines shown below.
Either one will work without error.
But when I include both, running produces:
The exception unknown software exception (0x4015) occurred in the
application at location 0x1e05b62a.
In
I found it. Had to use "figure" to create a new figure!
" Cal Who" wrote in message
news:[email protected]...
>I cleaned up the code by moving all the imports to the top.
> There are two plotting routines shown below.
> Either one will wor
28 matches
Mail list logo