mixing SWIG generated and Python-level usertype?

2005-02-01 Thread Bo Peng
Dear list, My SWIG generated module (myModule) needs an array-like object (carray) to work. Carray objects are created both internally (in C++ level) and through Python so I have to load it when myModule initializes. carray is modified from arraymodule.c and is quite simple: static PyMethodDef a

Re: how to separate hexadecimal

2005-02-01 Thread Paul Rubin
jrlen balane <[EMAIL PROTECTED]> writes: > ex. hexa = '0x87BE" # what i want to do is: > a = 0x87, b = 0xBE# so that i could do this: > c = a + b#which should be equal to 0x145 Assuming you really want hexa to begin with the characters '0x', the string slicing way is:

Re: how to separate hexadecimal

2005-02-01 Thread Nick Coghlan
jrlen balane wrote: i have a 4 digit hex number (2 bytes) and i want to separate it into 2 digit hex (1 byte each) meaning i want to get the upper byte and the lower byte since i am going to add this two. how am i going to do this? should i treat it just like a normal string? please help, thanks. e

Re: type of simple object

2005-02-01 Thread Pierre Barbier de Reuille
[EMAIL PROTECTED] a écrit : Thank you guys. My function should multiply every element of a list, for example "something" and "something" can be an integer or another list. If it deals with integer than it is ok, but If it deals with list than it become false for example list*2 = listlist, and what

how to separate hexadecimal

2005-02-01 Thread jrlen balane
i have a 4 digit hex number (2 bytes) and i want to separate it into 2 digit hex (1 byte each) meaning i want to get the upper byte and the lower byte since i am going to add this two. how am i going to do this? should i treat it just like a normal string? please help, thanks. ex. hexa = '0x87BE"

Re: How do you do arrays

2005-02-01 Thread Erik Max Francis
Dennis Lee Bieber wrote: Classic BASIC actually splits the difference. dim a(10) allocates 11 elements, indexed 0..10 -- but most classes tend to ignore element 0, and algorithms are as if only 10 elements exist starting at 1. Basic also has the OPTION BASE instruction, which affects that.

Re: a quick question about namespaces

2005-02-01 Thread Steven Bethard
Jay donnell wrote: in the code below 'print locals()' shows mc2. What is the equivalent way to see the namespace that mc resides in? class myClass: --def func1(self): self.mc = 1 mc2 = 3 print 'in myClass.func1' print 'printing locals' print locals() print I think you're loo

Re: variable declaration

2005-02-01 Thread Eric Pederson
"Thomas Bartkus" wrote > As has been pointed out, it's not a big deal for a programmer who's > been > there, done that. But the original posters example is a beginners trap > for > certain. > > *If* Python were a "beginners language", then it would be missing one > of > it's training wheels.

Re: Where are list methods documented?

2005-02-01 Thread Bryan
Skip Montanaro wrote: Grant> where are the methods of basic types documented? The other day I suggested the most valuable doc page to bookmark is the global module index. Here's a demonstration. Start at: http://www.python.org/dev/doc/devel/modindex.html Click "__builtin__", which take

Re: Newbie Question

2005-02-01 Thread Robey Holderith
On Tue, 01 Feb 2005 17:47:39 -0800, Joel Eusebio wrote: > > Hi Everybody, > > I'm pretty new to Python and would like to ask a few questions. I have this > setup on a Fedora Core 3 box. > > Python 2.3.4 > wxPython-common-gtk-ansi-2.5.3.1-fc2_py2.3 > mod_python-3.1.3-5 > Apache/2.0.52 > > I hav

Re: Python Code Auditing Tool

2005-02-01 Thread Robey Holderith
On Tue, 01 Feb 2005 21:52:28 -0800, Paul Rubin wrote: > Robey Holderith <[EMAIL PROTECTED]> writes: >> Does anybody know of a tool that can tell me all possible exceptions that >> might occur in each line of code? What I'm hoping to find is something >> like the following: > > That is impossible

How run valgrind on Python C extensions?

2005-02-01 Thread [EMAIL PROTECTED]
I have Python C extensions that are giving me seg faults that I'd like to run valgrind on. Can I use valgrind on these through python?? HOW??? Is it easy or must I do some work like recompiling python source with the -g extension? Thanks! Chris -- http://mail.python.org/mailman/listinfo/pyth

