On May 17, 8:20 am, a wrote:
> ps someone helped me with enumerate(), which works on the linux but
> not on the windows?
enumerate() works fine on windows. Perhaps your windows box has a
really old Python?
Regards,
Pat
--
http://mail.python.org/mailman/listinfo/python-list
On May 17, 3:19 pm, Alex Hall wrote:
> Hi all,
> I am a bit confused about classes. What do you pass a class, since all
> the actual information is passed to __init__? For example, say you
> have a dog class. The dog object has a name, a size, and a color. I
> believe you would say this:
>
> class
On May 17, 3:55 pm, Alex Hall wrote:
> So what is a subclass compared to a class? Are you saying that what is
> passed to the class, so what is in the parentheses of the class, is
> really the superclass? If so, what is the advantage of doing this; why
> not just create a class that is not a sub?
On May 17, 10:52 pm, shuvro wrote:
> Suppose I have a class like this -
>
> class myClass(object):
>
> def __init__(self):
> self.a = 10
> self.b = 20
>
> def my_method(self,var = 20):
> self.local_var = var
>
> I want to know about its method(__init__ and my_method
On May 18, 11:03 am, Robert Kern wrote:
> On 2010-05-16 09:25 , Ed Keith wrote:
> > No, the GPL makes it clear that the responsibly is on the distributor to
> > either supply the source or written notice, Caveat venditor. The violation
> > exists regardless of whether or not the recipient makes
On May 18, 12:31 pm, superpollo wrote:
> >>> def myfun():
> ... return "WOW"
> ...
> >>> myfun()
> 'WOW'
> >>>
>
> now, i would like to "list" the funcion definition, something like this:
>
> >>> myfun.somethinglikethis()
> def myfun():
> return "WOW"
> >>>
>
> is there something lik
On May 18, 1:41 pm, superpollo wrote:
> Patrick Maupin ha scritto:
>
>
>
> > On May 18, 12:31 pm, superpollo wrote:
> >> >>> def myfun():
> >> ... return "WOW"
> >> ...
> >> >>> myfun()
> &g
On May 14, 3:19 am, "harry k" wrote:
> Write a spell checking tool that will identify all misspelled word in a text
> file using a provided dictionary.
Well, this has been educational. Both my daughters just finished
their final exams last week, so I was confused about seeing the
homework assi
On May 19, 9:27 pm, Carbon wrote:
> I am new to Python and am trying to write a GUI wrapper script in python
> 2.5 to get username and passwords from Linux users to send as options to
> run an app on a 2X terminal server. I came across the easygui module and
> its multpasswordbox function, which m
On May 19, 10:28 pm, Ben Finney wrote:
> Better is to use ‘shlex.split’ to split the string as a shell parser
> would do http://docs.python.org/library/shlex#shlex.split>.
Good point. I always forget about shlex.split because I'm usually
passing (relatively) constant strings with no funny quoti
On May 20, 6:57 pm, Brendan Miller wrote:
> I have a python script that sets up some environmental stuff. I would
> then like to be able to change back to interactive mode and use that
> environment. What's the best way to do that?
>>> import cmd
>>> class MyCmd(cmd.Cmd):
... def default(self,
On May 20, 9:56 pm, Alex Hall wrote:
> Hi all,
> I am now trying to allow my classes, all of which subclass a single
> class (if that is the term), to provide optional arguments. Here is
> some of my code:
>
> class Craft():
> def __init__(self,
> name,
> isAircraft=False,
> id=helpers.id(),
>
On May 20, 10:35 pm, Alex Hall wrote:
> So how do I get at anything inside **kw? Is it a list?
It's a dictionary. Use *args for a list. (As with self, the name is
whatever you want to use, but some sort of consistency is nice.)
One of the cool things about Python is how easy it is to play at
On May 21, 5:21 am, Deep_Feelings wrote:
> i could not see many programs written in python
Well you could try PyPi, or even a search on googlecode.
> (i will be interested
> more in COMMERCIAL programs written in python ).
What do you mean by commercial, and why?
> and to be honest ,i
> tried
On May 21, 8:45 pm, [email protected] (Aahz) wrote:
> In article
> ,
> Patrick Maupin wrote:
> >There are a lot of commercial programs written in Python. But any
> >company which thinks it has a lock on some kind of super secret sauce
> >isn't going to use P
On May 21, 9:12 pm, Ben Finney wrote:
> [email protected] (Aahz) writes:
> > In article
> > ,
> > Patrick Maupin wrote:
>
> > >There are a lot of commercial programs written in Python. But any
> > >company which thinks it has a lock on some kind
On May 22, 2:43 am, sturlamolden wrote:
> On 21 Mai, 20:20, Patrick Maupin wrote:
> > Also, any company in a competitive
> > market where execution speed is extremely important might choose some
> > other language because, frankly, the fact that a development tool is
>
On May 22, 5:00 am, Michele Simionato
wrote:
> On May 21, 4:20 pm, Grant Edwards wrote:
>
> > What about Go, exactly, do people see as Python-like?
>
> The philosophy of keeping things simple. I find the concurrency
> mechanism quite Pythonic.
That's nice.
> Moreover Go interfaces are quite aki
On May 22, 1:49 pm, Terry Reedy wrote:
> Because, as I said, and as you explain further, Python favors programmer
> speed, including speed of testing new algorithms, over raw execution
> speed of current algorithms. (Current) speed is (also) easier to test
> than improvability and hence possible
On May 21, 10:30 pm, Chris Rebert wrote:
> Erm, in fairness, I recall hearing that some speed-critical bits of hg
> are written in C. It does lend credence to the "Python as glue
> language" argument though; I doubt hg's extensibility and friendly
> interface would have been as easy to implement
On May 22, 6:14 pm, Steven D'Aprano wrote:
> On Sat, 22 May 2010 12:13:30 -0700, Patrick Maupin wrote about the lack
> of exceptions in Go:
>
> > Looking at their rationale, it is appears that one or more of the
> > primary go developers had to deal way too often with
On Jun 2, 6:25 am, John Machin wrote:
> On Jun 2, 4:43 pm, johnty wrote:
>
> > i'm reading bytes from a serial port, and storing it into an array.
>
> > each byte represents a signed 8-bit int.
>
> > currently, the code i'm looking at converts them to an unsigned int by
> > doing ord(array[i]). h
On Jun 3, 9:54 pm, GZ wrote:
> Hi All,
>
> I am looking for an algorithm that can compare to source code files
> line by line and find the minimum diff. I have looked at the difflib
> included in python. The problem is that it is designed to make the
> diff results easier for humans to read, inste
Hello,
I am interested if there are any python modules, that supports
reversible debugging aka stepping backwards. Any links or ideas would be
helpful, because I am thinking of implementing something like that.
Thanks in advance,
Patrick
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina schrieb:
Do you want reverse execution, like an undo function? Undo all changes
made by executing some piece of code?
I am not completly sure, if I really want to make exact undo, i.e.
undoing commands by reversing all their effects, or just restoring the
program state to an ar
Horace Blegg schrieb:
You might consider using a VM with 'save-points'. You run the program
(in a debugger/ida/what have you) to a certain point (logical point
would be if/ifelse/else statements, etc) and save the VM state. Once
you've saved, you continue. If you find the path you've taken isn'
Now, if the snapshot is a feature of the Python VM, that's another
matter entirely.
I thought of taking a snapshot using fork, which creates a copy of the
process. It may not be the
most performant, but it should be quite portable. Of course there are
some issues with
multithreading/multiproc
gentlestone schrieb:
return u"{}".format(self.name)
u"{0}".format(u"blah")
works for me with python-2.6.2
Maybe your format string is wrong.
- Patrick
--
http://mail.python.org/mailman/listinfo/python-list
packing your data in
tuples, lists or dictionaries.
- Patrick
--
http://mail.python.org/mailman/listinfo/python-list
class.
This can be easier accomplished using __slots__, e.g.:
>>> class X(object):
... __slots__ = ['a']
But in my opinion, it isn't worth it. You still don't get compile time
errors, which is probably the main reason to use strict mode.
I agree.
- Patrick
--
Hello list,
I've been working with Python now for about a year using it primarily for
scripting in the Puredata graphical programming environment. I'm working on
a project where I have been given a 1000 by 1000 cell excel spreadsheet and
I would like to be able to access the data using Python. Do
On Tue, 07 Sep 2010 15:33:55 +, kj wrote:
> Does anyone know of a Python module for *moderate* "time-stretching"[1]
> an MP3 (or AIFF) file?
>
> FWIW, the audio I want to time-stretch is human speech.
If you are running your script on Linux you may use gstreamer(pyGST).
With gstreamer you c
I would like to know what are the pros and cons of the web frameworks made in
python.
The one I tend to lean towards is Flask.
--
https://mail.python.org/mailman/listinfo/python-list
On Thursday, 9 March 2017 05:05:37 UTC-5, David Froger wrote:
> There is a free ebook on the subject on O'Reilly:
> http://www.oreilly.com/web-platform/free/python-web-frameworks.csp
>
> Hope it helps,
> David
>
>
> Quoting Patrick McFarling (2017-03-09 10:24:16)
Newbie here...
Ok, the following code:
class Base:
_count = 0
def __init__(self):
self.__class__._count += 1
print dir(self)
x = Base()
the output is:
['__doc__', '__init__', '__module__', '_count']
Notice that __class__ is no where to be seen!
Where does __class__ co
Hi guys.Yes, this is very much a neophyte question, but I was pondering;modules = ['stackless', 'sys', 'slsocket as socket', 'random, time', 'traceback',
'string', 'util']for module in modules: print "Loading %s..." % module exec 'i
I had a similar problem, and Radix's threadless Twisted snippet proved to be a very viable solutionHave a look at: http://twistedmatrix.com/trac/browser/sandbox/radix/threadless.py?rev=17407
On 6/26/06, Andrew Francis <[EMAIL PROTECTED]> wrote:
Hello Jas, Bob, et al:> Twisted isn't designed for Sta
John Dean wrote:
> Hi
>
> Does anybody know from where I can get a copy of the source for Python
> V2.4.2. I downloaded what is reckoned to be the source code from
> www.python.org, but is turns out to be the MacXOS version with the core
> modules missing. The reason I am looking for the source c
In article <[EMAIL PROTECTED]>,
John Machin <[EMAIL PROTECTED]> wrote:
% None of the other approaches make the mistake of preserving the first
% letter -- this alone is almost enough reason for jettisoning soundex.
Metaphone does, at least in the case of Aaron and Erin.
--
Patri
Please send me the information on this program.
Thanks
Patrick
--
http://mail.python.org/mailman/listinfo/python-list
check out PyMat:
http://claymore.engineer.gvsu.edu/~steriana/Python/pymat.html
I've never used it but I believe it should work for your needs.
However, I highly recommend taking a look at SAGE:
http://modular.math.washington.edu/sage/
which has an interface to octave.
-ph
--
http://mail.python.
> PyMat will not help you! PyMat works the other way around, ie it
> allows for Matlab calls from Python.
excuse my ignorance: but why would that not be helpful? I may be
missing something blindingly stupid (very possible) but it seems to me
using PyMat would be just as powerful (if not more) as
Hey guys.I have begun playing with the Simple MUD server example from the Stackless website( http://www.stackless.com/Members/rmtew/code/mud.py )
and it's all good so far, however, I've come to notice something that I remember from backin the days (some old mud code), but I don't remember what I di
Oh, and, apologies for the "inpythonic" nature of this issue.On 5/24/06, Patrick M. Nielsen <[EMAIL PROTECTED]
> wrote:Hey guys.I have begun playing with the Simple MUD server example from the Stackless website
( http://www.stackless.com/Members/rmtew/code/mud.py )
and it
*bump* :)On 5/24/06, Patrick M. Nielsen <[EMAIL PROTECTED]> wrote:
Oh, and, apologies for the "inpythonic" nature of this issue.On 5/24/06, Patrick M. Nielsen
<[EMAIL PROTECTED]
> wrote:Hey guys.I have begun playing with the Simple MUD server example from the St
__name__ == "__main__":
main()
Now the script runs fine but I don't get all arguments from sys.argv.
No mather how many files I mark in the explorer I only get one as an
argument.
Can anyone tell me how to overcome this issue ?
Best regards
. . . . . .
ompany registered in England and Wales having
company number 03985643.
Registered Office: Airwave Solutions Ltd, Charter Court, 50 Windsor Road,
Slough, Berkshire, SL1 2EJ.
. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
XSLT Developer
LexisNexis
A-1030 Wien, Marxerga
language.
Many thanks for the good work.
Patrick.
--
https://mail.python.org/mailman/listinfo/python-list
601 - 648 of 648 matches
Mail list logo