praba kar wrote:
Dear All,
In Php If I send a command to system function
then It will return 1 on success and 0 on failure. So
based upon that value I can to further work.
But In Python If I send a command to system
function then It will return 0 only for both
conditions(success and fail
praba kar <[EMAIL PROTECTED]> writes:
> Dear All,
>
> In Php If I send a command to system function
> then It will return 1 on success and 0 on failure. So
> based upon that value I can to further work.
>
> But In Python If I send a command to system
> function then It will return 0 onl
Op 2005-04-21, Dan Bishop schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>> Op 2005-04-21, Steve Holden schreef <[EMAIL PROTECTED]>:
>> > [EMAIL PROTECTED] wrote:
> ...
>> >> Along the same lines, I think the REQUIREMENT that x[0] rather
> than
>> >> x[1] be the first element of list x is a mi
I have a web app that has been running just fine for several months under
Python 2.2.2.
We are preparing to upgrade the server to run Python 2.4.1.
However, part of my web app is throwing an error on this code (that has
previously worked without exception):
>>> time.strftime("%Y-%m-%d", (Y, M,
Willem Ligtenberg <[EMAIL PROTECTED]> wrote:
> On Sun, 17 Apr 2005 02:16:04 +, William Park wrote:
> > Care to post more details?
>
> The XML file I need to parse contains information about genes.
> So the first element is a gene and then there are a lot sub-elements with
> sub-elements. I onl
Hello evryone
I am a newbie to python. I have a makefile which i can compile in
UNIX/LINUX, But i
I am planning to write a python script which actually does what my
MAKEFILE does. The make file is
#Makefile and some scripts to give output
#numbers
#Change till sign #END
var1:=564-574
a1 =
Dear All,
In Php If I send a command to system function
then It will return 1 on success and 0 on failure. So
based upon that value I can to further work.
But In Python If I send a command to system
function then It will return 0 only for both
conditions(success and failure). So What
Tim Stone wrote:
I'm working on a module that will manipulate large blobs. I'm using a C
dll to allocate big blocks of memory, using PyMem_Malloc, which is
working quite well up until I try to manipulate a blob that exhausts
Python's heap.
how large is that?
I'm guessing that to increase the he
Grant Edwards <[EMAIL PROTECTED]> writes:
> On 2005-04-21, Roy Smith <[EMAIL PROTECTED]> wrote:
>> Grant Edwards <[EMAIL PROTECTED]> wrote:
>>>Sure, but what about the case where his program is on paper
>>>tape and all he has for an editor is an ice pick?
>>
>> Can't you emulate that in emacs wit
Miki Tebeka <[EMAIL PROTECTED]> writes:
> Hello jozo,
>
>> I have to work on python lexical definition in Lex. I spent lots of my
>> time to find regular expresions written for Lex of Python language but
>> nothing.
>> Can somebody help me?
> http://www.antlr.org/grammar/list (search for Python)
>
Roy Smith <[EMAIL PROTECTED]> writes:
> Greg Ewing <[EMAIL PROTECTED]> wrote:
>> Also, everyone, please keep in mind that you always have
>> the option of using a *dictionary*, in which case your
>> indices can start wherever you want.
>>
>> You can't slice them, true, but you can't have everythi
"Gary" <[EMAIL PROTECTED]> writes:
[ py.test ad follows :) ]
> def test_SomeTest(...):
> ...
> self.AssertAllFilesExist(fileList)
>
> or
>
> def test_SomeTest(...):
> ...
> [ self.AssertFileExists(f) for f in fileList ]
I prefer the latter, because t
On Thu, 21 Apr 2005 15:37:03 -0600, Steven Bethard <[EMAIL PROTECTED]> wrote:
>I have a list of strings that looks something like:
> ['O', 'B_X', 'B_Y', 'I_Y', 'O', 'B_X', 'I_X', 'B_X']
>I need to group the strings into runs (lists) using the following rules
>based on the string prefix:
>
James Stroud <[EMAIL PROTECTED]> writes:
> Is it relevant that Python can produce compiled expressions? I don't think
> that there is such a thing with Perl.
The problem in python here is that it needs to always recompile the
regexp. I would like to have a way to write a regexp as a constant and
I'm working on a module that will manipulate large blobs. I'm using a C
dll to allocate big blocks of memory, using PyMem_Malloc, which is
working quite well up until I try to manipulate a blob that exhausts
Python's heap. I'm guessing that to increase the heapsize, I'm going to
have to recom
I am trying to prevent a user from resizing a frame beyond its
"natural" size as given by winfo_reqwidth and winfo_reqheight, without
any success. Can anyone make any suggestions, based on my code below?
Thanks!
from Tkinter import *
class Table(Frame):
def __init__(self, master,
[EMAIL PROTECTED] (Bengt Richter) writes:
> I would try right-clicking the shortcut icon and selecting
> properties, then select the shortcut tab and edit the target string
> with s/python/pythonw/ and then click ok.
>
> Then try double clicking the shortcut icon again. If that does it,
> you're
> On Thu, 21 Apr 2005 09:59:54 -0500, Larry Bates
> <[EMAIL PROTECTED]> wrote:
>
>>2) Or if you not you could see if the argument has next and
>>__iter__ methods (more general solution)
>>
>>if hasattr(arg, 'next') and not hasattr(arg, '__iter__'):
>># perform work on iterable
The 'not' is a
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Ahh, ok. Now I understand. I think you could probably search the
python-dev archives and see why the decision was made as it was. For
pretty
Michael Spencer wrote:
http://www.python.org/doc/2.3.3/lib/module-copy.html
deepcopy:
...
This version does not copy types like module, class, function, method,
stack trace, stack frame, file, socket, window, *array*, or any similar
types.
...
On reflection, I realize that this says that the arr
Thanks for the input. I was just looking for some feedback about which
was better and faster, if an answer exists. However, I am not choosing
Perl or Python b/c of it's RegEx engine as someone mentioned. The
question was just because I was curious, sorry if I misled you to think
I was choosing w
Greg Ewing <[EMAIL PROTECTED]> wrote:
> Also, everyone, please keep in mind that you always have
> the option of using a *dictionary*, in which case your
> indices can start wherever you want.
>
> You can't slice them, true, but you can't have everything. :-)
Of course you can slice them, you jus
[EMAIL PROTECTED] writes:
> > Suppose you could. Then what should
> > ([3, 1, 4] indexbase 0) + ([1, 5, 9] indexbase 4)
> > equal?
> If + means add, the result would be ([4,6,13] indexbase 0) .
That's counterintuitive. I'd expect c = a + b to result in c[i] =
a[i]+b[i] for all elements. So, fo
Dan Bishop wrote:
> Antoon Pardon wrote:
> > Like users have a choice in how long they make a list, they
> > should have a choice where the indexes start. (And that
> > shouldn't be limited to 0 and 1).
>
> Suppose you could. Then what should
>
> ([3, 1, 4] indexbase 0) + ([1, 5, 9] indexbase
In article <[EMAIL PROTECTED]>,
Greg Ewing <[EMAIL PROTECTED]> wrote:
> Roy Smith wrote:
>
> > What would actually be cool is if Python were to support the normal math
> > notation for open or closed intervals.
> >
> > foo = bar (1, 2)
> > foo = bar (1, 2]
> > foo = bar [1, 2)
> > foo = bar [1
[EMAIL PROTECTED] wrote:
I disagree. Programming languages should not needlessly surprise
people, and a newbie to Python probably expects that x[1:3] =
[x[1],x[2],x[3]].
But said newbie's expectations will differ considerably
depending on which other language he's coming from. So
he's almost always
Roy Smith wrote:
What would actually be cool is if Python were to support the normal math
notation for open or closed intervals.
>
foo = bar (1, 2)
foo = bar (1, 2]
foo = bar [1, 2)
foo = bar [1, 2]
That would certainly solve this particular problem, but the cost to the
rest of the language synta
Python is now enter 2.4 era. It is greate, and I want to upgrade too.
However, everytime upgrading to a new version is a great pain. For
every version, we start to re-install what have been in our past
python.
Re-install all packages sometimes require searching for a new version
of binary which i
Antoon Pardon wrote:
This is nonsens. table[i] = j, just associates value j with key i.
That is the same independend from whether the keys can start from
0 or some other value.
Also, everyone, please keep in mind that you always have
the option of using a *dictionary*, in which case your
indices ca
On Thu, 21 Apr 2005 10:09:59 -0400, Peter Hansen <[EMAIL PROTECTED]> wrote:
>Dan wrote:
>> I've having trouble coming to grip with Python strings.
>>
>> I need to send binary data over a socket. I'm taking the data from a
>> database. When I extract it, non-printable characters come out as a
>>
hawkesed wrote:
Actually,
I think I got it now. Here is what I did:
for num in alist:
... if adict.has_key(num):
... x = adict.get(num)
... x = x + 1
... adict.update({num:x})
A simpler way to do this last line is
adict[num] = x
... else:
...
On Thu, 21 Apr 2005 10:09:59 -0400, Peter Hansen <[EMAIL PROTECTED]>
wrote:
Thanks, that's exactly what I wanted. Easy when you know how.
Dan
>Dan wrote:
>> I've having trouble coming to grip with Python strings.
>>
>> I need to send binary data over a socket. I'm taking the data from a
>> da
hawkesed said unto the world upon 2005-04-21 20:28:
Actually,
I think I got it now. Here is what I did:
for num in alist:
... if adict.has_key(num):
... x = adict.get(num)
... x = x + 1
... adict.update({num:x})
... else:
... adict.updat
Actually,
I think I got it now. Here is what I did:
>>> for num in alist:
... if adict.has_key(num):
... x = adict.get(num)
... x = x + 1
... adict.update({num:x})
... else:
... adict.update({num:1})
...
>>> adict
{128: 2, 129: 2, 132: 1, 15
On Thu, 21 Apr 2005 21:34:03 +0100, "ionic" <[EMAIL PROTECTED]> wrote:
Open a text editor and write your code. Save the file with a .py
extension, i.e., myprogram.py. From the command line type 'python
myfile.py'
Dan
>
>Ok sorry guys,
>
>using the python gui, if i hit the 'enter' key python ju
[EMAIL PROTECTED] wrote:
I'm back...
[wondering why copy.deepcopy barfs on array instances]
http://www.python.org/doc/2.3.3/lib/module-copy.html
deepcopy:
...
This version does not copy types like module, class, function, method, stack
trace, stack frame, file, socket, window, *array*, or any sim
Terry Reedy <[EMAIL PROTECTED]> wrote:
> Depending upon you particular application, 'completeness' may be a
> more relevant concern than 'performance'. I believe the original
> Python regex engine did not have all the Perl extensions, some of them
> decidedly 'non regular'. It was replace by the
Steve,
thanks for the input. That is actually what I am trying to do, but I
don't know the syntax for this in python. For example here is a list I
want to work with as input:
[101, 66, 75, 107, 108, 101, 106, 98, 111, 88, 119, 93, 115, 95, 114,
95, 118, 109, 85, 75, 88, 97, 53, 78, 98, 91, 115, 77
SUMMARY
===
For the past few weeks, a self-professed
internet evangelist has posted several times
to several news groups to claim several
points as facts. It would appear that these
assertions do not stand up to close
examination, logic and reason, and stand in
direct contradiction to the expl
I'm back...
Thanks to Michael Spencer and Steven Bethard for their excellent help.
It has taken me a few sessions of reading, and programming, and I've
had to pick up the exploded fragments of my skull from time to time.
But I now have succeeded in making deepcopy work for a simple class
that I wr
Here is an example of the input list:
[101, 66, 75, 107, 108, 101, 106, 98, 111, 88, 119, 93, 115, 95, 114,
95, 118, 109, 85, 75, 88, 97, 53, 78, 98, 91, 115, 77, 107, 153, 108,
101]
Here is the code I am working on now:
>>> for num in alist:
... if adict.has_key(num):
... x = adic
On Thu, 21 Apr 2005 21:16:43 +0800, Dan
<[EMAIL PROTECTED]> wrote:
>I've having trouble coming to grip with Python strings.
>
>I need to send binary data over a socket. I'm taking the data from a
>database. When I extract it, non-printable characters come out as a
>backslash followed by a three
ionic wrote:
Ok sorry guys,
using the python gui, if i hit the 'enter' key python just executes what
ever ive typed. It doesnt take me to the next line.
try shift + enter
/Esben
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
My problem is that I don't know how to create a graph_object that
remains persistent through time (it has to be the same graph_object for
One possibility is to have a remote procedure call server that stores
the graph running seperately from your wab application.
Your web
On Fri, Apr 22, 2005 at 01:34:32AM +0200, Gerhard Haering wrote:
> ===
> pysqlite 2.0.alpha3
> ===
>
> I'm glad to announce pysqlite 2.0.alpha3, which will be the last alpha
> release. Documentation and more testing will be what I'm concentrating
> on in the beta t
===
pysqlite 2.0.alpha3
===
I'm glad to announce pysqlite 2.0.alpha3, which will be the last alpha
release. Documentation and more testing will be what I'm concentrating
on in the beta test phase, so here's the explanation of the new features
within the change log.
"Dan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've having trouble coming to grip with Python strings.
>
> I need to send binary data over a socket. I'm taking the data from a
> database. When I extract it, non-printable characters come out as a
> backslash followed by a th
"codecraig" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am interested in regular expressions and how Perl and Python
> compare. Particulary, I am interested in performance (i.e. speed),
> memory usage, flexibility, completeness (i.e. supports simple and
> complex regex oper
On Thu, 21 Apr 2005 09:59:54 -0500, Larry Bates
<[EMAIL PROTECTED]> wrote:
>2) Or if you not you could see if the argument has next and
>__iter__ methods (more general solution)
>
>if hasattr(arg, 'next') and not hasattr(arg, '__iter__'):
># perform work on iterable
>
>else:
>print "arg m
Steven Bethard wrote:
I have a list of strings that looks something like:
['O', 'B_X', 'B_Y', 'I_Y', 'O', 'B_X', 'I_X', 'B_X']
I'd have done it the same way as you, but here's 'another' way:
>>> def grp(lst):
... stack = []
... for label in lst:
... prefix = label[0]
...
"hawkesed" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I am semi new to Python. Here is my problem : I have a list of 100
> random integers. I want to be able to construct a histogram out of the
> data. So I want to know how many 70's, 71's, etc. I can't figure out
> how
"praba kar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Dear All,
In Python what is equivalent to goto statement
Sheesh! It took 20 days for this to get to my mail server!
John Roth
regards,
praba
--
http://mail.python.org/mailman/listinfo/python-list
scott wrote:
> I installed darwinports and did a "sudo port install jython"
>
> -
>
> scott$ which jython
> /opt/local/bin/jython
>
> -
>
> Jython works in interactive mode as shown below:
>
> -
>
> pyprogs$ cd hotbits/
Is it relevant that Python can produce compiled expressions? I don't think
that there is such a thing with Perl.
Also, to all of the dozen or so people in the world less wise than me about
programming: don't choose your language on how fast the regex engine is. This
would then become a case of
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Ahh, ok. Now I understand. I think you could probably search the
> python-dev archives and see why the decision was made as it was. For
> pretty much all my purposes, "key in dict" is much more useful than "item
jozo wrote:
I have to work on python lexical definition in Lex. I spent lots of my
time to find regular expresions written for Lex of Python language but
nothing.
Can somebody help me?
I nEED hELP
Jython has a Python language lexer written using JavaCC.
--
http://mail.python.org/mailman/listinfo
"tiissa" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It's interesting to note that self.pop instead of A.pop works as
> expected.
> But I don't know why A.pop doesn't.
Because the name 'A' is no longer associated with the class object.
However, self has a reference to the cla
Ron wrote:
[EMAIL PROTECTED] wrote:
Many people I know ask why Python does slicing the way it does.
Can anyone /please/ give me a good defense/justification???
I'm referring to why mystring[:4] gives me
elements 0, 1, 2 and 3 but *NOT* mystring[4] (5th element).
> There are actually 4 different
I have an image that displays on a canvas that works unless I put the
same code in a class. I can't figure that out. Here's what works:
def uts5100(self):
self.screen = Toplevel( self.master )
self.screen.geometry("+100+50")
self.screen.grab_set()
self.screen.fo
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> it looks like we have to use other way, hold the data we want to
> preseve in an object, because it is possible the class is removed
> before the instance cleaned,
What is removed first is the binding between name A and the class obje
Paul Rubin wrote:
"Dan Bishop" <[EMAIL PROTECTED]> writes:
Name a problem space that inherently requires arrays to be 1-based
rather than 0-based.
"inherently" is too strong a word, since after all, we could do all
our computing with Turing machines.
Some algorithms are specified in terms of 1-bas
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
Don't you know that there's a special hell just for spammertrolls?.
You have much repenting to do . You wad.
Everybody
--
http://mail.python.org/mailman/listinfo/python-list
On 21 Apr 2005 09:13:52 -0700, "Mudcat" <[EMAIL PROTECTED]> wrote:
>
>Anyone else have to package builds of com applications that need to be
>supported on different versions of Office? A few tips on how to make
>that run smoother would be some sweet info.
You'll probably do better if you ask the
I have a list of strings that looks something like:
['O', 'B_X', 'B_Y', 'I_Y', 'O', 'B_X', 'I_X', 'B_X']
I need to group the strings into runs (lists) using the following rules
based on the string prefix:
'O' is discarded
'B_...' starts a new run
'I_...' continues a run started by
Bill Davy wrote:
Hi Scott,
Nice idea. Tried that but no more information about where the file was
(not) found (see below).
But many thanks for a useful flag. I did not see them in the documentation.
What should I be lkooking for? [StopPres: Ah ha -h why did I not think of
that?]
...
import SH
[EMAIL PROTECTED] wrote:
look at this discussion:
http://www.dbforums.com/archive/index.php/t-1100372.html
it looks like we have to use other way, hold the data we want to
preseve in an object, because it is possible the class is removed
before the instance cleaned, and we can not expect __del__ 10
Got it now thanks all
--
"It's all in fun or life isn't worth it!"
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> okay, you type your code in idle, and run your code by hitting the F5
> key?
>
--
http://mail.python.org/mailman/listinfo/python-list
I installed darwinports and did a "sudo port install jython"
-
scott$ which jython
/opt/local/bin/jython
-
Jython works in interactive mode as shown below:
-
pyprogs$ cd hotbits/
hotbits$ ls
flips50.py jythoninstall.py ran
Steve Holden wrote:
Michael Spencer wrote:
Andrew Dalke wrote:
I see you assume that only \w+ can fit inside of a %()
in a format string. The actual Python code allows anything
up to the balanced closed parens.
Gah! I guess that torpedoes the regexp approach, then.
Thanks for looking at this
Micha
ionic said unto the world upon 2005-04-21 16:34:
Ok sorry guys,
using the python gui, if i hit the 'enter' key python just executes what
ever ive typed. It doesnt take me to the next line.
How do i type several lines without executing after each line?
Cheers
A bit more precision in your question
okay, you type your code in idle, and run your code by hitting the F5
key?
--
http://mail.python.org/mailman/listinfo/python-list
look at this discussion:
http://www.dbforums.com/archive/index.php/t-1100372.html
it looks like we have to use other way, hold the data we want to
preseve in an object, because it is possible the class is removed
before the instance cleaned, and we can not expect __del__ 100% in
handling finalizin
Ok sorry guys,
using the python gui, if i hit the 'enter' key python just executes what
ever ive typed. It doesnt take me to the next line.
How do i type several lines without executing after each line?
Cheers
--
"It's all in fun or life isn't worth it!"
"James Stroud" <[EMAIL PROTECTED]> w
Howdy all,
Is there an easy way to return all items of an "HTML select multiple"
even if they aren't highlighted?
form=cgi.FieldStorage()
form.getlist("box")
only returns those that are selected.
Thanks,
Mark
--
http://mail.python.org/mailman/listinfo/python-list
"Dan Bishop" <[EMAIL PROTECTED]> writes:
> Name a problem space that inherently requires arrays to be 1-based
> rather than 0-based.
"inherently" is too strong a word, since after all, we could do all
our computing with Turing machines.
Some algorithms are specified in terms of 1-based arrays. A
"ionic" wrote:
This is probably going to sound very dull but, how do you get to the next
line after youve finished typing the first line?
Thanks in advance
if you don't know how to get a new line, how did you write that message?
--
http://mail.python.org/mailman/listinfo/python-list
In the absence of any context to this question: Hit the button that says
"Enter".
James
On Thursday 21 April 2005 01:15 pm, ionic wrote:
> Hi all
>
> This is probably going to sound very dull but, how do you get to the next
> line after youve finished typing the first line?
>
> Thanks in advance
Hi all
This is probably going to sound very dull but, how do you get to the next
line after youve finished typing the first line?
Thanks in advance
--
"It's all in fun or life isn't worth it!"
--
http://mail.python.org/mailman/listinfo/python-list
Le 21/04/05 16:19, « rbt » <[EMAIL PROTECTED]> a écrit :
> Peter Hansen wrote:
>> rbt wrote:
>>
>>> Output from 'netstat -b' on a win2003 server will show what binary is
>>> responsible for the connection. For example, it may list something
>>> like this along with other connection specific data:
[EMAIL PROTECTED] wrote:
> Beside rxb15, there is also redict, in the standard lib (Jay Graves
> shows the HD path):
> http://home.earthlink.net/~jasonrandharper/reverb.py
I knew there was a newer one out there but my google skills failed me.
Thanks for the link.
--
http://mail.python.org/mailma
Bengt Richter wrote:
> But since I'm playing the other side of the table for
> the moment, isn't filter to be deprecated?
How could we know? It might be removed in P3k, but does that
mean it is deprecated, as in "being disapproved", i.e. "being
passed unfavorable judgement on"?
In Python, I consi
The ZODB (Zope's object database, which can be downloaded and installed
separately from Zope) and Durus (part of the Quixote family, I believe)
are both high quality persistent Python object stores that are used
heavily for web sites.
I've never used the ZODB outside of Zope, and haven't used Duru
Diez B. Roggisch>But as the world is complex and people want solutions
to their complex problems, IMHO programming will always be about such
nitty gritty details.<
REs are like assembly, but high-level languages show us that for a
mammal there are (often) better (higher) ways to program a computer
Grant Edwards wrote:
On 2005-04-21, Sergei Organov <[EMAIL PROTECTED]> wrote:
Well, I'm writing for embedded realtime systems in C/C++ and
have never encountered a single need to use goto.
I have encountered situations in C programs where the best
thing to use was a goto. Those situations have al
Antoon Pardon wrote:
> Op 2005-04-21, Steve Holden schreef <[EMAIL PROTECTED]>:
> > [EMAIL PROTECTED] wrote:
...
> >> Along the same lines, I think the REQUIREMENT that x[0] rather
than
> >> x[1] be the first element of list x is a mistake. At least the
> >> programmer should have a choice, as in F
Tim Lesher wrote:
---
New python-dev summary team
---
This summary marks the first by the team of Steve Bethard, Tim Lesher,
and Tony Meyer. We're trying a collaborative approach to the
summaries: each fortnight, we'll be getting together in a virtua
[EMAIL PROTECTED] wrote:
Your problem can be simplified :
class A:
pop = 11
def __del__(self):
print A.pop
if __name__ == '__main__':
objA = A()
I got the same error message, and I don't know why ? it looks like the
class variable can't be accessed from __del__?
It's interesting to note t
[EMAIL PROTECTED] wrote:
Your problem can be simplified :
class A:
pop = 11
def __del__(self):
print A.pop
if __name__ == '__main__':
objA = A()
Exception exceptions.AttributeError: "'NoneType' object has no
attribute 'pop'" in > ignored
I got the same error message, and I don't know why ? it
codecraig wrote:
also is it common to have one class per file?
seems weird to have, MyCustomWidget.MyCustomWidget
thanks
Well, this *is* fairly normal, but you can manage the namespace to your
advantage if you wish. So, for example, gui/__init__.py could do
from CustomWidget import CustomWidg
Your problem can be simplified :
class A:
pop = 11
def __del__(self):
print A.pop
if __name__ == '__main__':
objA = A()
Exception exceptions.AttributeError: "'NoneType' object has no
attribute 'pop'" in > ignored
I got the same error message, and I don't know why ? it looks like the
c
Hi,
I'd like to know if I am trying to do something impossible or I am just
being unable to find how to do it. In the latter case, please... help
me...
I´ve implemented a python class Graph, which handles graphs (with its
nodes, edges, finding paths, etc). In my text-menu interface, I can add
nod
Hi All--
Fredrik Lundh wrote:
>
> Maxim Kasimov wrote:
>
> > how do use this here:
>
> are you still claiming you're not a troll?
>
> *plonk*
>
Oh, I don't think he's a troll, but his license to use Python should be
revoked. I think RPG would be a good language for him, don't you?
Metta,
I
codecraig wrote:
Thanks, but I am not familiar with the "__all__" variable, could u give
me an example?
Without using, __all__would i do this in my __init__.py?
import MyCustomWidget1
import MyCustomWidget2
import MyCustomWidget3
etc?
Yes, correct. __all__ just limits the names that are importe
You seem to have a lot of questions for someone who talks to God every
three minutes.
What do you guys do, discuss the Yankees or something?
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 21 Apr 2005 13:13:17 -0400, David M. Cooke
<[EMAIL PROTECTED]> wrote:
> Charles Krug <[EMAIL PROTECTED]> writes:
>
>> List:
>>
>> Is there a Python package with Convolution and related methods?
>>
>> I'm working on modeling some DSP processes in Python. I've rolled one
>> up, but don't fe
On Thu, 21 Apr 2005 07:58:14 -0400, Kent Johnson <[EMAIL PROTECTED]> wrote:
>Bengt Richter wrote:
>> The following shows nothing static anywhere, yet a class has been defined,
>> an instance created, and
>> __init__ called with initial value, and the value retrieved as an attribute
>> of the ret
On 2005-04-21, Sergei Organov <[EMAIL PROTECTED]> wrote:
> Grant Edwards <[EMAIL PROTECTED]> writes:
>
>> On 2005-04-21, Peter Maas <[EMAIL PROTECTED]> wrote:
>> > Maxim Kasimov schrieb:
>> >> but what if i just can't to do this becouse i'm working thrue ssh, and
>> >> have to use only installed e
On 2005-04-21, Roy Smith <[EMAIL PROTECTED]> wrote:
> Grant Edwards <[EMAIL PROTECTED]> wrote:
>>Sure, but what about the case where his program is on paper
>>tape and all he has for an editor is an ice pick?
>
> Can't you emulate that in emacs with M-X inclusive-or-overwrite-mode?
Heck, emacs pr
Simon Brunning wrote:
On 4/21/05, rbt <[EMAIL PROTECTED]> wrote:
string.between(data,[,])
def between(data, start, end):
return re.findall(re.escape(start) + r'([^]]*)'+ re.escape(end), data)
That's cool!
But it doesn't quite work if the end tag is not ']':
>>> import re
>>> def between(d
On Thu, 21 Apr 2005 07:34:09 +0200, =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
<[EMAIL PROTECTED]> wrote:
>James Stroud wrote:
>> astr = "Bob Carol Ted Alice"
>> letters = "adB"
>
>Apparently nobody has proposed this yet:
>
filter(letters.__contains__, astr)
>'Bad'
filter(set(letters)._
1 - 100 of 244 matches
Mail list logo