a quick question about namespaces

2005-02-01 Thread Jay donnell
in the code below 'print locals()' shows mc2. What is the equivalent way to see the namespace that mc resides in? class myClass: --def func1(self): self.mc = 1 mc2 = 3 print 'in myClass.func1' print 'printing locals' print locals() print Google mungs up the spacing so I p

Re: curl and popen2

2005-02-01 Thread Robey Holderith
On Tue, 01 Feb 2005 17:48:53 -0800, lists04 wrote: > Hi, > > I have a problem with a curl request and running it under popen2. > > If I run this request from the command line: > curl -i http://www.yahoo.com/test --stderr errfile > (also tried redirecting stdderr to a file 2>, nothing) the file e

Re: Python Code Auditing Tool

2005-02-01 Thread Paul Rubin
Robey Holderith <[EMAIL PROTECTED]> writes: > Does anybody know of a tool that can tell me all possible exceptions that > might occur in each line of code? What I'm hoping to find is something > like the following: That is impossible. The parameter to the raise statement is a class object, which

Python Code Auditing Tool

2005-02-01 Thread Robey Holderith
Does anybody know of a tool that can tell me all possible exceptions that might occur in each line of code? What I'm hoping to find is something like the following: given all necessary python source and a given line ( my.py:40 ) it would generate a list of possible exception classes sorted by fun

Tkinter on dual screen

2005-02-01 Thread nik
hello, i am writing an app which is running on a dual screen setup on windows and OS X. is anyone doing this using Tkinter? are there problems with it? i know Tk() takes a "screenname" argument which specifies the screen. but i am not sure about how well Tkinter copes with having two Tk objects a

how to use python scripts in zope3

2005-02-01 Thread vijay
hi Recently i started learning zope3 framework. Unlike in zope2.7 , there is no Script(Python) component in the addlist of zope3. Also by inserting scripts in zpt it gives me error. Somebody help me in using python script in zope3. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: hotspot profiler experience and accuracy?

2005-02-01 Thread Jeremy Bowers
On Tue, 01 Feb 2005 19:24:20 -0800, aurora wrote: > I have a parser I need to optimize. It has some disk IO and a lot of > looping over characters. > > I used the hotspot profiler to gain insight on optimization options. The > methods show up on on the top of this list seems fairly trivial and do

Re: Next step after pychecker

2005-02-01 Thread Steven Bethard
Terry Reedy wrote: > Nothing about bytecode is part of the language spec. And CPython > bytecode is version specific. If the CPython implementation changed > from a virtual stack machine to a virtual register machine, as was > once discussed, the stack-oriented byte code would be replaced by a >

Re: getting data from a port in use

2005-02-01 Thread Grant Edwards
On 2005-02-02, Dana Marcusanu <[EMAIL PROTECTED]> wrote: > Yes. I want to write a very small web sniffer that gets data > from a specified port. OK, know we know what you're actually trying to do. You should have told us that to start with rather than leading us down the wrong path with your lit

Re: web camera or else ? 15-30 fps processing of camera videos.

2005-02-01 Thread M.E.Farmer
JGCASEY wrote: > The Artist Formerly Known as Kap'n Salty wrote: > > Newbie wrote: > > > I am doing some robotics projects but my main area of interest is > > > trying out several algorithms for the processing of the stream of > data > > > coming from the video. > > > > > > I am wondering what type

Re: getting data from a port in use

2005-02-01 Thread Grant Edwards
On 2005-02-02, Dana Marcusanu <[EMAIL PROTECTED]> wrote: > Yes. It hangs at accept. I always end up doing end task > because it never passes the "accept" statement. And you're sure that somebody tries to initiate a connection after your program has gotten to the accept() line? > When I set the

Re: Where are list methods documented?

