On Oct 31, 8:01 am, dhyams wrote:
> Thanks for all of the responses; everyone was exactly correct, and
> obeying the binding rules for special methods did work in the example
> above. Unfortunately, I only have read-only access to the class
> itself (it was a VTK class wrapped with SWIG), so I ha
On Nov 1, 3:33 pm, Terry Reedy wrote:
> > for obj, val in zip(Orders, locus):
> > obj.locus = val
>
> > I'm not sure how worthwhile it is converting the above to a list
> > comprehension (when the list would just be thrown away). Having said
> > that the call to zip creates an unnecessary list.
>
On Wed, Nov 2, 2011 at 1:40 PM, Ian Kelly wrote:
>
> If you want to customize the dict you need to do it in __new__, not
> __init__. By the time __init__ is called, the class has already been
> created.
>
> class MetaClass(type):
> def __new__(mcs, name, bases, dict):
> for k, v in dict
On Nov 1, 11:02 pm, Makoto Kuwata wrote:
> Hi,
>
> I want to define a special class which groups functions, like:
>
> class Greepting(FuncGroup):
> def hello(): # no self, no @staticmethod!
> print("Hello!")
> def goodbye(): # no self, no @staticmeth
On Tue, Nov 1, 2011 at 10:02 PM, Makoto Kuwata wrote:
> I tried the following code which converts instance mthods into
> static method automatically, but I don't get result what I want.
> (python 2.5.5)
>
> import sys
> from types import FunctionType
>
> class MetaClass(type):
> de
Hi,
I want to define a special class which groups functions, like:
class Greepting(FuncGroup):
def hello(): # no self, no @staticmethod!
print("Hello!")
def goodbye():# no self, no @staticmethod!
print("Good Bye!")
Geeting.hello():
On Nov 2, 5:27 am, pacopyc wrote:
> Hi, I have about 1 files .doc and I want know the program used to
> create them: writer? word? abiword? else? I'd like develop a script
> python to do this. Is there a module to do it? Can you help me?
Word documents store metadata inside of them, one field
In Muddy
Coder writes:
> I tried to compare two directories, each with hundreds of files in
> multiple level subdirectories, to find out the different files. I used
> filecmp module to the job as:
> comp=filecmp.dircmp(adir, bdir)
> comp.report()
> It worked, and printed out the identical and
Hi Folks,
I tried to compare two directories, each with hundreds of files in
multiple level subdirectories, to find out the different files. I used
filecmp module to the job as:
comp=filecmp.dircmp(adir, bdir)
comp.report()
It worked, and printed out the identical and different files. However,
In article <4eb00a7a$0$6560$9b4e6...@newsspool4.arcor-online.net>,
MrSmile wrote:
> Hi people!
> I have asked myself why I am not capable sending 2 messages a time to a
> Socketserver. Why is that?!
There's a lot of confusing code here. It would help when asking these
kinds of questions to re
On Tue, 1 Nov 2011 16:14:50 -0700 (PDT), Miki Tebeka
wrote:
>Why not use the build in wx.FileDialog?
>
>Also, have a look at the demo that comes with wxPython. It has an example with
>a sortable list control.
Thanks for responding, How would wx.FileDialog help me in this case? I
am trying to di
On 11/1/2011 1:31 PM, Abhishek Pratap wrote:
On Mon, Oct 31, 2011 at 10:31 PM, Abhishek Pratap
mailto:abhishek@gmail.com>> wrote:
Hey Guys
I shud mention I am relative new to the language. Could you please
let me know based on your experience which module could help me with
On Tue, Nov 1, 2011 at 5:19 PM, Miki Tebeka wrote:
> In my box, there are some spaces (tabs?) before "Speed". IMO
> re.search("Speed", line) will be a more robust.
Or simply:
if "Speed" in line:
There is no need for a regular expression here. This would also work
and be a bit more discriminat
On 11/1/2011 2:56 AM, Steven D'Aprano wrote:
On Mon, 31 Oct 2011 20:44:45 -0400, Terry Reedy wrote:
[...]
def is_ascii_text(text):
for c in text:
if c not in LEGAL:
return False
return True
If text is 3.x bytes, this does not work ;-). OP did not specify by
On Tue, 01 Nov 2011 05:03:17 -0700, pyman wrote:
> hello, I need some idea to prove two formula is same.
Impossible. As you explained further on, they are different formula. If
they are different, they aren't the same. This has nothing to do with
Python.
In another message, you tell us:
"thes
In my box, there are some spaces (tabs?) before "Speed". IMO re.search("Speed",
line) will be a more robust.
--
http://mail.python.org/mailman/listinfo/python-list
Why not use the build in wx.FileDialog?
Also, have a look at the demo that comes with wxPython. It has an example with
a sortable list control.
--
http://mail.python.org/mailman/listinfo/python-list
Hi there,
I asked this question on the enthought chaco mailing list some time last by
have yet to receive a reply. Thought I'd ask here to see if anyone could
shed some light on things for me. I have been considering using chaco /
traits for close to a year now and am finally biting the bullet so
I'm still trying to write that seemingly simple Python script to print
out network interfaces (as found in the "ifconfig -a" command) and
their speed ("ethtool "). The idea is to loop for each
interface and
print out its speed. I'm looping correctly, but have some issues
parsing the output for al
On 11/1/2011 11:37 AM, duncan smith wrote:
On 01/11/11 15:05, Gnarlodious wrote:
I want to assign a list of variables:
locus=[-2, 21, -10, 2, 12, -11, 0, 3]
updating a list of objects each value to its respective instance:
for order in range(len(Orders)):
Orders[order].locus=locus[order]
This
On Tue, Nov 1, 2011 at 11:57, Wei wrote:
> I got several buggy things going on.
> First, the view of class tree stops expanding after creating more than
> two classes.
> Second, after 800 lines of code the classes and methods can't be
> folded. (meaning the + sign is gone)
> P.S. there is no warni
On Nov 1, 7:27 pm, pacopyc wrote:
> Hi, I have about 1 files .doc and I want know the program used to
> create them: writer? word? abiword? else? I'd like develop a script
> python to do this. Is there a module to do it? Can you help me?
>
> Thanks
My suggestion would be the same as DaveA's.
On Wed, Nov 2, 2011 at 6:27 AM, pacopyc wrote:
> Hi, I have about 1 files .doc and I want know the program used to
> create them: writer? word? abiword? else? I'd like develop a script
> python to do this. Is there a module to do it? Can you help me?
>
Technically, you can't find out just fro
MRAB wrote:
> On 01/11/2011 18:54, Duncan Booth wrote:
>> Steven D'Aprano wrote:
>>
>>> LEGAL = ''.join(chr(n) for n in range(32, 128)) + '\n\r\t\f'
>>> MASK = ''.join('\01' if chr(n) in LEGAL else '\0' for n in range
(128))
>>>
>>> # Untested
>>> def is_ascii_text(text):
>>> for c in text:
En Mon, 31 Oct 2011 12:57:15 -0300, 罗勇刚(Yonggang Luo)
escribió:
How did detecting where those handlers are created to tracing it and
close
it.
Mainly because I was using C binding library(subvertpy) and file is not
closed.
A better place to ask is python-list@python.org
Please include t
On 11/01/2011 03:27 PM, pacopyc wrote:
Hi, I have about 1 files .doc and I want know the program used to
create them: writer? word? abiword? else? I'd like develop a script
python to do this. Is there a module to do it? Can you help me?
Thanks
If you're on Linux, just use the process module
pyt...@bdurham.com, 31.10.2011 20:54:
Wondering if there's a fast/efficient built-in way to determine
if a string has non-ASCII chars outside the range ASCII 32-127,
CR, LF, or Tab?
I know I can look at the chars of a string individually and
compare them against a set of legal chars using standa
Hi Gabriele,
I'm not an Alchemy expert, but I have used the ColumnProperty of the
model/column objects to solve this problem in the past. So to get the column
name for the description column in your example above, you would use the
following syntax:
Country.description.property.columns[0].nam
On 01/11/2011 18:54, Duncan Booth wrote:
Steven D'Aprano wrote:
LEGAL = ''.join(chr(n) for n in range(32, 128)) + '\n\r\t\f'
MASK = ''.join('\01' if chr(n) in LEGAL else '\0' for n in range(128))
# Untested
def is_ascii_text(text):
for c in text:
n = ord(c)
if n>= len(M
Sorry for the repost, if it does in fact repost.
I'm no SQLAlchemy expert, but I have used the Table and Column attribute
objects from the model object to solve a similar problem in the past. You can
use the following syntax to do it:
[col.name for col in Country.__table__.columns._all_cols]
Hi, I have about 1 files .doc and I want know the program used to
create them: writer? word? abiword? else? I'd like develop a script
python to do this. Is there a module to do it? Can you help me?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Oct 31, 2011 at 6:32 PM, Patrick Maupin wrote:
> On Oct 31, 5:52 pm, Ian Kelly wrote:
>> For instance, split() will split on vertical tab,
>> which is not one of the characters the OP wanted.
>
> That's just the default behavior. You can explicitly specify the
> separator to split on. B
buy wingIDE or use PyDEV
If you tell me that you are using IronPython then buy wingIDE, there you
can make use of the .net classes in python too.
Tamer
Am 01.11.2011 18:01, schrieb Wei:
> On Nov 1, 12:57 pm, Wei wrote:
>> I got several buggy things going on.
>> First, the view of class tree s
Am 01.11.2011 17:13, schrieb Miki Tebeka:
> MKTest.getObj(data[0]) will return the same object on every call(with the
> same data that was initialized 1'st time). Any Daten parameter after the 1'st
> call is ignored.
Not true!
The singleton object has nothing todo. Here one more example for you
Steven D'Aprano wrote:
> LEGAL = ''.join(chr(n) for n in range(32, 128)) + '\n\r\t\f'
> MASK = ''.join('\01' if chr(n) in LEGAL else '\0' for n in range(128))
>
> # Untested
> def is_ascii_text(text):
> for c in text:
> n = ord(c)
> if n >= len(MASK) or MASK[n] == '\0': retur
I am trying to create a small application in wxPython and would like
to ask for some help.
I am trying to display folders and files in ListCtrl but sorted first
folders followed by files (like in a file manager style) but not sure
how to do this? Would I need to do this in code somehow or ListCt
On 01/11/2011 15:07, MrSmile wrote:
Hi people!
I have asked myself why I am not capable sending 2 messages a time to a
Socketserver. Why is that?!
Here the Server:
import SocketServer
from ast import literal_eval
class MKTest(object):
DSX = []
MKTestInst = None
def __init__(se
Hey Guys
Pushing this one again just in case it was missed last night.
Best,
-Abhi
On Mon, Oct 31, 2011 at 10:31 PM, Abhishek Pratap wrote:
> Hey Guys
>
> I shud mention I am relative new to the language. Could you please let me
> know based on your experience which module could help me with fa
On Nov 1, 12:57 pm, Wei wrote:
> I got several buggy things going on.
> First, the view of class tree stops expanding after creating more than
> two classes.
> Second, after 800 lines of code the classes and methods can't be
> folded. (meaning the + sign is gone)
> P.S. there is no warning or erro
Chris Kaynor, 01.11.2011 17:19:
On Tue, Nov 1, 2011 at 8:57 AM, Stefan Behnel wrote:
Chris Kaynor, 31.10.2011 19:34:
I am currently rewritting a class using the Python C API to improve
performance of it, however I have not been able to find any
documentation about how to make a context manager
I got several buggy things going on.
First, the view of class tree stops expanding after creating more than
two classes.
Second, after 800 lines of code the classes and methods can't be
folded. (meaning the + sign is gone)
P.S. there is no warning or errors in my code.
--
http://mail.python.org/ma
On Tue, Nov 1, 2011 at 8:57 AM, Stefan Behnel wrote:
> Chris Kaynor, 31.10.2011 19:34:
>>
>> I am currently rewritting a class using the Python C API to improve
>> performance of it, however I have not been able to find any
>> documentation about how to make a context manager using the C API.
>
>
Am 01.11.2011 16:05, schrieb Gnarlodious:
I want to assign a list of variables:
locus=[-2, 21, -10, 2, 12, -11, 0, 3]
updating a list of objects each value to its respective instance:
for order in range(len(Orders)):
Orders[order].locus=locus[order]
This works, even though it reads lik
MKTest.getObj(data[0]) will return the same object on every call(with the same
data that was initialized 1'st time). Any Daten parameter after the 1'st call
is ignored.
--
http://mail.python.org/mailman/listinfo/python-list
Chris Kaynor, 31.10.2011 19:34:
I am currently rewritting a class using the Python C API to improve
performance of it, however I have not been able to find any
documentation about how to make a context manager using the C API.
You should take a look at Cython. It makes these things *so* much ea
I seem to be using
Python 2.7.2+
(latest update of Ubuntu). The following code used to work nicely, but
now gives me an unreadable legend. The legend is showing up mostly out
of view below and to the left of the figure. Does that happen for you?
Is there a regression bug, or am I doing something wr
On 01/11/11 15:05, Gnarlodious wrote:
I want to assign a list of variables:
locus=[-2, 21, -10, 2, 12, -11, 0, 3]
updating a list of objects each value to its respective instance:
for order in range(len(Orders)):
Orders[order].locus=locus[order]
This works, even though it reads like do
On 11/01/2011 11:05 AM, Gnarlodious wrote:
I want to assign a list of variables:
locus=[-2, 21, -10, 2, 12, -11, 0, 3]
updating a list of objects each value to its respective instance:
for order in range(len(Orders)):
Orders[order].locus=locus[order]
This works, even though it reads li
Gnarlodious wrote:
> I want to assign a list of variables:
> locus=[-2, 21, -10, 2, 12, -11, 0, 3]
>
> updating a list of objects each value to its respective instance:
>
> for order in range(len(Orders)):
> Orders[order].locus=locus[order]
>
> This works, even though it reads like doggerel. Is
Hi people!
I have asked myself why I am not capable sending 2 messages a time to a
Socketserver. Why is that?!
Here the Server:
import SocketServer
from ast import literal_eval
class MKTest(object):
DSX = []
MKTestInst = None
def __init__(self,Daten):
MKTest.DSX.append(Date
I want to assign a list of variables:
locus=[-2, 21, -10, 2, 12, -11, 0, 3]
updating a list of objects each value to its respective instance:
for order in range(len(Orders)):
Orders[order].locus=locus[order]
This works, even though it reads like doggerel. Is there a more
pythonesque way
Hi people!
I have asked myself why I am not capable sending 2 messages a time to a
Socketserver. Why is that?!
Here the Server:
import SocketServer
from ast import literal_eval
class MKTest(object):
DSX = []
MKTestInst = None
def __init__(self,Daten):
MKTest.DSX.append(Date
Hi !
Is there a crypto library for Python that has support for GCM ??
-- Roland
--
http://mail.python.org/mailman/listinfo/python-list
(You forgot to do a REPLY-ALL, so that your message didn't get sent to
the list)
Python doesn't have formulae, it has functions and methods. So you have
to describe more completely
what kind of formula you have, math, physics, chemistry?
the formula is related to math.
And how is
On 11/01/2011 08:03 AM, pyman wrote:
hello, I need some idea to prove two formula is same. if N = 3, these
formula are same each other. each formula has 3 input . To prove this,
drawing shape or anything would be possible. how can I do this? please
give me your idea!
for example:
N = 1 : formula
Steven D'Aprano wrote:
> On Mon, 31 Oct 2011 22:12:26 -0400, Dave Angel wrote:
>
>> I would claim that a well-written (in C) translate function, without
>> using the delete option, should be much quicker than any python loop,
>> even if it does copy the data.
>
> I think you are selling short th
On Mon, 31 Oct 2011 22:12:26 -0400, Dave Angel wrote:
> I would claim that a well-written (in C) translate function, without
> using the delete option, should be much quicker than any python loop,
> even if it does copy the data.
I think you are selling short the speed of the Python interpreter.
On Mon, 31 Oct 2011 20:44:45 -0400, Terry Reedy wrote:
[...]
>> def is_ascii_text(text):
>> for c in text:
>> if c not in LEGAL:
>> return False
>> return True
>
> If text is 3.x bytes, this does not work ;-). OP did not specify bytes
> or unicode or Python version
58 matches
Mail list logo