some question with Quixote and Nginx

2008-05-29 Thread smalfish
hi, i have some question with this,quixote publish width FastCGI.the two scripts like this(root.ptl and hello.ptl): class RootDirectory(Directory): _q_exports = ["", "hello"] def _q_index [html] (self): """ Hello,Blog hello """ hello = HelloDirectory(

Re: question

2008-05-29 Thread Marc 'BlackJack' Rintsch
On Thu, 29 May 2008 15:41:29 -0700, Gandalf wrote: > On May 30, 12:14 am, John Henderson <[EMAIL PROTECTED]> wrote: >> Gandalf wrote: >> > how do i write this code in order for python to understand it >> > and print me the x variable >> >> > x=1 >> > def (): >> > x++ >> > if x > 1: >>

Re: Python and Flaming Thunder

2008-05-29 Thread Marc 'BlackJack' Rintsch
On Thu, 29 May 2008 17:57:45 -0400, D'Arcy J.M. Cain wrote: > I guess I am still new to this group and don't understand its charter. > I wasn't aware that it was a Flaming Blunder group. Can someone please > point me to a newsgroup or mailing list dedicated to the Python > programming language?

Re: Code execution in imported modules

2008-05-29 Thread Casey McGinty
On Thu, May 29, 2008 at 2:43 PM, Eric Wertman <[EMAIL PROTECTED]> wrote: > So I'm working on some file parsing and building up a stack of regular > expressions that I need to use. I was thinking of dropping them in an > external module. I was wondering.. if I put them in a file called > regex.py

Re: Finding file details...

2008-05-29 Thread Kam-Hung Soh
Kalibr wrote: On May 30, 1:41 am, "Roger Upole" <[EMAIL PROTECTED]> wrote: You can use the shell COM objects to access media properties as shown by Explorer. import win32com.client sh=win32com.client.Dispatch('Shell.Application') folder= r'M:\Music\Bob Dylan\Highway 61 Revisited' ns=sh.NameSpa

Re: Finding file details...

2008-05-29 Thread Roger Upole
Kalibr wrote: > On May 30, 1:41 am, "Roger Upole" <[EMAIL PROTECTED]> wrote: >> >> You can use the shell COM objects to access media properties >> as shown by Explorer. >> >> import win32com.client >> sh=win32com.client.Dispatch('Shell.Application') >> >> folder= r'M:\Music\Bob Dylan\Highway 61 Rev

Re: New chairman

2008-05-29 Thread Benjamin
On May 27, 10:48 am, Sverker Nilsson <[EMAIL PROTECTED]> wrote: > Good luck to you to. Its just that it .. well it has never been easy > for me to introduce Python at work. This py3k, if I like it or not, is > not making it easier. > > Praktical, pragmatic, you know --- as I said, its not broken so

Re: Getting up and running with Python on a Mac

2008-05-29 Thread Steve Lianoglou
> I want to do a fair bit of scientific / > numerical computing, so it would seem that SAGE ot the Enthought > Python distribution would seem to be the most relevant  - I'd > appreciate your guidance on getting Python to run on a Mac with a > particular focus on these two distributions. As already

Re: undocumented functions in pkgutil

2008-05-29 Thread Benjamin
On May 29, 12:34 pm, Michele Simionato <[EMAIL PROTECTED]> wrote: > I see that the pkgutil module has many useful functions which are > however undocumented. > Does anybody know why it is so? In particolar, can I safely use > pkg.walk_packages > without risking a change of interface in the future?

Re: Code execution in imported modules

2008-05-29 Thread Hans Nowak
Eric Wertman wrote: So I'm working on some file parsing and building up a stack of regular expressions that I need to use. I was thinking of dropping them in an external module. I was wondering.. if I put them in a file called regex.py like so : import re re1 = ".. re2 = ".. and then do: rg

Re: Finding file details...

2008-05-29 Thread Kam-Hung Soh
Roger Upole wrote: Kalibr wrote: I've been trying to figure out how to find the details of files (specifically music for now) for a little sorting script I'm making, My aim is to get details on the artist, album, and genre for mp3 and wma files (possibly more in the future). My closest match was

sharding research with pyshards

2008-05-29 Thread Devin
If anyone is interested in sharding or horizontal partitioning, I've started an open source project on Google Code with the intent of building a general purpose sharding framework for python using MySQL. If you have an interest in this area of research, please come on over and get involved. http:/

Re: Finding file details...

2008-05-29 Thread Kalibr
On May 30, 1:41 am, "Roger Upole" <[EMAIL PROTECTED]> wrote: > > You can use the shell COM objects to access media properties > as shown by Explorer. > > import win32com.client > sh=win32com.client.Dispatch('Shell.Application') > > folder= r'M:\Music\Bob Dylan\Highway 61 Revisited' > ns=sh.NameSpac

Re: Help needed in choosing an algorithm for Cryptographic services.

2008-05-29 Thread Larry Bates
abhishek wrote: Hi group, recently my employer asked me too implement encryption/ decryption for secure data transfer over internet. Problem is that the client application is written using C# and the webserver where i need to store the information is developed using python. My situation of dilem

VERY SORRY FOR THAT CROSSPOST; Re: The Importance of Terminology's Quality

2008-05-29 Thread David Combs
(This one is also cross-posted, to apologize to one and all about my just-prior followup.) I stupidly didn't remember that whatever followup I made would also get crossposted until *after* I had kneejerked hit "s" (send) before I noticed the warning (Pnews?) on just how many groups it would be pos

Re: The Importance of Terminology's Quality

2008-05-29 Thread David Combs
In article <[EMAIL PROTECTED]>, Robert Maas, http://tinyurl.com/uh3t <[EMAIL PROTECTED]> wrote: >> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> >> the importance of naming of functions. > Lisp is *so* early a language (1960?), preceeded mainly only by Fortran (1957?)?, and for sure the far-and-a

Code execution in imported modules

2008-05-29 Thread Eric Wertman
So I'm working on some file parsing and building up a stack of regular expressions that I need to use. I was thinking of dropping them in an external module. I was wondering.. if I put them in a file called regex.py like so : import re re1 = ".. re2 = ".. and then do: rgx1 = re.compile(re1) r

As I promised couple of day a go

2008-05-29 Thread Gandalf
When we discuss a global window events. and i wanted to generate event when the user click on a key out of my application. I promised that if will found how to do it i'l show you. I found this article which explain very simply how to hook py width pyHook lib http://mindtrove.info/articles/monitor

Re: The Importance of Terminology's Quality

2008-05-29 Thread David Combs
In article <[EMAIL PROTECTED]>, Waylen Gumbal <[EMAIL PROTECTED]> wrote: >Sherman Pendley wrote: >> [EMAIL PROTECTED] writes: >> > >> > > PLEASE DO NOT | :.:\:\:/:/:.: >> > > FEED THE TROLLS | :=.' - - '.=: >> > >> > I don't think Xah is trolling here (contrary to his/her habit) >> > but posing an

Re: UNIX credential passing

2008-05-29 Thread Paul Rubin
Kris Kennaway <[EMAIL PROTECTED]> writes: > I want to make use of UNIX credential passing on a local domain socket > to verify the identity of a user connecting to a privileged > service. However it looks like the socket module doesn't implement > sendmsg/recvmsg wrappers, and I can't find another

Re: Tkinter = Rodney Dangerfield?

2008-05-29 Thread Paul Miller
On Sun, 17 Feb 2008 11:35:35 -0800, MartinRinehart wrote: > Tkinter gets no respect. But IDLE's a Tkinter-based app and every > example I've Googled up shows Tkinter as needing about half as much code > as wx to do the same job. I'm beginning to Tkinter up my language > application. Am I making a

Re: definition of a highlevel language?

2008-05-29 Thread Paul Miller
On Mon, 26 May 2008 15:49:33 -0400, Dan Upton wrote: > On Mon, May 26, 2008 at 3:22 PM, <[EMAIL PROTECTED]> wrote: > I don't know if it would necessarily look like the CPython VM, except > for the decode stage (this being said without any knowledge of the > CPython implementation, but with more

Re: So you think PythonCard is old? Here's new wine in an old bottle.

2008-05-29 Thread alex23
On May 30, 9:50 am, [EMAIL PROTECTED] wrote: > Have you shown this stuff to the google AppEngine folks! > Thats being touted as the thing that'll make web-2 easy > App-Engine has the persistence, and the integration, its missing the > others and without them it'll never be great. Google App Engine

Re: So you think PythonCard is old? Here's new wine in an old bottle.

2008-05-29 Thread paul
Have you shown this stuff to the google AppEngine folks! Thats being touted as the thing that'll make web-2 easy but you have to write code (Python) which will turn off 99% of possible users. What made Hypercard really great (and Supercard on DOS, and the new clones like Revolution) is that it w

Re: boost

2008-05-29 Thread deepest1
Thanks for help. I lost more then 10 hours on boost today, but it finally works, and I'm pleased with it. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: code of a function

2008-05-29 Thread alex23
On May 30, 8:54 am, Alan Isaac <[EMAIL PROTECTED]> wrote: > Anand Patil wrote: > > If you're using IPython, you can do svd?? . > > http://www.scipy.org/doc/numpy_api_docs/numpy.linalg.linalg.html > > hth, > Alan Isaac That wasn't a question :) In IPython, '?' is roughly equivalent to 'help()', whe