2005-02-01 Thread Hans Nowak
Nick Craig-Wood wrote: Since I'm a unix person, I would have typed pydoc -k sort But it doesn't come up with anything useful :-( FYI, you can get this info using the not-very-intuitive pydoc __builtin__.list.sort e.g. (C:\Python23\Lib) $ pydoc __builtin__.list.sort Help on method_descriptor in

RE: getting data from a port in use

2005-02-01 Thread Tony Meyer
>>> I am trying to use Python to get the data received at a >>> specific port (in use) on my computer. I already tried below >>> code which seems to hang at the statement accepting >>> connections. > > Yes. It hangs at accept. I always end up doing end task > because it never passes the "accept"

getting data from a port in use

2005-02-01 Thread Dana Marcusanu
Yes. I want to write a very small web sniffer that gets data from a specified port. I already looked at some of the existing ones on Internet, but they are not in Python (I am trying to learn Python!) and they have a lot more features that I want. Thanks for your suggestion. I will check out pcap l

Re: Suggesion for an undergrad final year project in Python

2005-02-01 Thread Terry Reedy
"Sridhar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I am doing my undergrade CS course. I am in the final year, and would > like to do my project involving Python. Our instructors require the > project to have novel ideas. Can the c.l.p people shed light on this > t

hotspot profiler experience and accuracy?

2005-02-01 Thread aurora
I have a parser I need to optimize. It has some disk IO and a lot of looping over characters. I used the hotspot profiler to gain insight on optimization options. The methods show up on on the top of this list seems fairly trivial and does not look like CPU hogger. Nevertheless I optimized i

RE: getting data from a port in use

2005-02-01 Thread Dana Marcusanu
Yes. It hangs at accept. I always end up doing end task because it never passes the "accept" statement. When I set the port I use netstat (netstat -bn) to get the ports that are in use. I use PythonWin 2.4. I am still puzzled about the fact that it runs fine for you. You are right about using the w

RE: getting data from a port in use

2005-02-01 Thread Dana Marcusanu
--- Tony Meyer <[EMAIL PROTECTED]> wrote: > > I am trying to use Python to get the data received at a > > specific port (in use) on my computer. I already tried below > > code which seems to hang at the statement accepting > > connections. > > Seems to hang, or does hang? Using print statemen

Re: Next step after pychecker

2005-02-01 Thread Terry Reedy
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I don't know much about what pychecker does, but if it works with the > bytecode, shouldn't it be fine for jython and IronPython? I thought the > bytecode was part of the language spec, and what was CPython specific

Re: Next step after pychecker

2005-02-01 Thread Skip Montanaro
Francis> "Every well-formed expression of the language can be assigned a Francis> type that can be deduced from the constituents of the Francis> expression alone." Bird and Wadler, Introduction to Functional Francis> Programming, 1988 Francis> This is certainly not the case fo

Re: [perl-python] string pattern matching

2005-02-01 Thread Erik Max Francis
Daniel Fackrell wrote: It seems to me that application of one of these solutions reduces the effectiveness of the other. If enough persons killfile the threads, who warns the newbies? And so those who don't killfile the threads to ensure that somebody is still guarding against misleading informat

Re: Where are list methods documented?

2005-02-01 Thread Skip Montanaro
Grant> where are the methods of basic types documented? The other day I suggested the most valuable doc page to bookmark is the global module index. Here's a demonstration. Start at: http://www.python.org/dev/doc/devel/modindex.html Click "__builtin__", which takes you to http:

Re: a sequence question

2005-02-01 Thread Nick Coghlan
Steven Bethard wrote: I think you can write that second one so that it works for iterables without a __len__: py> def padded_partition(iterable, part_len, pad_val=None): ... itr = itertools.chain( ... iter(iterable), itertools.repeat(pad_val, part_len - 1)) ... return itertools.iz

Re: test_socket.py failure

2005-02-01 Thread Nick Coghlan
[EMAIL PROTECTED] wrote: At the interactive python prompt i did/got the following: bash-2.04$ ./python Python 2.4 (#1, Jan 29 2005, 10:31:35) [GCC 2.95.3 20010315 (release)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> sock

Python checkin driver version on windows

2005-02-01 Thread Chris Jameyson
Is there a way to check driver version information on windows through Python? I'd like to pull driver version, digital sig from the same place that 'device manager' gets it's information. I tried using file system object, but seems like GetFileVersion() from version.dll only extracts versions

Re: [perl-python] string pattern matching

2005-02-01 Thread Daniel Fackrell
- Henry Wadsworth Longfellow "Erik Max Francis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Dan Perl wrote: > > > Perhaps someone will write a program to automatically follow up on every > > [perl-python] posting? The follow-up could just contain a statement like > > the one Dani

Re: [perl-python] string pattern matching

2005-02-01 Thread Stephen Thorne
On Tue, 01 Feb 2005 21:19:34 -0500, Chris Smith <[EMAIL PROTECTED]> wrote: > Falls into the 'cure worse than the disease' category. > It's really just a prompt to explore the corners of Gnus, and > determine how to give X.L. the thorough ignoring he deserves. *headdesk* I'm using gmail, and I can

Re: [perl-python] string pattern matching

2005-02-01 Thread Chris Smith
> Stephen Thorne <[EMAIL PROTECTED]> writes: > On Tue, 1 Feb 2005 18:59:18 -0500, Dan Perl <[EMAIL PROTECTED]> wrote: >> Perhaps someone will write a program to automatically follow up >> on every [perl-python] posting? The follow-up could just >> contain a statement like the

Re: Where are list methods documented?

2005-02-01 Thread Nick Coghlan
Tim Peters wrote: 2. Built-In Objects 2.1 Built-in Functions 2.2 Non-essential Built-in Functions 2.3 Built-in Types 2.3.1 Truth Value Testing 2.3.2 Boolean Operations 2.3.3 Comparisons 2.3.4 Numeric Types 2.3.5 Iterator Types 2.3

Re: how do i create such a thing?

2005-02-01 Thread Steve Holden
Lowell Kirsh wrote: I'm not sure I get it. What's the purpose of using a delegate rather than having the object itself supply the return value? Alex Martelli wrote: Lowell Kirsh <[EMAIL PROTECTED]> wrote: What might these exceptions be? It's HIGHLY advisable to have your __getattr__ methods rai

curl and popen2

2005-02-01 Thread lists04
Hi, I have a problem with a curl request and running it under popen2. If I run this request from the command line: curl -i http://www.yahoo.com/test --stderr errfile (also tried redirecting stdderr to a file 2>, nothing) the file errfile is empty indicating no error with the request. However, wh

Re: Newbie Question

2005-02-01 Thread Jeremy Bowers
On Tue, 01 Feb 2005 17:47:39 -0800, Joel Eusebio wrote: > Whenever I access test.py from my browser it says "The page cannot be > found" , I have the file on /var/www/html, what did I miss? > > Thanks in advance, > Joel In general, you will need to post the relevant entries from your Apache erro

Re: variable declaration

2005-02-01 Thread Steve Holden
Thomas Bartkus wrote: "Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Thomas Bartkus wrote: "Carl Banks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] How common is it for a local variable to be bound in more than one place within a function? How common?

Newbie Question

2005-02-01 Thread Joel Eusebio
Hi Everybody, I'm pretty new to Python and would like to ask a few questions. I have this setup on a Fedora Core 3 box. Python 2.3.4 wxPython-common-gtk-ansi-2.5.3.1-fc2_py2.3 mod_python-3.1.3-5 Apache/2.0.52 I have a test.py which looks like this: from mod_python import apache def handler(req)

Re: how do i create such a thing?

2005-02-01 Thread Lowell Kirsh
I'm not sure I get it. What's the purpose of using a delegate rather than having the object itself supply the return value? Alex Martelli wrote: Lowell Kirsh <[EMAIL PROTECTED]> wrote: What might these exceptions be? It's HIGHLY advisable to have your __getattr__ methods raise AttributeError fo

Re: The next Xah-lee post contest

2005-02-01 Thread alex23
Luis M. Gonzalez wrote: > I kind of like this guy... it's like he has a few bugs in his brain, > but other parts are surprisingly interesting. Which bits especially impress you, the rampant misogyny or the unwarranted intellectual arrogance? -- http://mail.python.org/mailman/listinfo/python-lis

Re: Atlas and NumPy Problems

2005-02-01 Thread Robert Kern
Justin Lemkul wrote: Hello all, I am hoping someone out there will be able to help me. I am trying to install a program that utilizes NumPy. In installing NumPy, I realized that I was lacking Atlas. I ran into the following problems installing Atlas and NumPy, as I realized that NumPy could b

Re: MySQLdb - Tuples

2005-02-01 Thread Lajos Kuljo
Dennis Benzinger wrote: Lajos Kuljo wrote: Hallo, ich bin voll neu im Python-Programming, deshalb ist mein Problem wahrscheinlich trivial: Wenn ich die Script #33 #! /usr/bin/env python import MySQLdb db=MySQLdb.connect(host='localhost', db='photum_0_6_2',

Re: permutations, patterns, and probability

2005-02-01 Thread Steven Bethard
kpp9c wrote: Greetings, I am working on a program to produce patterns. What would like is for it to exhaustively produce all possible permutations of a sequence of items but for each permutation produce variations, and also a sort of stutter based on probability / weighted randomess. Let us say we

Re: How do you do arrays

2005-02-01 Thread Thomas Bunce
Thanks Tom In article <[EMAIL PROTECTED]>, "Dan Perl" <[EMAIL PROTECTED]> wrote: > A solution that I haven't seen mentioned by other postings in the thread is > to implement the array as a dictionary: > > iMatrix = {} > for index in range(majorlop1): > k = random.choice(listvalues) + 1 >

Re: Awkwardness of C API for making tuples

2005-02-01 Thread John Machin
Dave Opstad wrote: > In article <[EMAIL PROTECTED]>, > "John Machin" <[EMAIL PROTECTED]> wrote: > > > What is the purpose of this first loop? > > Error handling. If I can't successfully create all the PyInts then I can > dispose the ones I've made and not bother making the tuple at all. > > > > I

Re: web camera or else ? 15-30 fps processing of camera videos.

2005-02-01 Thread JGCASEY
The Artist Formerly Known as Kap'n Salty wrote: > Newbie wrote: > > I am doing some robotics projects but my main area of interest is > > trying out several algorithms for the processing of the stream of data > > coming from the video. > > > > I am wondering what type of camera I should invest in.

Save the Canvas!

2005-02-01 Thread Sean McIlroy
I'd like to be able to save a Tkinter Canvas in a format other than postscript (preferably gif). Is there a tool out there for accomplishing that? Any help will be much appreciated. Peace, STM -- http://mail.python.org/mailman/listinfo/python-list

Re: [perl-python] string pattern matching

2005-02-01 Thread Erik Max Francis
Dan Perl wrote: Perhaps someone will write a program to automatically follow up on every [perl-python] posting? The follow-up could just contain a statement like the one Daniel mentions. Obviously the program would be written in python. ;-) I'm not really sure that such a disclaimer is explici

