Re: Need help subclassing Borg

2005-05-07 Thread [EMAIL PROTECTED]
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

Re: get file modification time in mm/dd/yyyy format?

2005-05-07 Thread [EMAIL PROTECTED]
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

Re: Shell Commands in Python Code

2005-05-07 Thread [EMAIL PROTECTED]
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

Re: path(file)

2005-05-07 Thread [EMAIL PROTECTED]
What about start reading http://docs.python.org/lib/module-os.path.html? -- http://mail.python.org/mailman/listinfo/python-list

win32- system call - getting results back into python

2005-05-07 Thread [EMAIL PROTECTED]
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'

Re: globbing multiple wildcards

2005-05-07 Thread [EMAIL PROTECTED]
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

Re: Newbie : checking semantics

2005-05-07 Thread [EMAIL PROTECTED]
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

Python features

2005-05-08 Thread [EMAIL PROTECTED]
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

Python LDAP Schema Pickle

2005-05-09 Thread [EMAIL PROTECTED]
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

Re: regarding try/except usa

2005-05-09 Thread [EMAIL PROTECTED]
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

replace string patern with different value

2005-05-09 Thread [EMAIL PROTECTED]
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

Re: replace string patern with different value

2005-05-09 Thread [EMAIL PROTECTED]
Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Unique Elements in a List

2005-05-09 Thread [EMAIL PROTECTED]
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

Re: Unique Elements in a List

2005-05-09 Thread [EMAIL PROTECTED]
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

[PyQt] browse for a directory

2005-05-10 Thread [EMAIL PROTECTED]
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

Re: Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means that if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever separated from the love of God in a place called Hell. The Holy Bible descibes Hell as a place of eternal torment, suffering, pain and agony for all those who have rejected Jesus Christ. The good news is that you can avoid Hell by allowing Jesus Christ to save you today. Only then will you have true peace in your life knowing that no matter what happens you are on your way to Heaven. by [email protected]

2005-05-11 Thread [EMAIL PROTECTED]
jerkoff -- http://mail.python.org/mailman/listinfo/python-list

Re: unstatisfied symbols building Python 2.4.1 on HP-UX 10.20

2005-05-11 Thread [EMAIL PROTECTED]
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) >

increment bits

2005-05-12 Thread [EMAIL PROTECTED]
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

newbie - insert variable in pathname

2005-05-13 Thread [EMAIL PROTECTED]
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

create words of various lengths

2005-05-13 Thread [EMAIL PROTECTED]
"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!

creating words of diff lengths

2005-05-13 Thread [EMAIL PROTECTED]
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

Re: create words of various lengths

2005-05-13 Thread [EMAIL PROTECTED]
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

Re: create words of various lengths

2005-05-13 Thread [EMAIL PROTECTED]
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

Re: create words of various lengths

2005-05-13 Thread [EMAIL PROTECTED]
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

Re: create words of various lengths

2005-05-13 Thread [EMAIL PROTECTED]
:) 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

Re: creating words of diff lengths

2005-05-13 Thread [EMAIL PROTECTED]
yes! sorry about that -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning Date As String ?

2005-05-14 Thread [EMAIL PROTECTED]
if you're using date.today(): x=date.today() -- http://mail.python.org/mailman/listinfo/python-list

Python on a public library computer

2005-05-14 Thread [EMAIL PROTECTED]
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

wxPython and a Control Property Editor

2005-05-15 Thread [EMAIL PROTECTED]
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

PIGIP Meeting -- Python Interest Group In Princeton

2005-05-15 Thread [EMAIL PROTECTED]
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

Structuring larger applications - ideas

2005-05-16 Thread [EMAIL PROTECTED]
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

Re: wxPython and a Control Property Editor

2005-05-16 Thread [EMAIL PROTECTED]
Please, if anyone can help -- http://mail.python.org/mailman/listinfo/python-list

optparse global

2005-05-16 Thread [EMAIL PROTECTED]
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

Re: trouble with copy/deepcopy

