in 121708 20090720 072858 Frank Buss wrote:
>Bob Martin wrote:
>
>> I think the OP means "major PC operating systems". Those with a wider
>> knowledge of the computer world would consider IBM's mainframe operating
>> systems to be deserving of the description "major".
>
>Maybe you are right, if y
Bob Martin wrote:
> I think the OP means "major PC operating systems". Those with a wider
> knowledge of the computer world would consider IBM's mainframe operating
> systems to be deserving of the description "major".
Maybe you are right, if you mean big machines. I know mainframes a bit and
t
> I thought the correct way to do this in python would be to scan the
> dir
> files=os.listdir(os.path.dirname( os.path.realpath( __file__ ) ))
>
> then print the filenames
> for filename in files:
> print filename
>
> but as expected teh filename is not correct - so correct it using the
> file
Steven D'Aprano writes:
> Besides, one can legitimately disagree that 2/3 => 0 is the wrong thing
> to do. It's the right thing to do if you're doing integer maths.
I wonder whether 2/3 => ValueError is preferable.
--
http://mail.python.org/mailman/listinfo/python-list
in 121683 20090719 210126 Terry Reedy wrote:
>Roy Smith wrote:
>> In article <1cethsrrw8h6k$.9ty7j7u7zovn@40tude.net>,
>> Frank Buss wrote:
>>
>>> there is one free unique implementation on the 3 major platforms Linux,
>>> Windows and MacOS X
&
En Thu, 16 Jul 2009 17:41:39 -0300, Robert Robert
escribió:
I am trying to write a binary string to file on a windows network share.
I get an IOError. I've read that it is because the file size is too
large. I did a type( binaryString) and saw that it was type "str". So I
loop through it
Carl Banks wrote:
> On Jul 19, 4:29 pm, Tim Daneliuk wrote:
>> Carl Banks wrote:
>>> On Jul 19, 10:33 am, fft1976 wrote:
On Jul 19, 9:55 am, Frank Buss wrote:
> E.g. the number system: In many Lisp
> implementations (/ 2 3) results in the fractional object 2/3. In Python
> 2.6
Fred Atkinson wrote:
> I'm looking for some ideas here.
>
> I think I've mentioned I am taking a course in Python and PHP.
> The professor wants each of us to pick a project to write in both
> languages. It has to be something fairly complex and I'd like for it
> to be something th
On Sun, 19 Jul 2009 10:33:39 -0700, fft1976 wrote:
> On Jul 19, 9:55 am, Frank Buss wrote:
>
>> E.g. the number system: In many Lisp
>> implementations (/ 2 3) results in the fractional object 2/3. In Python
>> 2.6 "2 / 3" results in "0". Looks like with Python 3.1 they have fixed
>> it, now it
On Jul 19, 5:05 pm, casevh wrote:
> GMPY 1.10 beta is now available. This version fixes an issue where
> very large objects would be cached for reuse instead of being freed.
Excellent! That explains the funny memory usage graph.
>
> Source code and Windows installers may be found
> athttp://cod
I created the following filename in windows just as a test -
“Dönåld’s™ Néphêws” deg°.txt
The quotes are non -ascii, many non english characters, long hyphen
etc.
Now in DOS I can do a directory and it translates them all to
something close.
"Dönåld'sT Néphêws" deg°.txt
I thought the correct way
On Mon, 20 Jul 2009, Richel Satumbaga wrote:
> I am just learning python then I encountered an certain point in terms of
> using the input function of python. the source code:
>eq = input("enter an equation:");
>print " the result is : ";
>
>
> the ou
On Sun, Jul 19, 2009 at 7:07 PM, Richel Satumbaga wrote:
> I am just learning python then I encountered an certain point in terms of
> using the input function of python.
> the source code:
> eq = input("enter an equation:");
> print " the result is : "
I am just learning python then I encountered an certain point in terms of using
the input function of python.
the source code:
eq = input("enter an equation:");
print " the result is : ";
the output seen in the command window:
>>>
enter an equation:[
In article <20090720025149.326f0...@halmanfloyd.lan.local>,
Marek Kubica wrote:
> > > there is one free unique implementation on the 3 major platforms
> > > Linux, Windows and MacOS X
> >
> > Most people would still consider Solaris to be a "major platform".
>
> Depends on who you ask. On the
I'm looking for some ideas here.
I think I've mentioned I am taking a course in Python and PHP.
The professor wants each of us to pick a project to write in both
languages. It has to be something fairly complex and I'd like for it
to be something that would be useful on my Web s
On Sun, 19 Jul 2009 11:22:30 -0700 (PDT)
Elena wrote:
> On Jul 19, 7:33 pm, fft1976 wrote:
> > How do you explain that something as inferior as Python beat Lisp in
> > the market place despite starting 40 years later.
>
> To be mainstream a language has to fit in most programmers' minds.
Somet
On Sun, 19 Jul 2009 15:09:28 -0400
Roy Smith wrote:
> In article <1cethsrrw8h6k$.9ty7j7u7zovn@40tude.net>,
> Frank Buss wrote:
>
> > there is one free unique implementation on the 3 major platforms
> > Linux, Windows and MacOS X
>
> Most people would still consider Solaris to be a "major
On Jul 19, 4:29 pm, Tim Daneliuk wrote:
> Carl Banks wrote:
> > On Jul 19, 10:33 am, fft1976 wrote:
> >> On Jul 19, 9:55 am, Frank Buss wrote:
>
> >>> E.g. the number system: In many Lisp
> >>> implementations (/ 2 3) results in the fractional object 2/3. In Python
> >>> 2.6
> >>> "2 / 3" resul
Emile van Sebille writes:
> >> Most people would still consider Solaris to be a "major platform".
> > ?? I do not, but I have no idea what comes in 4th after the other
> > three by whatever metric.
> one metric calls fourth as the iPhone OS...
> http://marketshare.hitslink.com/report.aspx?qprid=8.
On 7/19/2009 4:15 PM, Stef Mientki wrote:
hello,
I'm using Scintilla as a wxPython widget with great pleasure.
I now have an application where I want to make notes during a conversation,
but also want to record the speech during that conversation.
I'm using Scintilla as a wxPython widget for edi
Carl Banks wrote:
> On Jul 19, 10:33 am, fft1976 wrote:
>> On Jul 19, 9:55 am, Frank Buss wrote:
>>
>>> E.g. the number system: In many Lisp
>>> implementations (/ 2 3) results in the fractional object 2/3. In Python 2.6
>>> "2 / 3" results in "0". Looks like with Python 3.1 they have fixed it, n
On Jul 19, 9:31 pm, Frank Buss wrote:
> fft1976 wrote:
> > How do you explain that something as inferior as Python beat Lisp in
> > the market place despite starting 40 years later.
> But maybe the most important point: The syntax looks simple compared to
> Common Lisp (much less parentheses)
hah
GMPY 1.10 beta is now available. This version fixes an issue where
very large objects would be cached for reuse instead of being freed.
Source code and Windows installers may be found at
http://code.google.com/p/gmpy/downloads/list
casevh
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 19, 10:33 am, fft1976 wrote:
> On Jul 19, 9:55 am, Frank Buss wrote:
>
> > E.g. the number system: In many Lisp
> > implementations (/ 2 3) results in the fractional object 2/3. In Python 2.6
> > "2 / 3" results in "0". Looks like with Python 3.1 they have fixed it, now
> > it returns "0.6
On 7/19/2009 1:01 PM Terry Reedy said...
Roy Smith wrote:
In article <1cethsrrw8h6k$.9ty7j7u7zovn@40tude.net>,
Frank Buss wrote:
there is one free unique implementation on the 3 major platforms Linux,
Windows and MacOS X
Most people would still consider Solaris to be a "major platform
hello,
I'm using Scintilla as a wxPython widget with great pleasure.
I now have an application where I want to make notes during a conversation,
but also want to record the speech during that conversation.
I'm using Scintilla as a wxPython widget for editing and PyAudio for the
speech recording,
Roy Smith wrote:
In article <1cethsrrw8h6k$.9ty7j7u7zovn@40tude.net>,
Frank Buss wrote:
there is one free unique implementation on the 3 major platforms Linux,
Windows and MacOS X
Most people would still consider Solaris to be a "major platform".
?? I do not, but I have no idea what
Thanks. I looked around for alternatives but didn't find this one.
Rick
Chris Rebert wrote:
On Sat, Jul 18, 2009 at 3:30 PM, Rick King wrote:
Hello,
I want to copy files using subprocess.call or os.system where the file names
are non-ascii, e.g. Serbian(latin), c's and s's with hacheks,etc.
In article <1cethsrrw8h6k$.9ty7j7u7zovn@40tude.net>,
Frank Buss wrote:
> there is one free unique implementation on the 3 major platforms Linux,
> Windows and MacOS X
Most people would still consider Solaris to be a "major platform".
--
http://mail.python.org/mailman/listinfo/python-list
Calroc writes:
> I'm engaged presently in starting a school to teach programming from
> the ground up, based roughly on the curriculum outlined in the article
> I mentioned. ...
> I'm excited about formal methods because one, I just heard about them,
Formal methods are a big and complicated subje
fft1976 wrote:
> How do you explain that something as inferior as Python beat Lisp in
> the market place despite starting 40 years later.
Python is not that bad. Unlike Lisp, there is much less undefined behavior,
there is one free unique implementation on the 3 major platforms Linux,
Windows and
Hi:
When the form comes up the first time, there is the default value for num.
When I fill in a number in the form and press send, even though the form
sends to itself (same page name), I would think it would read the number
sent. Here again is the code:
from primeNumbers import primeNumbers
try:
On Jul 19, 7:33 pm, fft1976 wrote:
> How do you explain that something as inferior as Python beat Lisp in
> the market place despite starting 40 years later.
To be mainstream a language has to fit in most programmers' minds.
--
http://mail.python.org/mailman/listinfo/python-list
Victor Subervi wrote:
When the form comes up the first time, there is the default value for
num. When I fill in a number in the form and press send, even though the
form sends to itself (same page name), I would think it would read the
number sent. Here again is the code:
from primeNumbers im
fft1976 wrote:
On Jul 19, 9:55 am, Frank Buss wrote:
E.g. the number system: In many Lisp
implementations (/ 2 3) results in the fractional object 2/3. In Python 2.6
"2 / 3" results in "0". Looks like with Python 3.1 they have fixed it, now
it returns "0.66", which will result in lots
On Jul 19, 9:55 am, Frank Buss wrote:
> E.g. the number system: In many Lisp
> implementations (/ 2 3) results in the fractional object 2/3. In Python 2.6
> "2 / 3" results in "0". Looks like with Python 3.1 they have fixed it, now
> it returns "0.66", which will result in lots of fun for
> Piet van Oostrum (PvO) wrote:
[snip]
>PvO> You can also consider using paramiko instead of pexpect.
[snip]
> chan = t.open_session()
> chan.exec_command('cat')
> chan.send('abcdefghijklmn\n')
In a real program it is better to use sendall here, as send may decide
to send only pa
>> I am interested in seeing your code and would be grateful if you shared it
>> with this list.
> All right here it is. Hope it helps.
Hendrik,
Thank you very much!! (I'm not the OP, but found this thread
interesting)
Best regards,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-li
On Sunday 19 July 2009 15:18:21 pyt...@bdurham.com wrote:
> Hi Hendrik,
> > If anybody is interested I will attach the code here. It is not a big
> > module.
>
> I am interested in seeing your code and would be grateful if you shared
> it with this list.
All right here it is.
Hope it helps
- He
Victor Subervi wrote:
Hi;
I have the following in a *.py page for the Web:
from primeNumbers import primeNumbers
try:
num = form.getfirst('num')
except:
num = ''
msg = "Oops"
print "Content-Type: text/html"
print
print """
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd";>
http://w
On Jul 14, 1:10 pm, Duncan Booth wrote:
> John Machin wrote:
> > Try an iterative version of checking that () [] and {}
> > are balanced and nested appropriately.
>
> Here's how I might approach the more general case:
>
> def balanced(s, parens=("()",)):
> '''
> Example:
> >>> balance
On 20/07/2009 12:24 AM, Virgil Stokes wrote:
John Machin wrote:
On Jul 19, 6:04 pm, Virgil Stokes wrote:
I am not a heavy user of Python; but, I do work with it and some of its
application packages (e.g. PyODE), in an academic setting.
Many of these applications packages have a Windows inst
* Alan G Isaac [2009-07-19 14:46:12 +]:
> Again, my question is about the class not its instances,
> but still, checking as you suggest gives the same answer.
That's what I get for answering before my coffee!
Cheers,
--
Nicolas Dandrimont
"Linux poses a real challenge for those with a ta
Hi;
I have the following in a *.py page for the Web:
from primeNumbers import primeNumbers
try:
num = form.getfirst('num')
except:
num = ''
msg = "Oops"
print "Content-Type: text/html"
print
print """
http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd";>
http://www.w3.org/1999/xhtml";>
"
On Jul 9, 1:20 pm, Steven D'Aprano wrote:
[...]
> You'll excuse my skepticism about all these claims about how anyone can
> program, how easy it is to teach the fundamentals of Turing Machines and
> functional programming to anybody at all. Prove it. Where are your peer-
> reviewed studies demonst
On 19 июл, 21:09, Christian Heimes wrote:
> resurtm wrote:
> > Can anybody explain my errors when trying to pass callback to DLL
> > function?
>
> > Thanks for advices and solutions!
>
> You have to keep a reference to the callback alive yourself. ctypes
> doesn't increase the refernece counter of
resurtm wrote:
> Can anybody explain my errors when trying to pass callback to DLL
> function?
>
> Thanks for advices and solutions!
You have to keep a reference to the callback alive yourself. ctypes
doesn't increase the refernece counter of the function when you define a
callback. As soon as th
Hello.
I'm trying to pass to the C function pointer to callback function from
python. But when i'm trying to do this i get access violation within
the DLL file when calling python callback.
Here is the python side code:
from ctypes import *
# ...
class NewtonBody(Structure):
def __init__(sel
> Hussein B (HB) wrote:
>HB> Hey,
>HB> I'm trying to execute a command over a remore server using pexpect
>HB> +
>HB> url = 'ssh internalserver'
>HB> res = pexpect.spawn(url)
>HB> print '1'
>HB> res.expect('.*ssword:')
>HB> print '2'
>HB> res.sendline('mypasswd')
>HB> print '3
> * Alan G Isaac [2009-07-19 13:48:16 +]:
>> Are user defined classes hashable?
>> (The classes; *not* the instances!)
>> I'm inclined to guess it will be hashed by id and this is
>> OK.
On 7/19/2009 10:07 AM Nicolas Dandrimont apparently wrote:
> You can check for yourself:
> In [1]: c
Hi all,
I have just released version 0.2 of Shed Skin, an experimental
(restricted) Python-to-C++ compiler (http://shedskin.googlecode.com).
It comes with 7 new example programs (for a total of 40 example
programs, at over 12,000 lines) and several important improvements/bug
fixes. See http://code
* Alan G Isaac [2009-07-19 13:48:16 +]:
> Are user defined classes hashable?
> (The classes; *not* the instances!)
>
> I want to use some classes as dictionary keys.
> Python is not objecting,
> but I'm not sure how to think about
> whether this could be dangerous.
> I'm inclined to guess it
Are user defined classes hashable?
(The classes; *not* the instances!)
I want to use some classes as dictionary keys.
Python is not objecting,
but I'm not sure how to think about
whether this could be dangerous.
I'm inclined to guess it will be hashed by id
and this is OK.
Thanks for any insights
> Rainer Grimm (RG) a écrit:
>RG> Hallo Alan,
>>> def apply2(itr, methodname, *args, **kwargs):
>>> f = operator.methodcaller(methodname, *args, **kwargs)
>>> for item in itr:
>>> f(item)
>RG> you can do it in a functional way.
> class A(object):
>RG> ... def hello(self
Ah. How easy! Thank you.
On Sat, Jul 18, 2009 at 7:32 PM, Chris Rebert wrote:
> On Fri, Jul 17, 2009 at 6:02 AM, Victor Subervi
> wrote:
> > Hi;
> > I am trying to script code that automatically sends a Web site visitor to
> an
> > URL. Specifically, when they enter a value in a search box, I ha
Hi Hendrik,
> I have ended up writing a netstring thingy, that addresses the string
> transfer problem by having a start sentinel, a four byte ASCII length (so you
> can see it with a packet sniffer/displayer) and the rest of the data escaped
> to take out the start sentinel and the escape char
Hey,
I'm trying to execute a command over a remore server using pexpect
+
url = 'ssh internalserver'
res = pexpect.spawn(url)
print '1'
res.expect('.*ssword:')
print '2'
res.sendline('mypasswd')
print '3'
res.sendline('ls -aslh')
+
What I want to do is to send a coup
Hallo Alan,
> def apply2(itr, methodname, *args, **kwargs):
> f = operator.methodcaller(methodname, *args, **kwargs)
> for item in itr:
> f(item)
you can do it in a functional way.
>>> class A(object):
... def hello(self): return "hello: " + str
( self.__class__.__name__ )
...
>>
On Jul 19, 6:04 pm, Virgil Stokes wrote:
> I am not a heavy user of Python; but, I do work with it and some of its
> application packages (e.g. PyODE), in an academic setting.
> Many of these applications packages have a Windows installer which
> usually works fine. However, I also try to keep up
On Sunday 19 July 2009 02:12:32 John Machin wrote:
>
> Apologies in advance for my ignorance -- the last time I dipped my toe
> in that kind of water, protocols like zmodem and Kermit were all the
> rage -- but I would have thought there would have been an off-the-
> shelf library for peer-to-peer
Virgil Stokes wrote:
> some of these applications will
not install on the latest version of Python.
Which version of Python precisely?
--
"The ability of the OSS process to collect and harness
the collective IQ of thousands of individuals across
the Internet is simply amazing." - Vinod Vall
I am not a heavy user of Python; but, I do work with it and some of its
application packages (e.g. PyODE), in an academic setting.
Many of these applications packages have a Windows installer which
usually works fine. However, I also try to keep up with the latest
release of Python, and this is
amr...@iisermohali.ac.in wrote:
[please keep the correspondence on the mailing list/newsgroup]
> It is working sir, but my datas are on file when i replaced StringIO("")
> with open("filename.txt") then it is not printing the result properly,
> like in one file i have data like:---
> 33 ALA H = 7
I'm working on an embeddded Python interpreter (using the c-api) where we
are loading a custom, zipped copy of the standard Python library
(./lib/python25.zip).
Everything is working fine, but when I try to "import hashlib", i get the
following error:
Traceback (most recent call last):
File "tr
> John Machin (JM) wrote:
>JM> On Jul 19, 7:43 am, Irmen de Jong wrote:
>>> twgray wrote:
>>> > I am attempting to send a jpeg image file created on an embedded
>>> > device over a wifi socket to a Python client running on a Linux pc
>>> > (Ubuntu). All works well, except I don't know, on t
66 matches
Mail list logo