Re: [perl-python] string pattern matching

2005-02-01 Thread Stephen Thorne
On Tue, 1 Feb 2005 18:59:18 -0500, Dan Perl <[EMAIL PROTECTED]> wrote: > Perhaps someone will write a program to automatically follow up on every > [perl-python] posting? The follow-up could just contain a statement like > the one Daniel mentions. Obviously the program would be written in python.

Re: [perl-python] string pattern matching

2005-02-01 Thread Dan Perl
Perhaps someone will write a program to automatically follow up on every [perl-python] posting? The follow-up could just contain a statement like the one Daniel mentions. Obviously the program would be written in python. ;-) Any suggestions on how to implement such a program? How would it de

permutations, patterns, and probability

2005-02-01 Thread kpp9c
Greetings, I am working on a program to produce patterns. What would like is for it to exhaustively produce all possible permutations of a sequence of items but for each permutation produce variations, and also a sort of stutter based on probability / weighted randomess. Let us say we have tiles

Re: Awkwardness of C API for making tuples

2005-02-01 Thread Dave Opstad
In article <[EMAIL PROTECTED]>, "John Machin" <[EMAIL PROTECTED]> wrote: > What is the purpose of this first loop? Error handling. If I can't successfully create all the PyInts then I can dispose the ones I've made and not bother making the tuple at all. > > In what variable-length storage are