Re: Python and Flaming Thunder

2008-05-29 Thread alex23
On May 30, 8:02 am, "Dan Upton" <[EMAIL PROTECTED]> wrote: > Yeah, but if you look past the "FT is better than Python" propaganda, > there's some interesting discussion of language design. Which is more appropriate on a group focused on such a topic. -- http://mail.python.org/mailman/listinfo/pyt

Re: Python and Flaming Thunder

2008-05-29 Thread Dave Parker
Dan Upton wrote: > I just think if you're shooting for an easily understandable > language, overloading error handling requires more thought on the > programmer's part, not less, because they have to reason about all > outcomes Duncan Booth wrote: > Maybe FT should do something similar: >Write

Re: code of a function

2008-05-29 Thread Alan Isaac
Anand Patil wrote: If you're using IPython, you can do svd?? . http://www.scipy.org/doc/numpy_api_docs/numpy.linalg.linalg.html hth, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: question

2008-05-29 Thread Dan Upton
On Thu, May 29, 2008 at 6:41 PM, Gandalf <[EMAIL PROTECTED]> wrote: > On May 30, 12:14 am, John Henderson <[EMAIL PROTECTED]> wrote: >> Gandalf wrote: >> > how do i write this code in order for python to understand it >> > and print me the x variable >> >> > x=1 >> > def (): >> > x++ >> >

