ry
-def covering(self):
-return self.__covering
-
-bugs = Rabbit()
-daffy = Duck()
-print daffy.covering()
-print bugs.covering()
[EMAIL PROTECTED]:~$ ./test2.py
feathers
fur
[EMAIL PROTECTED]:~$
--
http://mail.python.org/mailman/listinfo/python-list
Tried this it on linux, should work under windows as well I think
[EMAIL PROTECTED]:~$ python
Python 2.4.1 (#2, Mar 30 2005, 21:51:10)
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information
start to take a look at the call function of the subprocess module -
see http://docs.python.org/lib/node231.html
--
http://mail.python.org/mailman/listinfo/python-list
What about start reading http://docs.python.org/lib/module-os.path.html?
--
http://mail.python.org/mailman/listinfo/python-list
Hey everyone,
I'm trying to call a system command "svnlook log \arms" from within
python and process the results. However I'm having trouble getting the
results of the command back into python. I'm using windows if that
matters.
Here's what I have so far:
os.system("svnlook") #works but doesn'
Then take a look at os.walk, see
http://docs.python.org/lib/os-file-dir.html
--
http://mail.python.org/mailman/listinfo/python-list
I do not know of a check like the one you desire. But you always can
use some clever testing, e.g. facilitated with the unittest module to
prevent situations like yours, see
http://docs.python.org/lib/module-unittest.html
--
http://mail.python.org/mailman/listinfo/python-list
To which degree python language support features of following langauage
categories?
Imperative, Object Oriented, Scriptig or Functional.
--
http://mail.python.org/mailman/listinfo/python-list
After much googling, I'm yet to see hint at the following topic.
Has anyone ever worked on supporting ldap persistance of python
objects? I'm a bit new to ldap, and I've noticed that there is a
java.schema file standardized that stores persists java objects in an
ldap directory.
I would think tha
Well, there is a lot to say about this subject. Start reading with
this: http://docs.python.org/tut/node10.html
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I would like to replace string with different values,
For example :
source = 'kode1 bla bla kode1 bla kode1'
I have a list with each member will replace each of kode1.
L = [11,22,33]
So the new source will become:
newsource = '11 bla bla 22 bla 33'
How can I do it ? I tried to find using s
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
Is there an easy way to grab the Unique elements from a list?
For Example:
data = [0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9]
what I am looking for is the unique elements 0.4 and 0.9 with their
index from the list.
Probably something like a Hash Table approach!!
I would like to get this done without unneces
OK I need to be more clear I guess!Unique Elements I mean, elements
that are non repeating. so in the above list 0.4, 0.9 are unique as
they exist only once in the list.
--
http://mail.python.org/mailman/listinfo/python-list
Hi people,
I'm trying my first little app to create a small, simple application in
Python (just to see how PyQt works and all) and I seem to get stuck. I
want to make a front-end for ImageMagick's convert for my dad. He
usually wants to send people pictures he made with his digital camera
and he n
jerkoff
--
http://mail.python.org/mailman/listinfo/python-list
Scott Leerssen wrote:
> I'm trying to build Python 2.4.1 on HP-UX 10.20 and get the following
> during linking:
>
> /usr/ccs/bin/ld: Unsatisfied symbols:
> PyThread_acquire_lock (code)
> PyThread_exit_thread (code)
> PyThread_allocate_lock (code)
> PyThread_free_lock (code)
>
Hello,
How do i manipulate arrays to increment 8 bits at a time.
I need to generate a pattern like
01,02,03,.0xFF
Thanks,
-Ashton
--
http://mail.python.org/mailman/listinfo/python-list
Hello all,
I have a username variable luser:
luser = win32api.GetUserName
I need to insert it into the following to replace the hardcoded
"johndoe" in the pathname of GIS.GIS.Parcels:
GIS_GIS_Parcels = "Database
[EMAIL PROTECTED]"
Thanks in advance,
plsullivan
--
ht
"X-No-Archive: yes"
what I am looking for is
1. To create a list of different words of various lengths(1-15) using
A-Z,a-z,0-9 and punctuations.Basically anything that could be found on
a text document.
2. The words formed need not be meaningful .FOr example 'ajf' or
'fcjgdtfhbs' or even 'gfdew!
X-No-Archive: yes
what I am looking for is
1. To create a list of different words of various lengths(1-15) using
A-Z,a-z,0-9 and punctuations.Basically anything that could be found on
a text document.
2. The words formed need not be meaningful .FOr example 'ajf' or
'fcjgdtfhbs' or even 'gfdew!' o
Hi Robert,
At first I thought it would be an interesting thing to have a little
swift module to create a database of all words in the dictionary.But
then I thought y just the words in the dictionary? y not all possible
words like 'and' and 'adn'. Just was inspired with the little idea of
if its an
no specific number of words.
and I get a syntax error on line:
> words["".join(choice(alphabet) for i in range(randint(1,15)))] = None
--
http://mail.python.org/mailman/listinfo/python-list
this works
while len(words) < 1:
wd = ""
for i in ["".join(choice(alphabet)) for i in
range(randint(1,15))]:
wd += i
words[wd] = None
anyway Thanks for that this is exactly what i need..
--
http://mail.python.org/mailman/listinfo/python-list
:) the reason for me not upgrading my python is I am waiting for
version of Numeric to be released for python 2.4 .The stable version of
Numeric is only release for windows and not Linux I guess the last time
i checked. which i use a lot .
Anyway thanks
--
http://mail.python.org/mailman/listinfo
yes! sorry about that
--
http://mail.python.org/mailman/listinfo/python-list
if you're using date.today():
x=date.today()
--
http://mail.python.org/mailman/listinfo/python-list
Here's my situation:
I'm typing this in a public library on a computer with OS windows 2000
server. I can run Internet explorer, word, excel and powerpoint, that's
it. Maybe java, but it seems to be flaky.
I want to run python scripts from this computer. At home I have a
multi-computer network (f
Hi,
I'm building a modest GUI editor for myself using wxPython, and I need
some help.
I want to create a nice 'Control Property Editing Window', just like
VisualBasic, Delphi, Visual C++, etc.
After searching for a while, I found an interesting extension for wx
that does exactly this (and very ni
interest in the Python language are encouraged to
attend, and no RSVP is required and there is no charge is required or
expected for attendence.
You can read more about PIGIP at http://www.pigip.org.
-- Jon R. Fox
-- [EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I'm busy with a large application and feel it would eas my work if I
can specify dependencies on the granularity of packages, rather than
modules and classes. Eg:
- By convention I do the one class per file thing. SO in python this
means one class per module - naming classes after their
Please, if anyone can help
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
How do i make an option passed through command line, using optparse
global. I need to import this value in another file.
This is what iam trying to do.
$python test.py -d
i should be able to store '' as global so that i could
access this value in another file. If
()
> d2.__ostatok_m=self.__ostatok_m.copy()
> return d2
>
> It's work well, but I don't understand why previous is wrong and how
to do it
> in right way.
>
> Alexander, [EMAIL PROTECTED]
Hello, Alexander,
I just asked about deepcopy here in comp.lang.python
This does not seem to work. I still get the default value 5007 when i
run
$python txd.py - p5006
$python testme.py
***txd.py***
global options
parser = OptionParser()
parser.add_option("-p", "--port", dest="port", default=5007,
type="int",
help="port to
Thanks. It works.
-Ashton
--
http://mail.python.org/mailman/listinfo/python-list
What type of UI is this for? The Python Cookbook, 2nd Ed. has a nice
textual solution. I'm not sure if this is the same one, but here is http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/168639";>one
from ASPN. Here is one http://wxpython.org/docs/api/wx.ProgressDialog-class.html";> for
wxPyt
I tried moving the import traceback to the start of the file
(logging/__init__.py) but that did not seem to have any effect?
I suppose the fix was in version 1.26 in cvs?
--
http://mail.python.org/mailman/listinfo/python-list
Could hit a few snags. Quick out-of-the-library compression using
standards like zlib will have headers that will dilute the difference
on short strings, and on long strings block compression (zlib, bzip2)
will not pick up similarities because the similarities will be in
different blocks. With bl
I thought I did, but when I checked today it seems I've screwed up and
edited logging/__init__.py in 2.4 and tested with 2.3
So after fixing it in the correct place, it works nicely..
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I am trying to fill an array with source and destination mac address.
The first 6 bytes hold the destination mac address and the next six
bytes hold the source mac address. Here's a snippet for filling in
broadcast address for the destination mac.
# Get destination address
data = array('B',
Hi,
''%([]) doesn't raise exception
but
''%('') does
Can anyone explain me why??
rgds
Anurag
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
In Python, some functions can be assigned to variables like this:
length=len
Why is it that print cannot be assigned to a variable like this? (A
syntax error is declared.)
Thanks,
Vaibhav
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I am trying to fill a packet with source and destination mac address.
The first 6 bytes hold the destination mac address and the next six
bytes hold the source mac address. In the code i am filling in the
first six bytes to broadcast address for the destination.
# fill in the destination ad
Thank You Adriano. You were a huge help.
Vaibhav
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
buffer_info is giving the following error:
AttributeError: 'str' object has not attribute 'buffer_info'
Here's the code snippet...
dest = ''
src = '0123'
data = array('B', '\0' * 256)
data1 = ''.join([dest, src]
print data1
>>0123
print data.buff
i am filling in a packet with source and destination address and using
the buffer_info call to pass on the address to an underlying low level
call.
The src and dest are strings, but buffer_info expects an array. How do
i deal with this?
--
http://mail.python.org/mailman/listinfo/python-list
if u r come from china, maybe python.cn is a good start :)
--
http://mail.python.org/mailman/listinfo/python-list
hi,
I use python 2.4 and
I would like to install python 2.4.1. Is it necessary to uninstall the
first version or just install 2.4.1?
Does it effect pydef (eclipse editor) or komodo ide ?
pujo
--
http://mail.python.org/mailman/listinfo/python-list
I use win xp pro.
I wonder about this new version of python because I use Nummeric, pyro,
combine with komodo and pydev ide in my python 2.4.
If there is compatibility isue with the new version, it is better for
me not to install the new version.
Sincerely Yours,
pujo
--
http://mail.python.org/
Hello,
I installed python 2.4.1 at last.
I installed in two different computers all windows xp pro. I found the
installation size in add/remove software different in size is that
normal.
pujo
--
http://mail.python.org/mailman/listinfo/python-list
textNode = yourDocumentElement.createTextNode("the content")
yourElement.appendChild(textNode)
/S
--
http://mail.python.org/mailman/listinfo/python-list
try this
import win32com.client
session = win32com.client.Dispatch('Lotus.NotesSession')
session.Initialize(r'')
db = session.GetDatabase('',r'.nsf')
view = db.GetView(r'')
doc = view.GetFirstDocument()
print doc.GetFirstItem('ii').Values
domino return string as unicod
hi everyone.
a problem:
two binary strings, a="0101" b="0100";
i search a function f(a,b) that gives 1 if a is "contained" in b with
any sub strings interposed.
in this example a in contained cause 000<01>111<01>00 but also
0<0>00<101>00"
but also <0>000<101>00 but also 000<0><
thanx everyone, is what i need.
As Claudio argues, it's a standard problem of dna sequences
comparation.
the next step of my job is to make limits of lenght of interposed
sequences (if someone can help me in this way i'll apreciate a lot)
thanx everyone.
giorgio
--
http://mail.python.org/mailman/
Hello,
I tried this code in emacs.
for i in range(3):
time.sleep(1)
print i
It shows the result but total result not second per second.
Any one experiance this problem
pujo
--
http://mail.python.org/mailman/listinfo/python-list
Hi all.
How do I tell distutils to run build_ext before build_py when I try to
do a
'python setup.py build' ?
I have a C extension using SWIG, and when I build with setup.py,
build_py runs on the current module.py file before swig
creates/recreates it. I got around it by just putting in another
Hello All,
I am using matplotlib0.8. With the quiver function I
have tried to plot a vector. However for some reason I
do not get what I want.
I have problem with the S (according the comments a
scaling parameter) parameter. When I set it to 0 (S = 0
), I get the correct vector with correct directi
[EMAIL PROTECTED] wrote:
> Greetings.
>
> I'm reading "How to think like a computer scientist: Learning with
> Python" and there's a question regarding string operations. The
> question is, "Can you think of a property that addition and
> multip
I don't know if your're actually calling the classes '1' and '2', but
that's a really bad idea!
> class 2:
>def ins(self)
>d.entry.insert(variable)
This is probably where you're getting the NameError. d is not defined,
so calling d.entry will generate an error.
Reidar
--
http://mai
my opinion is that if you find it useful, use it. if you don't then
don't... either way, its up to you to decide what's useful and what's
not. don't ask us. Try it out yourself.
--
http://mail.python.org/mailman/listinfo/python-list
It appears to me that some applications put extra garbage data into the
clipboard. win32clipboard may have faithfully returning all of them.
I use this application to show the clipboard content:
import win32clipboard, win32con
def getWinClipboardText():
win32clipboard.OpenClipboard()
d=
Hello,
I am trying to fill in a dword value into an array and i get an
overflowerror
Here's what iam trying to do.
from array import *
data = array('B', '\0' * 256)
val = 0x
for i in range(256):
data[i] = val
print data
How do i fill in the val 256 times into the array?
-Ashton
I tried that. Still get an Overflowerror: unsigned long is less than
minimum.
-Ashton
--
http://mail.python.org/mailman/listinfo/python-list
Hi All,
I already searched this newsgroup and google groups to see if I could
find a Python equivalent to Perl's Template::Extract, but didn't find
anything leading to a Python module that had similar functionality. I
am a big fan of Python as an OO language and use it for many system
admin utili
should have read, "if nobody is aware of any module..." not "if nobody
is not aware...".
--
http://mail.python.org/mailman/listinfo/python-list
CL, after you install py_win32 on windows you should look for a module
called "excel*.py" under your ${PYTHONHOME} directory. They have a
very basic COM Server Excel AddIn as an example.
--
http://mail.python.org/mailman/listinfo/python-list
For threading I use usually this recipe as a base:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65448, I think
you can use it for your purpose as well.
--
http://mail.python.org/mailman/listinfo/python-list
Well I just tried it on Linux anyway. I opened the file in two python
processes using append mode.
I then wrote simple function to write then flush what it is passed:
def write(msg):
foo.write("%s\n" % msg)
foo.flush()
I then opened another terminal and did 'tail -f myfile.txt'.
It worke
I would split your code such that the Q&A is seperated from the
calculations, and I would model the bill something like :
class allbills(object):
def __init__(self, bill, tip):
self._bill = bill
self._tip = tip
def gettip(self):
return self._tip / 100.0
tip = p
Hello everybody,
Our entry in the DARPA Grand Challenge race uses Python as a
programming language. For those of you who are interested, we are
beginning to put some of our code on our blog.
Before being autonomous, our vehicle (a four wheel drive Jeep) has to
first be driven by wire, i.e. use co
We use dislin in my lab. I don't think it's GPL...
http://www.linmpi.mpg.de/dislin
--
http://mail.python.org/mailman/listinfo/python-list
hi everyone
there is a way, using re, to test (for es) in
a=[a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14] if a list b is
composed by three "sublists" of a separated or not by elements.
if b=[a2,a3,a4,a7,a8,a12,a13] gives true because in a
we have [,a2,a3,a3,...,a7,a8,...,a12,a13,...]
or b=[
Please note we had to avoid trash cans when the DARPA folks came to
visit us. Our vehicle aims at being a garbage avoidance system instead
:-)
Igor.
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I would like to run a python process and wait until the process exit.
How can I do it?
For example I would like to run a.exe. and wait until a.exe exit.
Sincerely Yours,
Pujo
--
http://mail.python.org/mailman/listinfo/python-list
thank you again:
i used list and not set because order in my list is important.
in fact i'd like to apply this function to strings (or ordered
sequences of data).
For this reason proposed to use regular expression.
best regards.
--
http://mail.python.org/mailman/listinfo/python-list
Cameron,
Good point, I know you are a newbie :-). Let me help you out, just tell
the guy in the hallway that for the recognition of the spelling for
garbage in any other languages we use the zipfile module as pointed out
in
http://pegasusbridge.blogspot.com/2005/05/on-being-innovative-part-i.html
Other examples- PCAnyWhere, a Trojan Horse .. :)
Anyway, this is quite simple.
All you realy need is a server with a GUI that listens all the time for
incoming connections,
and a client that will connect to the server and work in the
background.
Here are some thoughts...
- Figure out what ac
Hello,
I have 2 arrays defined with different typecodes.
a = array('B', '\0', 6)
b = array('L', '\0', 526)
for i in range( 6):
a[i] = 0xFF
for i in range( 520):
b[i] = 0x
How do i concatenate these two arrays so that, i get
b =
0xff 0xff 0xff 0xff 0xff 0xff 0x 0x
Pass it to eval:
>>> eval('(1, 2, 3, 4, 5)')
(1, 2, 3, 4, 5)
Basically what you are doing it evaluating the repr of the tuple.
-Brett
--
http://mail.python.org/mailman/listinfo/python-list
Hi I am trying to write a python wrapper for a C code I have using
swig. when i try to compile the _wrap.c i get a bunch of these warnings
and errors can anyone help
Steps I followed :
$swig -python test_hk.c
this generates test_hk.py and test_hk_wrap.c
then i compile it as
$gcc -Wall -std=c99 te
Nop No luck. That dint work.
--
http://mail.python.org/mailman/listinfo/python-list
this might help..
http://effbot.org/zone/python-objects.htm
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
Is it possible to convert unsigned long( 4 bytes) to unsigned char(1
byte), so that i could define a common array for both.
import array
temp = array('B', '\0' * 512)
for i in range( 2):
temp[0] = 0xFF
temp[1] = 0x
Thanks,
-Ashton
--
http://mail.python.org/mailman/listi
What about
[EMAIL PROTECTED]:~$ python
Python 2.3.5 (#2, May 4 2005, 08:51:39)
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> hex(21)
'0x15'
>>>
--
http://mail.python.org/mailman/listinfo/python-list
I am constructing a packet, with the first 6 bytes being the
destination address, followed by src, and type. The remaining space
will be filled with data. I need to use an array because of the
buffer_info method i am calling.
-SB
--
http://mail.python.org/mailman/listinfo/python-list
Jeff_Relf wrote:
> Targeting Win_XP is taboo somehow ? It shouldn't be.
Why target a dying OS that a Top Tier ISP has abandoned.
Earthlink is featuring the thrifty Xandrox Desktop.
A $69 PC that is Internet Ready?
Earthlink has it!
It can't be done with the buggy and expensive Windos...
--
Jeff_Relf wrote:
> As I've told you a quintillion times, Earthlink's insanity aside,
> Win_XP is a virtual network, quite indepent of the connection used.
> Linux is hardly an OS, it's just a kernel.
The world doesn't need a 'virtual network'...it needs an Internet Kiosk.
While Jeff the Bolshevi
Hello Python World!
I've been playing with the 'wave' and 'audioop' modules in the library,
and I have a question. When I tried to read a "wav" file with samples
in 32-bit float, I got the following error:
Traceback (most recent call last):
File "Play.py", line 111, in ?
playWAV(sys.argv[1
Folks,
In a previous post[*] we made an announcement about the release of the
drive-by-wire code for our entry in the DARPA Grand Challenge. We will
do more in the future (including more data and more code). With regards
to our building the full autonomous code, things are going along well.
Howeve
Thank you Alex for your feedback.
What I am really proposing is for others to test their software on our
vehicle for the very reason that there are a lot of unknowns that I
cannot believe can directly modeled into an ODE type of engine (as you
call it.) Several reasons for this:
- one piece of d
I'm trying to write an extension for python 2.4, and I can't seem to
get PyArg_ParseTuple to work with a dict. I've tried all sorts of
things, but the most simple thing that fails is:
[...]
if (!PyArg_ParseTuple(args, "O", &file)) {
return NULL;
}
[...]
If I call the function from
> 1. On the surface, there appears to be a bug. In the interests of
> finding out where the bug is, perhaps it would be better if you posted
> your minimal compilable runnable example of what *doesn't* work.
I'll post it later tonight.
> 2. To get you off the ground: *if* there is only one argume
Well, if you want to apply object orientatation techniques to your work
you would get something like this. Polymorphism is used to distinct
between the ftp method. Another concept is data encapsulation, see the
filedescription class . A third technique is inheritance - ftp is
derived from an existi
to customize some reports, etc. Any advice you have would
> be welcome.
>
> Thanks,
> --greg
>
> --
> Greg Lindstrom 501 975.4859 (office)
> Senior Programmer501 219-4455 (fax)
> NovaSys Health [EMAIL PROTECTED]
> Little Rock, Arkansas
I tried out the examples in this website for XML-RPC using python -
http://www.onlamp.com/pub/a/python/2000/11/22/xmlrpcclient.html?page=2
But I get the following errors when I try to execute the code. Here is
the snippet of the code with the error messages.
>>> meerkatsvr.system.methodSignature
http://docs.python.org/lib/module-time.html tells us the last element
is the DST flag, on your computer that applies for localtime(). To get
this with strptime() you have to tweak the %Z formatter - this is
platform specific.
--
http://mail.python.org/mailman/listinfo/python-list
In your case it is the EEST, as this is the DST timezone (see again:
http://docs.python.org/lib/module-time.html)
** [EMAIL PROTECTED]:~ $ python
** Python 2.4.1 (#2, Mar 30 2005, 21:51:10)
** [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2
** Type "help", "copyright", "
Douglas Soares de Andrade wrote:
> Hi !
>
> How to work with binary numbers in python ? Is there a way to print a number
> in its binary form like we do with oct() or hex() ?
>
> Im doing a project that i have to work with binaries and i tired of convert
> numbers to string all the time to perfor
oh. missed that one.
thanks a lot.
--
http://mail.python.org/mailman/listinfo/python-list
2401 - 2500 of 4908 matches
Mail list logo