Re: how about writing some gui to a known console application

2005-02-01 Thread alexrait1
I tried to delete this message, but I guess it was too late... or it didn't work for me... sorry anyway. -- http://mail.python.org/mailman/listinfo/python-list

Re: Next step after pychecker

2005-02-01 Thread Philippe Fremy
I do not want to discourage Philippe Fremy but I think that this would be very very difficult to do without modifying Python itself. That's the conclusion I reached to too after lurking on the ocaml list. What FP languages rely upon to achieve type inference is a feature named "strong typing".

Re: [perl-python] string pattern matching

2005-02-01 Thread Daniel Fackrell
Perhaps a message to the effect of "These messages are specifically disowned by the groups to which they are posted, have historically been riddled with blatant errors, and are assumed to continue in the same quality." should be posted as a follow-up to each of these messages by XL in order to avoi

Re: web camera or else ? 15-30 fps processing of camera videos.

2005-02-01 Thread Matt D
Newbie wrote: I am doing some robotics projects but my main area of interest is trying out several algorithms for the processing of the stream of data coming from the video. Same for me! From what I can tell, a cheap webcam will "just work" with a recent version of windows - i.e. plug it in usin

Re: how about writing some gui to a known console application

2005-02-01 Thread Jeremy Bowers
On Tue, 01 Feb 2005 21:57:45 +, Grant Edwards wrote: > On 2005-02-01, alexrait1 <[EMAIL PROTECTED]> wrote: > >> Do something useful... (at least for me) For instance I need a gtk >> frontend for pgp. So here you can have an opportunity to learn both >> pyGTK and pgp. A lot of python code... :