Re: adobe flex; return xml via turbogears/django

2008-05-29 Thread Diez B. Roggisch
Sells, Fred schrieb: Diez wrote: Why don't you create KID-template like this: ${root} and in the controller say @expose("thexmltemplate") def ... return dict(root=myElementTreeRoot) sounds good. Does that "py:strip" remove the and anything outside it. I'll be doing a flex style ajax

Re: question

2008-05-29 Thread Gandalf
On May 30, 12:14 am, John Henderson <[EMAIL PROTECTED]> wrote: > Gandalf wrote: > > how do i write this code in order for python to understand it > > and print me the x variable > > > x=1 > > def (): > > x++ > > if x > 1: > > print "wrong" > > else : > > print x > >

UNIX credential passing

2008-05-29 Thread Kris Kennaway
I want to make use of UNIX credential passing on a local domain socket to verify the identity of a user connecting to a privileged service. However it looks like the socket module doesn't implement sendmsg/recvmsg wrappers, and I can't find another module that does this either. Is there someth

mmap class has slow "in" operator

2008-05-29 Thread Kris Kennaway
If I do the following: def mmap_search(f, string): fh = file(f) mm = mmap.mmap(fh.fileno(), 0, mmap.MAP_SHARED, mmap.PROT_READ) return mm.find(string) def mmap_is_in(f, string): fh = file(f) mm = mmap.mmap(fh.fileno(), 0, mmap.MAP_SHARED, mmap.PROT_READ)

Re: question

2008-05-29 Thread John Henderson
Gandalf wrote: > how do i write this code in order for python to understand it > and print me the x variable > > x=1 > def (): > x++ > if x > 1: > print "wrong" > else : > print x > > () Example: x=1 def (x): x += 1 if x > 1: return "wron

Re: make a string a list

2008-05-29 Thread Alan Isaac
Nikhil wrote: or a string iterable ? How can I do that. I have lots of '\r\n' characters in the string which I think can be easier if it were made into a list and I can easily see if the required value (its a numeral) is present in it or not after some position or after some characters' positio

Re: Python and Flaming Thunder