2005-05-16 Thread [EMAIL PROTECTED]
() > 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

Re: optparse global

2005-05-16 Thread [EMAIL PROTECTED]
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

Re: optparse global

2005-05-16 Thread [EMAIL PROTECTED]
Thanks. It works. -Ashton -- http://mail.python.org/mailman/listinfo/python-list

Re: query progress bar

2005-05-16 Thread [EMAIL PROTECTED]
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

Re: logging problems

2005-05-17 Thread [EMAIL PROTECTED]
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

Re: Comparing 2 similar strings?

2005-05-19 Thread [EMAIL PROTECTED]
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

Re: logging problems

2005-05-19 Thread [EMAIL PROTECTED]
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

store mac address

2005-05-19 Thread [EMAIL PROTECTED]
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',

string formatting quirk?

2005-05-20 Thread [EMAIL PROTECTED]
Hi, ''%([]) doesn't raise exception but ''%('') does Can anyone explain me why?? rgds Anurag -- http://mail.python.org/mailman/listinfo/python-list

How come print cannot be assigned to a variable?

2005-05-20 Thread [EMAIL PROTECTED]
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

dealing with MAC address

2005-05-20 Thread [EMAIL PROTECTED]
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

Re: How come print cannot be assigned to a variable?

2005-05-20 Thread [EMAIL PROTECTED]
Thank You Adriano. You were a huge help. Vaibhav -- http://mail.python.org/mailman/listinfo/python-list

buffer_info error

2005-05-20 Thread [EMAIL PROTECTED]
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

Re: buffer_info error

2005-05-20 Thread [EMAIL PROTECTED]
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

Re: Can you introduce some book about python?

2005-05-21 Thread [EMAIL PROTECTED]
if u r come from china, maybe python.cn is a good start :) -- http://mail.python.org/mailman/listinfo/python-list

install python 2.4.1

2005-05-22 Thread [EMAIL PROTECTED]
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

Re: install python 2.4.1

2005-05-22 Thread [EMAIL PROTECTED]
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/

Re: install python 2.4.1

2005-05-23 Thread [EMAIL PROTECTED]
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

Re: Python & DOM

2005-05-23 Thread [EMAIL PROTECTED]
textNode = yourDocumentElement.createTextNode("the content") yourElement.appendChild(textNode) /S -- http://mail.python.org/mailman/listinfo/python-list

Re: Access lotus notes using Python

2005-05-24 Thread [EMAIL PROTECTED]
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

searching substrings with interpositions

2005-05-24 Thread [EMAIL PROTECTED]
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><

Re: searching substrings with interpositions

2005-05-24 Thread [EMAIL PROTECTED]
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/

can't see timer in emacs action

2005-05-25 Thread [EMAIL PROTECTED]
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

changing build order for SWIG extensions

2005-05-25 Thread [EMAIL PROTECTED]
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

quiver vector plot problem

2005-05-25 Thread [EMAIL PROTECTED]
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

Re: Q: "...Learning with Python" ...a property that addition and multiplication have...