Re: MySQLdb - Tuples

2005-02-01 Thread Dennis Benzinger
Lajos Kuljo wrote: > Hallo, > ich bin voll neu im Python-Programming, deshalb ist mein Problem > wahrscheinlich trivial: > > Wenn ich die Script > #33 > #! /usr/bin/env python > import MySQLdb > db=MySQLdb.connect(host='localhost', db='photum_0_6_2', user='

ftplib help - delete from server after download results in 0-byte file

2005-02-01 Thread Peter A.Schott
Got a strange scenario going on here in that I could have sworn this worked yesterday. I am issuing binary retrieval calls to an FTP server, writing to a file, close the file, then removing the file from the remote site. When I do this, I end up with 0 byte files. I was hoping to avoid parsing a

Re: web camera or else ? 15-30 fps processing of camera videos.

2005-02-01 Thread The Artist Formerly Known as Kap'n Salty
Newbie wrote: I am doing some robotics projects but my main area of interest is trying out several algorithms for the processing of the stream of data coming from the video. I am wondering what type of camera I should invest in. Either I could buy a web cam and hope I can find a driver I could eith

Atlas and NumPy Problems

2005-02-01 Thread Justin Lemkul
Hello all, I am hoping someone out there will be able to help me. I am trying to install a program that utilizes NumPy. In installing NumPy, I realized that I was lacking Atlas. I ran into the following problems installing Atlas and NumPy, as I realized that NumPy could be installed using th

MySQLdb - Tuples

2005-02-01 Thread Lajos Kuljo
Hallo, ich bin voll neu im Python-Programming, deshalb ist mein Problem wahrscheinlich trivial: Wenn ich die Script #33 #! /usr/bin/env python import MySQLdb db=MySQLdb.connect(host='localhost', db='photum_0_6_2', user='root', passwd='thkhgfgd') c=db.curso

Re: How do you do arrays

2005-02-01 Thread Dan Perl
A solution that I haven't seen mentioned by other postings in the thread is to implement the array as a dictionary: iMatrix = {} for index in range(majorlop1): k = random.choice(listvalues) + 1 iMatrix[index] = k Mind you, a dictionary does not behave *exactly* like an array. For insta

Re: How do you do arrays

2005-02-01 Thread Thomas Bunce
It was when I saw a use of complex numbers as a usable statement I became interested in Python Tom In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > If you want do numerical calculations with vectors and matrices, you > should probably use the Numarray module. Python's built-i

Re: Next step after pychecker

2005-02-01 Thread John Roth
"Sylvain Thenault" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Tue, 01 Feb 2005 05:18:12 +0100, Philippe Fremy wrote: Did you take a look at the starkiller [1] and pypy projects [2] ? Has anything happened to Starkiller since PyCon 2004? The latest mention I can find on Google i

Re: Redirecting stdout/err under win32 platform