2008-05-29 Thread Dan Upton
On Thu, May 29, 2008 at 5:57 PM, D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote: > I guess I am still new to this group and don't understand its charter. > I wasn't aware that it was a Flaming Blunder group. Can someone please > point me to a newsgroup or mailing list dedicated to the Python > program

Re: make a string a list

2008-05-29 Thread Ben Finney
Nikhil <[EMAIL PROTECTED]> writes: > or a string iterable ? How can I do that. I have lots of '\r\n' > characters in the string which I think can be easier if it were made > into a list and I can easily see if the required value (its a numeral) > is present in it or not after some position or afte

Re: Python and Flaming Thunder

2008-05-29 Thread D'Arcy J.M. Cain
I guess I am still new to this group and don't understand its charter. I wasn't aware that it was a Flaming Blunder group. Can someone please point me to a newsgroup or mailing list dedicated to the Python programming language? -- D'Arcy J.M. Cain <[EMAIL PROTECTED]> | Democracy is thre

Re: make a string a list

2008-05-29 Thread Matimus
On May 29, 2:30 pm, Nikhil <[EMAIL PROTECTED]> wrote: > or a string iterable ? How can I do that. I have lots of '\r\n' > characters in the string which I think can be easier if it were made > into a list and I can easily see if the required value (its a numeral) > is present in it or not after som

Re: make a string a list

2008-05-29 Thread jay graves
On May 29, 4:30 pm, Nikhil <[EMAIL PROTECTED]> wrote: > or a string iterable ? How can I do that. I have lots of '\r\n' > characters in the string which I think can be easier if it were made > into a list and I can easily see if the required value (its a numeral) > is present in it or not after som

Re: Python and Flaming Thunder

2008-05-29 Thread Luis Zarrabeitia
> On May 28, 11:46 pm, Dave Parker <[EMAIL PROTECTED]> > wrote: > > On May 28, 3:19 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > > > > > Kind of like how this year's program won't work on next year's > > > > Python? > > > > "Like Perl 6, Python 3.0 will break backward compatibility. There

make a string a list

2008-05-29 Thread Nikhil
or a string iterable ? How can I do that. I have lots of '\r\n' characters in the string which I think can be easier if it were made into a list and I can easily see if the required value (its a numeral) is present in it or not after some position or after some characters' position. Thanks, N

Re: Getting up and running with Python on a Mac

2008-05-29 Thread Kevin Walzer
[EMAIL PROTECTED] wrote: I've just bought an iMac (OS X 10.5.2, will almost immediately jump to 10.5.3), and am looking to install Python on it, and to use it with XCode, Apple's IDE. Some googling suggests that a number of people have had trouble getting Python to run satisfactorily on their Mac

question

2008-05-29 Thread Gandalf
how do i write this code in order for python to understand it and print me the x variable x=1 def (): x++ if x > 1: print "wrong" else : print x () -- http://mail.python.org/mailman/listinfo/python-list

Re: maximum recursion depth?

2008-05-29 Thread Jochen Schulz
* Marc 'BlackJack' Rintsch: > On Wed, 28 May 2008 02:28:54 -0700, bearophileHUGS wrote: >> Dennis Lee Bieber, the ghost: >> >>> I'd have to wonder why so many recursive calls? >> >> Why not? > > Because of the recursion limit of course. And function call overhead in > Python is quite high compar

Re: Compare 2 files and discard common lines

2008-05-29 Thread BJörn Lindqvist
Open('3rd', 'w').writelines(set(open('2nd').readlines())-set(open('1st'))) 2008/5/29, loial <[EMAIL PROTECTED]>: > I have a requirement to compare 2 text files and write to a 3rd file > only those lines that appear in the 2nd file but not in the 1st file. > > Rather than re-invent the wheel I am w

Getting up and running with Python on a Mac

2008-05-29 Thread tkpmep
I've just bought an iMac (OS X 10.5.2, will almost immediately jump to 10.5.3), and am looking to install Python on it, and to use it with XCode, Apple's IDE. Some googling suggests that a number of people have had trouble getting Python to run satisfactorily on their Macs. This is my first Mac, an

Re: so funny...

2008-05-29 Thread Hung Well (no comma)
"John" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > http://sitscape.com/topic/funny > > Just keep hit the "Surprise->" button there for amazing fun. > Click on "channel" will show you other topics, lots of fun! You tickle easy. --WH -- http://mail.python.org/mailman/listinf