2005-05-25 Thread [EMAIL PROTECTED]
[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

Re: Access from one class to methode of other class

2005-05-26 Thread [EMAIL PROTECTED]
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

Re: Intellisense and the psychology of typing

2005-05-26 Thread [EMAIL PROTECTED]
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

Re: win32clipboard.GetClipboardData() return string with null characters

2005-05-26 Thread [EMAIL PROTECTED]
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=

overflowerror!!

2005-05-26 Thread [EMAIL PROTECTED]
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

Re: overflowerror!!

2005-05-26 Thread [EMAIL PROTECTED]
I tried that. Still get an Overflowerror: unsigned long is less than minimum. -Ashton -- http://mail.python.org/mailman/listinfo/python-list

Does Python have a Template::Extract equivalent from Perl's CPAN

2005-05-27 Thread [EMAIL PROTECTED]
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

Re: Does Python have a Template::Extract equivalent from Perl's CPAN

2005-05-27 Thread [EMAIL PROTECTED]
should have read, "if nobody is aware of any module..." not "if nobody is not aware...". -- http://mail.python.org/mailman/listinfo/python-list

Re: Python/Excel AddIn (was:Re: Does Python have a Template::Extract equivalent from Perl's CPAN)

2005-05-27 Thread [EMAIL PROTECTED]
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

Re: Threading questions

2005-05-28 Thread [EMAIL PROTECTED]
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

Re: write to the same file from multiple processes at the same time?

2005-05-28 Thread [EMAIL PROTECTED]
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

Re: Newbie learning OOP 2nd ?

2005-05-30 Thread [EMAIL PROTECTED]
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

How do you drive-by-wire a car using Python ?

2005-05-30 Thread [EMAIL PROTECTED]
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

Re: plotting with Python

2005-05-30 Thread [EMAIL PROTECTED]
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

regular expression problem

2005-05-31 Thread [EMAIL PROTECTED]
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=[

Re: How do you drive-by-wire a car using Python ?

2005-05-31 Thread [EMAIL PROTECTED]
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

exit after process exit

2005-05-31 Thread [EMAIL PROTECTED]
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

Re: regular expression problem

2005-05-31 Thread [EMAIL PROTECTED]
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

Re: How do you drive-by-wire a car using Python ?

2005-05-31 Thread [EMAIL PROTECTED]
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

Re: Seti-like program

2005-05-31 Thread [EMAIL PROTECTED]
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

array concatenation

2005-05-31 Thread [EMAIL PROTECTED]
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

Re: convert a string to tuple

2005-05-31 Thread [EMAIL PROTECTED]
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

Swig compile errors

2005-05-31 Thread [EMAIL PROTECTED]
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

Re: Swig compile errors

2005-05-31 Thread [EMAIL PROTECTED]
Nop No luck. That dint work. -- http://mail.python.org/mailman/listinfo/python-list

Re: working with pointers

2005-06-01 Thread [EMAIL PROTECTED]
this might help.. http://effbot.org/zone/python-objects.htm -- http://mail.python.org/mailman/listinfo/python-list

unsigned long to unsigned char

2005-06-01 Thread [EMAIL PROTECTED]
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

Re: creating a hex value

2005-06-01 Thread [EMAIL PROTECTED]
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

Re: using builtin array

2005-06-01 Thread [EMAIL PROTECTED]
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

Earthlink Thinks It's Time To Move On...

2005-06-02 Thread [EMAIL PROTECTED]
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... --

Simple Kiosks Serve The World

2005-06-02 Thread [EMAIL PROTECTED]
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

Question about 'wave' module

2005-06-03 Thread [EMAIL PROTECTED]
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

Grand Challenge Pegasus Team: Programming Pegasus Bridge 1 ?

2005-06-04 Thread [EMAIL PROTECTED]
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

Re: Grand Challenge Pegasus Team: Programming Pegasus Bridge 1 ?

2005-06-05 Thread [EMAIL PROTECTED]
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

PyArg_ParseTuple and dict

2005-06-05 Thread [EMAIL PROTECTED]
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

Re: PyArg_ParseTuple and dict

2005-06-05 Thread [EMAIL PROTECTED]
> 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

Re: Question about Object Oriented + functions/global vars?

2005-06-06 Thread [EMAIL PROTECTED]
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

Re: School Administration Software

2005-06-07 Thread [EMAIL PROTECTED]
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

xmlrpclib - methodHelp doesn't work

2005-06-07 Thread [EMAIL PROTECTED]
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

Re: different time tuple format

2005-06-07 Thread [EMAIL PROTECTED]
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

Re: different time tuple format

2005-06-07 Thread [EMAIL PROTECTED]
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", "

Re: Binary numbers

2005-06-07 Thread [EMAIL PROTECTED]
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

Re: xmlrpclib - methodHelp doesn't work

2005-06-07 Thread [EMAIL PROTECTED]
oh. missed that one. thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

<    20   21   22   23   24   25   26   27   28   29   >