2005-02-01 Thread David Douard
Alan, I did search Google for this problem (not enough, thou). In fact, I found some kind of solution (by myself, not that much on Google), but it is not really satisfactory. I have used win32 pipes to do so (win32api.CreatePipe). I can redirect stdout/stderr to it from my python code (even redir

Re: How do you do arrays

2005-02-01 Thread Thomas Bunce
Learning Python O'Reilly book and Python In A Nut Shell and about 2 inchs printed of Web information Tom In article <[EMAIL PROTECTED]>, "Kartic" <[EMAIL PROTECTED]> wrote: > Tom, > > It has to be iMatrix.append(k), not iMatrix[index] = k. Python will > give an error - list assignment in

RE: Next step after pychecker

2005-02-01 Thread Delaney, Timothy C (Timothy)
huy wrote: > do not yet have good coverage. TDD is a quite hard to practice as a > beginner. It's even harder to bolt onto an existing codebase :( Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

Re: Crude statistics on the standard library

2005-02-01 Thread IncessantRanting
F. Petitjean wrote: [snip] > Conclusion : > sre_compile and sre_parse should be coded with a __all__ attribute Problem with this is that it would change the API for the two modules. And the main reason for the dependencies is that sre_constants is import-star'ed; same with sre_constants. But ye

Re: Using HTTPSConnection and verifying server's CRT

2005-02-01 Thread Ng Pheng Siong
According to Marc Poulhiès <[EMAIL PROTECTED]>: > Btw, thanks for your answer (this will save me from using Perl!) You're welcome. > ## what are the diff between these two?? > #ctx.load_verify_info(cafile="/tmp/ca.crt") > ctx.load_verify_locations(cafile="/tmp/ca.crt") None. One is an alias for

web camera or else ? 15-30 fps processing of camera videos.

2005-02-01 Thread Newbie
I am doing some robotics projects but my main area of interest is trying out several algorithms for the processing of the stream of data coming from the video. I am wondering what type of camera I should invest in. Either I could buy a web cam and hope I can find a driver I could either modify or

Re: how about writing some gui to a known console application

2005-02-01 Thread Grant Edwards
On 2005-02-01, alexrait1 <[EMAIL PROTECTED]> wrote: > Do something useful... (at least for me) > For instance I need a gtk frontend for pgp. > So here you can have an opportunity to learn both pyGTK and pgp. A lot > of python code... :) Um, to whom are you addressing your commands? -- Grant Edw

Re: Suggesion for an undergrad final year project in Python

2005-02-01 Thread alexrait1
How about writing some gtk fronted to pgp.. That might be both useful (at least for me) and teach you about pgp and pyGTK, that is writing gui with python. -- http://mail.python.org/mailman/listinfo/python-list

how about writing some gui to a known console application

2005-02-01 Thread alexrait1
Do something useful... (at least for me) For instance I need a gtk frontend for pgp. So here you can have an opportunity to learn both pyGTK and pgp. A lot of python code... :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggesion for an undergrad final year project in Python

2005-02-01 Thread phil_nospam_schmidt
How about a tool that can compute the intersection/union/disjunction of boolean expressions, and return the result as a boolean expression? This is something I've had on my plate for awhile, but haven't been able to get around to doing. As a simple example, assume we have the following expressions

Re: Where are list methods documented?

2005-02-01 Thread Timothy Fitz
[Tim Peters] > The methods on mutable sequence types are documented in the Library > manual's section on mutable sequence types: > >http://docs.python.org/lib/typesseq-mutable.html > And like -many- python programmers, when he thinks "List" he doesn't immediately think "Mutable Sequence Type.

Re: pythonic equivalent of Mathematica's FixedPoint function

2005-02-01 Thread Russell Blau
"jelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > doh... > > https://sourceforge.net/projects/fixedpoint > > pardon me > I don't think that Tim's FixedPoint class is doing the same thing as Mathematica's FixedPoint function (or even anything remotely similar). Well, except for

Re: Suggesion for an undergrad final year project in Python

2005-02-01 Thread Lucas Raab
Paul Robson wrote: On Tue, 01 Feb 2005 12:11:47 +, Kartic wrote: Sridhar said the following on 2/1/2005 2:11 AM: Hi, I am doing my undergrade CS course. I am in the final year, and would like to do my project involving Python. Our instructors require the project to have novel ideas. Can the

Re: Printing Filenames with non-Ascii-Characters

2005-02-01 Thread vincent wehren
Marian Aldenhövel wrote: Hi, I am very new to Python and have run into the following problem. If I do something like dir = os.listdir(somepath) for d in dir: print d The program fails for filenames that contain non-ascii characters. 'ascii' codec can't encode characters in

Re: How do you do arrays

2005-02-01 Thread Kartic
Tom - I answered your question even before you posted it! You have to use iMatrix.append(k) and NOT iMatrix[index] = k. Also, what do you expect out of: while index < majorlop1: print '- %s %s' % ( iMatrix[index], sep) This loop will never get executed because your previous loop finishes due to