Re: should I put old or new style classes in my book?

2008-05-29 Thread Alan Isaac
This thread raises two questions for me. 1. I take it from this thread that in Python 3 the following are equivalent: class Test: pass class Test(object): pass Is that correct, and if so, where is it stated explicitly? (I know about the "all classes are new style classe

Re: Compare 2 files and discard common lines

2008-05-29 Thread dwblas
On May 29, 1:36 am, loial <[EMAIL PROTECTED]> wrote: > only those lines that appear in the 2nd file but not in the 1st file. set(file_2_recs).difference(set(file_1_recs)) will give the recs in file_2 that are not in file_1 if you can store both files in memory. Sets are indexed and so are faster t

Re: Python and Flaming Thunder

2008-05-29 Thread méchoui
On May 28, 11:46 pm, Dave Parker <[EMAIL PROTECTED]> wrote: > On May 28, 3:19 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > > > Kind of like how this year's program won't work on next year's > > > Python? > > > For somebody who has admitted to have only very rudimentary knowledge of > > pyt

Help needed in choosing an algorithm for Cryptographic services.

2008-05-29 Thread abhishek
Hi group, recently my employer asked me too implement encryption/ decryption for secure data transfer over internet. Problem is that the client application is written using C# and the webserver where i need to store the information is developed using python. My situation of dilemma is which crypto

ANN: IPython 0.8.3 is out

2008-05-29 Thread Ville M. Vainio
Hi all, The IPython team is happy to release version 0.8.3, with lots of new enhancements as well as many bug fixes, and updated documentation that has been long in the coming. We hope you all enjoy it, and please report any problems as usual. WHAT is IPython? 1. An interactiv

Re: Remote Debugging for python.

2008-05-29 Thread Paul Rubin
nkarkhan <[EMAIL PROTECTED]> writes: > How do I do that with python? > I have multi-threaded python programs running on a remote machine. I > want to se where they are at any instance. www.winpdb.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Remote Debugging for python.

2008-05-29 Thread Mike Driscoll
On May 29, 2:09 pm, nkarkhan <[EMAIL PROTECTED]> wrote: > Newbie to python here..so bear with me. > > I used to be able to gdb to a target machine running c/c++ code and > see where my program was hanging, crashing, executing.. > > How do I do that with python? > I have multi-threaded python progra

Re: should I put old or new style classes in my book?

2008-05-29 Thread Arnaud Delobelle
Jason <[EMAIL PROTECTED]> writes: > On May 29, 10:07 am, [EMAIL PROTECTED] wrote: >> Hi All, >> >> I am working on a revised edition of How To Think Like a Computer >> Scientist, >> which is going to be called Think Python. It will be published by >> Cambridge >> University Press, but there will

Remote Debugging for python.

2008-05-29 Thread nkarkhan
Newbie to python here..so bear with me. I used to be able to gdb to a target machine running c/c++ code and see where my program was hanging, crashing, executing.. How do I do that with python? I have multi-threaded python programs running on a remote machine. I want to se where they are at any i

Re: accessing class attributes

2008-05-29 Thread eliben
On May 29, 3:08 am, Matimus <[EMAIL PROTECTED]> wrote: > > I have a game class, and the game has a state. Seeing that Python has > > no enumeration type, at first I used strings to represent states: > > "paused", "running", etc. But such a representation has many > > negatives, so I decided to look

Python threads and memory usage

2008-05-29 Thread Mike
Hi, I'm writing client-server application in Python. It's monitoring system, where server listen and waits for TCP connections, and every connection takes own thread. Every thread puts data from clients to Queue and exits. Then there is one DB loader thread, which loads all data from Queue to MySQ

so funny...

2008-05-29 Thread John
http://sitscape.com/topic/funny Just keep hit the "Surprise->" button there for amazing fun. Click on "channel" will show you other topics, lots of fun! -- http://mail.python.org/mailman/listinfo/python-list

NYC Python User Group Meeting Announcement....

2008-05-29 Thread John Clark
Greetings! The next New York City Python Users Group meeting is planned for June 17th, 6:30pm at Daylife Inc. at 444 Broadway (between Howard St. and Grand St.) on the 5th Floor. We welcome all those in the NYC area who are interested in Python to attend. More information can be found on the us

MACOSX_DEPLOYMENT_TARGET mismatch bug on Leopard using system Python

2008-05-29 Thread Anand Patil
Hi all, I'm getting error messages like distutils.errors.DistutilsPlatformError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure on Leopard using system Python when trying to build a third-party module. Can this be fixed without installing a different distributio

Saving tif file from tricky webserver

2008-05-29 Thread schweet1
Greetings, I am attempting to automate accessing and saving a file (a TIF) from the following URL: http://patimg1.uspto.gov/.DImg?Docid=US007376435&PageNum=1&IDKey=E21184B8FAD5 I have tried some methods using urllib, httplib, and web32com.client(InternetExplorer), but haven't been successful. Cu

Re: should I put old or new style classes in my book?

2008-05-29 Thread Jason
On May 29, 10:07 am, [EMAIL PROTECTED] wrote: > Hi All, > > I am working on a revised edition of How To Think Like a Computer > Scientist, > which is going to be called Think Python. It will be published by > Cambridge > University Press, but there will still be a free version under the GNU > FDL.

RE: adobe flex; return xml via turbogears/django

2008-05-29 Thread Sells, Fred
Diez wrote: > Why don't you create KID-template like this: > > ${root} > > and in the controller say > > @expose("thexmltemplate") > def ... >return dict(root=myElementTreeRoot) > sounds good. Does that "py:strip" remove the and anything outside it. I'll be doing a flex style ajax call

Re: should I put old or new style classes in my book?

2008-05-29 Thread Benjamin Kaplan
On Thu, May 29, 2008 at 12:07 PM, <[EMAIL PROTECTED]> wrote: > Hi All, > > I am working on a revised edition of How To Think Like a Computer > Scientist, > which is going to be called Think Python. It will be published by > Cambridge > University Press, but there will still be a free version unde

undocumented functions in pkgutil

2008-05-29 Thread Michele Simionato
I see that the pkgutil module has many useful functions which are however undocumented. Does anybody know why it is so? In particolar, can I safely use pkg.walk_packages without risking a change of interface in the future? I looks unlikely, since pkgutil is used in setuptools, but I want to be sure

Re: Custom log handler and logging.config.fileConfig()

2008-05-29 Thread Vinay Sajip
On 29 May, 15:53, "Lowell Alleman" <[EMAIL PROTECTED]> wrote: > Is there any reason not to do this assignment in the "myhandler.py" > directly? This would save a step for each application that needs to > use it. > > Starting from your example, it would now look like this: > > # -- myhandler.py ---

Re: Threads and import

2008-05-29 Thread Rhamphoryncus
On May 28, 1:14 pm, [EMAIL PROTECTED] wrote: > Hi, > > I'm trying to work out some strange (to me) behaviour that I see when > running a python script in two different ways (I've inherited some > code that needs to be maintained and integrated with another lump of > code). The sample script is: > >