Re: variable declaration

2005-02-01 Thread Thomas Bartkus
"Michael Tobis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Since I'm very much a believer in Python as a beginner's language, that > doesn't satisfy me. "Declarations are impractical" would satisfy me, > but so far I'm not completely convinced of that. > As has been pointed out

Re: variable declaration

2005-02-01 Thread Christian Dieterich
On Dé Máirt, Feabh 1, 2005, at 12:19 America/Chicago, Alex Martelli wrote: Michael Tobis <[EMAIL PROTECTED]> wrote: ... I don't know that it's ever necessary to rebind, but it is, in fact, common, and perhaps too easy. In numeric Python, avoiding rebinding turns out to be a nontrivial skill. W

Re: How do you do arrays

2005-02-01 Thread beliavsky
wes weston wrote: > Thomas, > If you were allowed to do what you're doing, the > list first element would be getting skipped as "index" > is always > 0. The thing is, you don't want the "index" > var at all for adding to the list; just do jMatrix.append(k). > You can iterate over the list w

Re: a sequence question

2005-02-01 Thread todddeluca
Chris Wright wrote: > Hi, > > 1) I want to iterate over a list "N at a time" > sort of like: > > # Two at a time... won't work, obviously > > >>> for a, b in [1,2,3,4]: > ... print a,b > ... > Traceback (most recent call last): >File "", line 1, in ? > TypeError: unpack non-sequence > >>>

[perl-python] string pattern matching

2005-02-01 Thread Xah Lee
# -*- coding: utf-8 -*- # Python # Matching string patterns # # Sometimes you want to know if a string is of # particular pattern. Let's say in your website # you have converted all images files from gif # format to png format. Now you need to change the # html code to use the .png files. So, ess

Re: Next step after pychecker [StarKiller?]

2005-02-01 Thread Francis Girard
Hi, Do you have some more pointers to the StarKiller project ? According to the paper some implementation of this very interesting project exists. Thank you Francis Girard Le mardi 1 Février 2005 11:21, Sylvain Thenault a écrit : > On Tue, 01 Feb 2005 05:18:12 +0100, Philippe Fremy wrote: > >

Re: variable declaration

2005-02-01 Thread Michael Tobis
> All in all, I fail to see what gains would be expected by making Python > into a single-assignment or single-binding language, even on a module by > module basis, to repay this kind of awkwardness. Just to be clear, if anyone was suggesting that, it wasn't me. It would be helpful on occasion in

Re: How do you do arrays

2005-02-01 Thread wes weston
Thomas, If you were allowed to do what you're doing, the list first element would be getting skipped as "index" is always > 0. The thing is, you don't want the "index" var at all for adding to the list; just do jMatrix.append(k). You can iterate over the list with for x in jMatrix: print x

Re: Suggesion for an undergrad final year project in Python

2005-02-01 Thread Jorgen Grahn
On 31 Jan 2005 23:11:58 -0800, Sridhar <[EMAIL PROTECTED]> wrote: > Hi, > > I am doing my undergrade CS course. I am in the final year, and would > like to do my project involving Python. Our instructors require the > project to have novel ideas. Can the c.l.p people shed light on this > topic?

Re: Where are list methods documented?

2005-02-01 Thread Nick Craig-Wood
Tim Peters <[EMAIL PROTECTED]> wrote: > You could have gotten to the same place in several ways. [snip] Since I'm a unix person, I would have typed pydoc -k sort But it doesn't come up with anything useful :-( $ pydoc -k sort MySQLdb.stringtimes - Use strings to handle date and time colu

Re: msvcp71.dll and Python 2.4 C++ extensions

2005-02-01 Thread Matthias Baas
On Tue, 01 Feb 2005 00:14:30 +0100, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: >> are there any guidelines about what to do if a Windows extension for >> Python 2.4 requires the C++ runtime (msvcp71.dll)? > >No; it should "just work fine". [...] I fully agree with that. :) And that was actuall

Re: Awkwardness of C API for making tuples

2005-02-01 Thread John Machin
Dave Opstad wrote: > One of the functions in a C extension I'm writing needs to return a > tuple of integers, where the length of the tuple is only known at > runtime. I'm currently doing a loop calling PyInt_FromLong to make the > integers, What is the purpose of this first loop? In what variabl

  1   2   3   >