yum installs Tkinter in a way visible to only one python installation

2008-05-29 Thread Rahul
My RHEL yum package-manager comes with Python-2.4.3. We also have a seperate Python-2.4.4 Installation on our box. When I added Tkinter using 'yum install tkinter' it seems to have added it in a manner that it is exclusively visible to Python-2.4.3. I cannot import Tkinter from Python-2.4.4.

Re: bit parsing from file

2008-05-29 Thread [EMAIL PROTECTED]
On máj. 29, 18:26, Mensanator <[EMAIL PROTECTED]> wrote: > On May 29, 9:42�am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > > > Hello, > > > I'm tring to make a cutting script. > > The problem is the following, i have a sample pattern, for > > example :'11101110' (0xEE) > > That is the

Re: bit parsing from file

2008-05-29 Thread Mensanator
On May 29, 9:42�am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I'm tring to make a cutting script. > The problem is the following, i have a sample pattern, for > example :'11101110' (0xEE) > That is the sign of the data begining. > How can i cut a file if the byte stepping is not t

Re: should I put old or new style classes in my book?

2008-05-29 Thread Matthieu Brucher
Hi, New style classes should be put as the default. This is what I did, based on the principle that new classes were introduces in Python 2.2 and that we are now at 2.5 and soon 2.6. Tutorials that use old style classes may be old and perhaps won't be updated ever. That's not a problem. Just tell

Re: ctypes, function pointers and a lot of trouble

2008-05-29 Thread Matt
Okay, thanks a lot for your reply Nick, I think you pushed me back on the right way. Now I started with trying to implement the callback functions and am stuck at the following point: I define my classes/structures/unions: --CODE---

should I put old or new style classes in my book?

2008-05-29 Thread allendowney
Hi All, I am working on a revised edition of How To Think Like a Computer Scientist, which is going to be called Think Python. It will be published by Cambridge University Press, but there will still be a free version under the GNU FDL. You can see the latest version at thinkpython.com; I am rev

[OT] Re: FW: php vs python

2008-05-29 Thread J. Cliff Dyer
On Thu, 2008-05-29 at 08:47 +1200, Phil Runciman wrote: > The Inuit have 13 terms for snow. Microsoft advocate DSLs. Why have > DSLs > if language does not matter? > For that matter, the English have several terms for snow as well. snow flurry blizzard powder pack flakes crystals sleet slush An

Re: boost

2008-05-29 Thread Ulrich Eckhardt
deepest1 wrote: > bjam --build-dir="D:\Program Files\boost_1_35_0" --toolset=gcc stage > > I got 12 failures and 8 warnings from this (other few hundrds were ok) Hmm, I remember trying to use Boost 1.35 with Python 2.5 on my Debian system and also having problems, are you sure that at least the P

Re: Tuple of coordinates

2008-05-29 Thread Gary Herron
[EMAIL PROTECTED] wrote: Hi, i am using a software which uses python as its scripting language. I want to generate a list of coordinates more or less this way: for i in (beg, end, step): for j in (beg, end, step): for k in (beg, end, step): . Coords = ((i1,j1,k1), (i2,j

Re: Finding file details...

2008-05-29 Thread Roger Upole
Kalibr wrote: > I've been trying to figure out how to find the details of files > (specifically music for now) for a little sorting script I'm making, > My aim is to get details on the artist, album, and genre for mp3 and > wma files (possibly more in the future). My closest match was when I > stu

Re: Python and Flaming Thunder

2008-05-29 Thread Duncan Booth
"Dan Upton" <[EMAIL PROTECTED]> wrote: > On Thu, May 29, 2008 at 3:36 AM, Duncan Booth ><[EMAIL PROTECTED]> wrote: >> Dave Parker <[EMAIL PROTECTED]> wrote: >> >>> Catch doesn't return just error types or numbers, it can return any >>> object returned by the statements that are being caught; catch

Re: code of a function

2008-05-29 Thread Anand Patil
On May 29, 2008, at 9:38 AM, Gary Herron wrote: Dark Wind wrote: Hi, Is there any command in Python which gives the code for a function like just typing the name of a function (say svd) in R returns its code. Thank you Nope. If you're using IPython, you can do svd?? . -- http://mail

mysqldb install problem

2008-05-29 Thread Tommy Grav
I am trying to install mysqldb-1.2.2 on my PPC running 10.5.2 and Activepython 2.5.1.1 when I get this error: running build running build_py copying MySQLdb/release.py -> build/lib.macosx-10.3-fat-2.5/MySQLdb running build_ext building '_mysql' extension gcc -isysroot /Developer/SDKs/MacOSX10.4

Re: Custom log handler and logging.config.fileConfig()

2008-05-29 Thread Lowell Alleman
Is there any reason not to do this assignment in the "myhandler.py" directly? This would save a step for each application that needs to use it. Starting from your example, it would now look like this: # -- myhandler.py --- import logging.handlers class MySpecialHandler(logging.handlers.Rotating

Re: Python and Flaming Thunder

2008-05-29 Thread Dan Upton
On Thu, May 29, 2008 at 3:36 AM, Duncan Booth <[EMAIL PROTECTED]> wrote: > Dave Parker <[EMAIL PROTECTED]> wrote: > >> Catch doesn't return just error types or numbers, it can return any >> object returned by the statements that are being caught; catch doesn't >> care what type they are. For examp

bit parsing from file

2008-05-29 Thread [EMAIL PROTECTED]
Hello, I'm tring to make a cutting script. The problem is the following, i have a sample pattern, for example :'11101110' (0xEE) That is the sign of the data begining. How can i cut a file if the byte stepping is not the same, for example: file=open('test.bin','rb') data=file.read() print binasci

Re: Finding file details...

2008-05-29 Thread Mike Driscoll
On May 29, 5:26 am, Kalibr <[EMAIL PROTECTED]> wrote: > On May 29, 7:55 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > > > > > > > You don't say, but I assume you're on Windows since you mention > > GetFileVersionInfo (which doesn't have anything to do with media > > files, by the way) and WMA. There

Re: BadStatusLine error

2008-05-29 Thread Jim
On May 28, 11:24 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Jim wrote: > > Hi > > > I get a BadStatusLine error (indicated below). Can anyone help with > > how to > > catch error in code before abort? > > http://docs.python.org/tut/node10.html > > Diez Thanks Diez docs help. Jim -- http:

Re: adobe flex; return xml via turbogears/django

2008-05-29 Thread Diez B. Roggisch
Sells, Fred wrote: > please excuse slightly off-topic; cannot access turbogears mailing list at > the moment. > > There was an excellent video by James Ward that showed using turbogears to > return json data to adoble's flex UI. It simply used > > @expose("JSON") > def (): > ... > return di

Re: seg. fault with Py_BuildValue?

2008-05-29 Thread Christian Heimes
Christian Meesters schrieb: > Hi > > I'm having trouble with Py_BuildValue. I was able to pinpoint the following > statement as the one causing a seg. fault with my script: > > static PyObject * funcname(PyObject *self, PyObject *args) { > > return Py_BuildValue("(OO)", x, y); > } > where

Re: feedparser html sanitizion how-to disable it

2008-05-29 Thread sebey
oh sorry here is the rss feed I am using http://recordings.talkshoe.com/rss39293.xml -- http://mail.python.org/mailman/listinfo/python-list

adobe flex; return xml via turbogears/django

2008-05-29 Thread Sells, Fred
please excuse slightly off-topic; cannot access turbogears mailing list at the moment. There was an excellent video by James Ward that showed using turbogears to return json data to adoble's flex UI. It simply used @expose("JSON") def (): ... return dict(x=1, ...) Is there

Re: Strange thing with types

2008-05-29 Thread TYR
On May 29, 2:24 pm, alex23 <[EMAIL PROTECTED]> wrote: > On May 29, 11:09 pm, TYR <[EMAIL PROTECTED]> wrote: > > > > > I'm doing some data normalisation, which involves data from a Web site > > being extracted with BeautifulSoup, cleaned up with a regex, then > > having the current year as returned

Re: Strange thing with types

2008-05-29 Thread TYR
On May 29, 2:23 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > TYR wrote: > > I'm doing some data normalisation, which involves data from a Web site > > being extracted with BeautifulSoup, cleaned up with a regex, then > > having the current year as returned by time()'s tm_year attribute > > i

Re: seg. fault with Py_BuildValue?

2008-05-29 Thread Christian Meesters
> What happens if you get rid of the ()? Can't see any difference. -- http://mail.python.org/mailman/listinfo/python-list

boost

2008-05-29 Thread deepest1
Hi everybody. I'm trying to use boost, but just don't know how to set it up. My os is winXP (installed on disk D). Python is installed in D:\Python25 MigGW compiler is installed in D:\MinGW (i downloaded it because djgpp is making much more errors with bjam) I have downloaded boost_1_35_0.zip a

Re: Finding file details...

2008-05-29 Thread Tim Golden
Kalibr wrote: On May 29, 7:55 pm, Tim Golden <[EMAIL PROTECTED]> wrote: You don't say, but I assume you're on Windows since you mention GetFileVersionInfo (which doesn't have anything to do with media files, by the way) and WMA. There may be packages out there to do all this already but if not y

feedparser html sanitizion how-to disable it

2008-05-29 Thread sebey
ok so I know about why its good but I am building a website that imports rss feeds form external place in this case Talkshoe.com and feedparser seens to think that podcast.feed.description has html in it and same with podcast.entries[0].description so how can I disable it p.s. new to python so bab

Re: Tuple of coordinates

2008-05-29 Thread Benjamin Kaplan
On Thu, May 29, 2008 at 8:16 AM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > Hi, > > i am using a software which uses python as its scripting language. I > want to generate a list of coordinates more or less this way: > > for i in (beg, end, step): > for j in (beg, end, step): > f

Re: Any way to loop through object variables?

2008-05-29 Thread paul
Dave Challis schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ah thanks, vars(...) was exactly what I was after. I'd come across dir() before, but this returns more than I need. It seems vars() misses class attributes tho... cheers Paul -- http://mail.python.org/mailman/listinfo/pytho

  1   2   >