Re: python extensions: including project local headers

2008-10-23 Thread Philip Semanchuk
On Oct 23, 2008, at 3:18 PM, J Kenneth King wrote: Philip Semanchuk <[EMAIL PROTECTED]> writes: On Oct 23, 2008, at 11:36 AM, J Kenneth King wrote: Hey everyone, I'm working on a python extension wrapper around Rob Hess' implementation of a SIFT feature detector.

Re: 2.6, 3.0, and truly independent intepreters

2008-10-25 Thread Philip Semanchuk
mory) and one which I wrote (for POSIX semaphores & shared memory). http://NikitaTheSpider.com/python/shm/ http://semanchuk.com/philip/posix_ipc/ If anyone wants to wrap POSH cleverness around them, go for it! If not, maybe I'll make the time someday. Cheers Philip -- http://mail.

Re: Finding Default Page Name using urllib2

2008-10-27 Thread Philip Semanchuk
barrett, Look into the urllib2 module and specifically HTTPRedirectHandler objects. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to locate existing standard encodings in python

2008-11-09 Thread Philip Semanchuk
On Nov 9, 2008, at 7:00 PM, News123 wrote: Hi, I was googling quite some time before finding the answer to my question: 'what are the names for the encodings supported by python?' I found the answer at http://python.active-venture.com/lib/ node127.html Now my question: Can I find the

Re: Where to locate existing standard encodings in python

2008-11-11 Thread Philip Semanchuk
On Nov 11, 2008, at 1:08 PM, News123 wrote: Hi Philip, Thanks for your answer: The fact, that a module 'encodings' exists was new to me. We both learned something new today. =) encodings.aliases.aliases has however one problem. It helps to locate all encoding aliases, but it

Re: Where to locate existing standard encodings in python

2008-11-11 Thread Philip Semanchuk
On Nov 11, 2008, at 9:10 AM, News123 wrote: Hi Philip, Your answer touches exaclty one point, which I was slightly afraid of: - The list is not exhaustive - python versions might have implemented different codecs. This is why I wondered whether there's any way of querying python

Re: running same script on same data on two different machines --> different result

2008-11-14 Thread Philip Semanchuk
Python. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: web site feedback page using python for sending email

2008-11-14 Thread Philip Semanchuk
le to SMTP header injection. I'm not familiar with a script that will do what you want, but I haven't looked, either. Just make sure that whatever you end up using is fairly current. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing Python2.6 on Mac Os (Leopard)

2008-11-17 Thread Philip Semanchuk
al/bin to your Python 2.6 install. If, for instance, those symlinks live in /usr/local/bin, then put that directory first in your path and then typing `python` at the command line will launch Python 2.6. If the symlinks aren't there, you can create them by hand. HTH Philip -- http://ma

Re: Installing Python2.6 on Mac Os (Leopard)

2008-11-17 Thread Philip Semanchuk
On Nov 17, 2008, at 1:17 PM, Diez B. Roggisch wrote: Philip Semanchuk wrote: On Nov 17, 2008, at 10:53 AM, Massi wrote: Hi everyone, I'm trying to install Python2.6 on my mac (Leopard 10.5.5), but I'm encountering some problems. To install the package I followed the inst

Re: Installing Python2.6 on Mac Os (Leopard)

2008-11-17 Thread Philip Semanchuk
On Nov 17, 2008, at 2:05 PM, Diez B. Roggisch wrote: Sorry if I misinformed; I have such symlinks in /usr/local/bin dated the same day as my custom Python install. I guess I could have created them myself, but I don't think I would have bothered creating a symlink for pythonw, for example si

Re: Programming exercises/challenges

2008-11-19 Thread Philip Semanchuk
You could even use wget to scrape the site instead of rolling your own bot if you're more interested in the data manipulation aspect of the project than the bot writing. Enjoy Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: calling python scripts as a sub-process

2008-11-19 Thread Philip Semanchuk
On Nov 19, 2008, at 2:03 PM, Catherine Moroney wrote: The command (stored as an array of strings) that I'm executing is: ['python ../src_python/Match1.py ', '-- file_ref=MISR_AM1_GRP_ELLIPSOID_GM_P228_O003571_BF_F03_0024.hdf ', '--file_cmp=MISR_AM1_GRP_ELLIPSOID_GM_P228_O003571_DF_F03_0024.

Re: Python shell scripting and errors

2009-02-23 Thread Philip Semanchuk
directing errors to a log file without the need to modify the script. python /usr/local/foo/bar.py >> /var/log/foo/bar.txt 2>&1 HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python C-API Object Allocation

2009-02-23 Thread Philip Semanchuk
about and, having just learned about them myself I'm trying to spread the word. The lists are here: http://mail.python.org/mailman/listinfo Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: python sql query in django

2009-02-23 Thread Philip Semanchuk
On Feb 23, 2009, at 4:34 PM, Diez B. Roggisch wrote: I may not stay with Django. I am seriously looking for whether python can read data from a relational database and send to an html template or do I always need some kind of wrapper/interface such as Rails or Django? If this is the wrong g

Re: PYTHONPATH on Mac 10.5

2009-02-25 Thread Philip Semanchuk
ay with it entirely. This isn't a complete answer but has it been at least somewhat helpful? Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Characters aren't displayed correctly

2009-03-01 Thread Philip Semanchuk
our problem, but you will make it much smaller and more specific. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Characters aren't displayed correctly

2009-03-02 Thread Philip Semanchuk
On Mar 2, 2009, at 9:50 AM, Hussein B wrote: On Mar 2, 4:31 pm, John Machin wrote: On Mar 2, 7:30 pm, Hussein B wrote: On Mar 1, 4:51 pm, Philip Semanchuk wrote: What are you getting out of the database? Is it being converted to Unicode correctly, or at all? I don't know, how to

Re: Characters aren't displayed correctly

2009-03-02 Thread Philip Semanchuk
On Mar 2, 2009, at 10:50 AM, John Machin wrote: On Mar 3, 2:22 am, Philip Semanchuk wrote: See if you can successfully construct and send an email that says "Hello world" in English/ASCII. If that works, change it to Arabic. If that works, change the email format to HTML. If

Re: Characters aren't displayed correctly

2009-03-02 Thread Philip Semanchuk
On Mar 2, 2009, at 5:26 PM, John Machin wrote: On Mar 3, 3:27 am, Philip Semanchuk wrote: He claims to have done what I asked him to do in the first place -- break the problem into steps and verify the database steps. He says they're working OK. I chose to take him at his word. Rule n

Re: looking for template package

2009-03-03 Thread Philip Semanchuk
As I said, there are lots of choices and the template syntax varies widely. Some use XML-based templates which I find painful. But people who use lots of XMLish tools probably appreciate the structure. You know your preferences best, so pick a template package that has a syntax you won't

Re: Parsing/Crawler Questions..

2009-03-04 Thread Philip Semanchuk
ably be missing URLs. The canonical solution for parsing real-world Web pages with Python is BeautifulSoup. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing/Crawler Questions..

2009-03-05 Thread Philip Semanchuk
On Mar 5, 2009, at 12:31 PM, bruce wrote: hi.. the url i'm focusing on is irrelevant to the issue i'm trying to solve at this time. Not if we're to understand the situation you're trying to describe. From what I can tell, you're saying that the target site displays different results e

Re: Decorators

2009-03-06 Thread Philip Semanchuk
, Michiel. His examples using classes as function decorators are IMHO a whole lot easier to read than the ones that use functions. Good stuff. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Question on periods in strings

2009-03-11 Thread Philip Bloom
Hello, this is my first time posting to the list, but my curiosity here is great. I was randomly toying with file writes and I ran into something that seemed quite odd to me. When a period is in a string, file write takes about double the time. I saw similar things with newlines, but I figured t

RE: Question on periods in strings

2009-03-11 Thread Philip Bloom
entionally small python code since it originated from just seeing what some variations on file writes might differ in scaling. -Original Message- From: python-list-bounces+pbloom=crystald@python.org [mailto:python-list-bounces+pbloom=crystald@python.org] On Behalf Of Gabriel Ge

RE: Question on periods in strings

2009-03-12 Thread Philip Bloom
on periods in strings En Wed, 11 Mar 2009 23:42:45 -0200, Philip Bloom escribió: > Thanks for the welcome :) > > You're right. Here's with the missed line (I was cutting out commented > parts). Hopefully these are all cut/paste-able. > > #test A > #runs

Re: unbiased benchmark

2009-03-12 Thread Philip Semanchuk
On Mar 12, 2009, at 4:20 PM, Daniel Fetchinson wrote: Even more amazingly, it takes approximately 30% less time to say 'ruby' than to say 'python'!!! But "python" scores 55% more points than "ruby" in Scrabble, so that's understandable. It also explains why both languages are much better

Re: Getting final url when original url redirects

2009-03-12 Thread Philip Semanchuk
On Mar 12, 2009, at 3:57 PM, IanR wrote: I'm processing RSS content from a # of given sources. Most of the time the url given by the RSS feed redirects to the real URL (I'm guessing they do this for tracking purposes) For example. This is a url that I get from and RSS feed, http://www.pheedc

Re: ValueError: filedescriptor out of range in select()

2009-03-17 Thread Philip Semanchuk
On Mar 17, 2009, at 10:04 AM, Laszlo Nagy wrote: This is a long running process, written in Python. Only standard lib is used. This process accepts connections on TCP sockets, read/write data. After about one day, it starts throwing this when I try to connect: 2009-03-17 09:49:50,096 INFO

Re: ValueError: filedescriptor out of range in select()

2009-03-17 Thread Philip Semanchuk
Like I said, it's just a hunch. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python + PostgreSQL

2009-03-17 Thread Philip Semanchuk
own and only you know yours. One thing I will note is that Zope's database is an object hierarchy which sounds like a familiar tool for you, so that might ease your transition into the Python world. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python + PostgreSQL

2009-03-17 Thread Philip Semanchuk
ave to upgrade at some point in the future, but that's probably your best course of action at the moment. Good luck Philip I saw in a different post that psycopg2 does work on Python 3.x as long as a patch is applied (by Martin v. Löwis): http://groups.google.com/group/comp.lang.python/tr

Re: Compiling modules in OSX, eg PyUSB?

2009-03-20 Thread Philip Semanchuk
OS X. You need to contact the package author to ask if he has considered OS X support. If not, you'll need to find another package. Google for something like this: python usb "os x" That should help you to find packages that will work under OS X. Be aware that there mi

Re: Compiling modules in OSX, eg PyUSB?

2009-03-20 Thread Philip Semanchuk
On Mar 20, 2009, at 11:39 AM, Dr Mephesto wrote: Thanks. I found some more info that might help, if I understood it :)From the main PyUSB page, at http://pyusb.berlios.de/ , its says: "PyUSB uses the libusb to do its work, so, any system which has Python and libusb should work for PyUSB." O

Re: Compiling modules in OSX, eg PyUSB?

2009-03-20 Thread Philip Semanchuk
Run setup again and I bet you'll be off to the races. You should certainly report this to the package maintainer, and you might also want to point out that the if block starting on line 17 of setup.py and the if block starting on line 26 are both for OS X, but they lead to different results! Let us know how it works out, Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling modules in OSX, eg PyUSB?

2009-03-21 Thread Philip Semanchuk
On Mar 21, 2009, at 2:49 AM, Dr Mephesto wrote: On Mar 20, 6:23 pm, Philip Semanchuk wrote: So change line 32 in the PyUSB setup.py from this: extra_compile_args = ['-I/sw/include'] to this: extra_compile_args = ['-I/sw/include', '-I/usr/local/include'

Python version(s) for new project?

2009-03-26 Thread Philip Semanchuk
ns. Does this sound sane? My constraints: - Need to support Linux and Windows - I'll be developing under OS X (thank you VirtualBox!) - Using wxPython, scipy, numpy, SWIG - Code will eventually be open sourced Thanks Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python version(s) for new project?

2009-03-26 Thread Philip Semanchuk
On Mar 26, 2009, at 10:34 AM, andrew cooke wrote: Philip Semanchuk wrote: Hi all, I'm about to start a new job at which I and others will build a project largely in Python. I'm trying to figure out which Python versions to use and support. I can't use Python 3.x, but I want to

Re: mmap resizing macosx unix

2009-04-05 Thread Philip Semanchuk
shared memory. A regular mmapped file might resize just fine so point (b) might be irrelevant for you. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Open source web crawler with mysql integration

2009-04-09 Thread Philip Semanchuk
better than the one in the standard library IMHO) but that's about it. FYI, I wrote my spider in Python because I couldn't find a decent one written in Python. There's Nutch, but that's not Python (Java I think). Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Open source web crawler with mysql integration

2009-04-10 Thread Philip Semanchuk
to download a general-purpose spider. I'd love to open source it and if someone wants to pay me to make it open source-able, let's talk! But if I have to do it on my own time for free it will be a while (maybe never, although I hope not) before I can make the time. Regards Philip

Re: Open source web crawler with mysql integration

2009-04-10 Thread Philip Semanchuk
putation. And for the reputation of open source in general, but I'm more concerned about me. ;) -Original Message- From: python-list-bounces+bedouglas=earthlink@python.org [mailto:python-list-bounces+bedouglas=earthlink@python.org]on Behalf Of Philip Semanchuk Sent: Frida

Re: Open source web crawler with mysql integration

2009-04-10 Thread Philip Semanchuk
On Apr 10, 2009, at 10:37 PM, Lawrence D'Oliveiro wrote: In message , Philip Semanchuk wrote: I'd love to open source it and if someone wants to pay me to make it open source-able, let's talk! Nobody's going to pay you for something of doubtful value--it's

Re: Registering Cron using CronTab

2009-04-17 Thread Philip Semanchuk
On Apr 17, 2009, at 9:51 AM, gurcharan.sa...@gmail.com wrote: Hi I'm developing a Django application which is running on Apache. We need to add crontab from the Python script and we are using Python CronTab package for this. I'm stuck with the

Re: any complete and actual pysqlite example?

2009-04-18 Thread Philip Semanchuk
at the Python Saw', 30.00, 2); sqlite> sqlite> SELECT ...> name, price ...> FROM ...> books ...> ORDER BY ...> price; name price --- -- Jean Paul Satre Goes to the Chemist 25.

Re: Python, MS SQL, and batch inserts

2009-04-21 Thread Philip Semanchuk
your logjam is in Python? Inserting 5500 rows can take a few seconds if you're COMMITting after each INSERT. Wrap the whole thing in an explicit transaction and see if that helps. Also, toss in a few print statements containing timestamps so you know more about where the sc

Re: Python, MS SQL, and batch inserts

2009-04-21 Thread Philip Semanchuk
On Apr 21, 2009, at 2:30 PM, ericwoodwo...@gmail.com wrote: I'm not 100% sure it's python and not SQL but I do suspect there's a better way to do this than just serial inserts. I could be wrong about that which is what i'm trying to explore. I don't think the SQL standard provides a way to

Re: pyflakes, pylint, pychecker - and other tools

2009-04-21 Thread Philip Semanchuk
On Apr 21, 2009, at 9:11 PM, Esmail wrote: What is the consensus of the Python community regarding these code checkers? You're assuming there is a consensus. =) -- http://mail.python.org/mailman/listinfo/python-list

Re: http web fetch question

2009-04-23 Thread Philip Semanchuk
On Apr 23, 2009, at 6:21 PM, grocery_stocker wrote: Say I have a script that fetches data from a website every hour. Is there a general solution or is the solution operating system specific? It's not OS-specific. See the Python standard library modules urllib, urllib2, or just run a command

Re: Light (general) Inter-Process Mutex/Wait/Notify Synchronization?

2009-04-27 Thread Philip Semanchuk
On Apr 27, 2009, at 8:45 PM, Gunter Henriksen wrote: Try this: http://nikitathespider.com/python/shm/ I took a look at that (especially the posix_ipc at http://semanchuk.com/philip/posix_ipc/). Hej Gunter, The posix_ipc and sysv_ipc modules both do what you're asking for. Shm doe

Re: Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-04 Thread Philip Semanchuk
s for accessing C++ objects via Python. I know of SIWG and Boost; are there others that you think deserve consideration? I've been happy with ctypes in my limited exposure to it and would love to find a way to make that work. This thread has been very interesting to me. Thanks Ph

Re: Using C++ and ctypes together: a vast conspiracy? ;)

2009-06-04 Thread Philip Semanchuk
27;s true, I think there's room for multiple library-wrapping packages, just like there's room for more than one programming language in the world. Cheers Philip On Thu, Jun 4, 2009 at 2:07 PM, Thomas Heller wrote: Philip Semanchuk schrieb: Hi Thomas, We'

Re: import sqlite3

2009-06-05 Thread Philip Semanchuk
n high regard", meaning, "I respect and admire him". I'm in the USA; other English speakers might see this differently. bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: httplib raises ValueError reading chunked content

2006-03-08 Thread Philip Semanchuk
On Mar 8, 2006, at 8:32 PM, Etienne Desautels wrote: > > Hi Philip, > >> Hi all, >> Has anyone ever seen Python 2.4.1's httplib choke when reading chunked >> content? > > Yes, it's a know bug. See for yourself: > https://sourceforge.net/tracker/?

Re: Python advocacy in scientific computation

2006-03-09 Thread Philip Austin
Michael McNeil Forbes <[EMAIL PROTECTED]> writes: > > I find that version control (VC) has many advantages for > scientific research (I am a physicist). > Greg Wilson also makes that point in this note: http://www.nature.com/naturejobs/2005/050728/full/nj7050-600b.html Where he describes his exc

ctypes/libffi for Intel based Macintosh

2006-03-29 Thread philip . kania
Can someone tell me where I can download a version of ctypes/libffi that will work on a Intel based Macintosh? I'm running Mac OS X 10.4.5 and the ActiveState Python 2.4.2 distribution. I've tried building libffi 1.20 which came with ctypes 0.9.9.3 and got a message from the libffi configure scr

Re: Directly converting Python to C using the C API

2009-12-03 Thread Philip Semanchuk
On Dec 3, 2009, at 9:09 PM, Emmanuel Bengio wrote: I'm fairly new to the python world, and I often heard critics about it's speed, and also about it's "non-compilability". Then I thought, there is a complete C API that manages Python itself. Would it be feasible to transform pure Python code

Re: How do I Block Events in wxPython

2009-12-09 Thread Philip Semanchuk
code or try the sample code ourselves. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: web crawler in python

2009-12-10 Thread Philip Semanchuk
ou want, come back to the list with a specific problem. It's always easier to help with specific than with general problems. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: setup.py and PyPI

2009-12-14 Thread Philip Semanchuk
On Dec 14, 2009, at 12:04 PM, Ethan Furman wrote: Greetings! I'm using Python 2.5 on Windows XP, and trying to get the upload portion of setup.py to work. According to what I have found, I can put my info into a .pypirc file to have the process pick up my username/password and upload th

Re: setup.py and PyPI

2009-12-14 Thread Philip Semanchuk
On Dec 14, 2009, at 1:00 PM, Ethan Furman wrote: Philip Semanchuk wrote: On Dec 14, 2009, at 12:04 PM, Ethan Furman wrote: Greetings! I'm using Python 2.5 on Windows XP, and trying to get the upload portion of setup.py to work. According to what I have found, I can put my info i

Re: What type of info do you capture about a user's environment for debugging?

2009-12-14 Thread Philip Semanchuk
On Dec 14, 2009, at 3:39 PM, pyt...@bdurham.com wrote: We're preparing to release a commercial software product based on Python. When a customer reports problems with our software, we would like to capture as much information about their environment as possible while being respectful of privacy

Re: Apple Mac OS X 10.6 support & compatability with Python 3 ?

2009-12-16 Thread Philip Semanchuk
VirtualBox with OS X as the host, and that works fine for me. That's pretty heavy to call "emulation" though. Hope this helps at least a little Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: How to test a URL request in a "while True" loop

2009-12-30 Thread Philip Semanchuk
except URLError: # Even better, append actual reasons for the failure. results.append(False) for result in results: print result I guess if you're going to do the same number of attempts each time, a for loop would be more expressive, but you probably get the idea. Hope this helps Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Do I have to use threads?

2010-01-05 Thread Philip Semanchuk
n the other aspects of your program(s). bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Do I have to use threads?

2010-01-06 Thread Philip Semanchuk
On Jan 6, 2010, at 12:45 AM, Brian J Mingus wrote: On Tue, Jan 5, 2010 at 9:36 PM, Philip Semanchuk wrote: On Jan 5, 2010, at 11:26 PM, aditya shukla wrote: Hello people, I have 5 directories corresponding 5 different urls .I want to download images from those urls and place them in

Re: GUI for multiplatform multimedia project

2010-01-06 Thread Philip Semanchuk
original question, although I don't know if one GUI toolkit is easier to bundle than another, I suspect that none of them are easy. I would pick the GUI toolkit based on what suits your technical & licensing needs best and worry about distribution later. That's one man'

Re: Do I have to use threads?

2010-01-07 Thread Philip Semanchuk
On Jan 7, 2010, at 11:32 AM, Jorgen Grahn wrote: On Thu, 2010-01-07, Marco Salden wrote: On Jan 6, 5:36 am, Philip Semanchuk wrote: On Jan 5, 2010, at 11:26 PM, aditya shukla wrote: Hello people, I have 5 directories corresponding 5 different urls .I want to download images from those

Re: Fundamental Function Question (beginner)

2010-01-11 Thread Philip Semanchuk
On Jan 11, 2010, at 2:50 PM, Phlip wrote: MRAB wrote: Scott wrote: for prtnmS in open(portfpth): prtnmS = prtnmS.rstrip() There's nothing wrong with building dicts or other lookup tables outside a function in order to avoid re-creating them every time the function is called. Ho

Re: What is built-in method sub

2010-01-11 Thread Philip Semanchuk
piled regex to see how much difference it makes. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: installing psycopg2-2.0.13 with python3.1

2010-01-20 Thread Philip Semanchuk
ported psycopg2 to Python 3 and provided a diff: http://mail.python.org/pipermail/python-porting/2008-December/18.html Last but not least, I should note that psycopg has its own mailing list, and I bet they know more about it there: http://lists.initd.org/mailman/listinfo/psycopg Hope this he

Re: Still too slow

2010-01-30 Thread Philip Semanchuk
o change evolve() from this string comparison: if evnt!="None": to this comparison to the Python singleton None: if evnt != None: or this, which is even simpler (although it may not be faster): if evnt: Hope this helps Philip -- http://mail.python.org/mailman/listinfo/python-list

Opinions, please, on PEP 8 and local, 3rd party imports

2009-10-02 Thread Philip Semanchuk
n't write" is useful. But I've always reserved category 2 for external libraries (e.g. numpy, wxPython, Twisted, PIL, etc.). Clearly, the best choice is category 2.5? In your Pythonic opinion, should 3rd-party modules that live alongside homegrown code be listed in import categ

Re: Combining python and sqlite DB into a single, "executeable".

2009-10-06 Thread Philip Semanchuk
(or ~/.your_app or a directory of your choosing). Does that give you most of what you want? Cheers Philip On Tue, Oct 6, 2009 at 11:31 AM, Robert Kern wrote: On 2009-10-06 16:16 PM, tcumming...@gmail.com wrote: Any body got any ideas how to do the following... I would like to be able

Re: The rap against "while True:" loops

2009-10-11 Thread Philip Semanchuk
xactly what it's meant to accomplish. In addition, isn't it easier to figure out how this loop ends -- while (condition1) and (condition2) and (condition3): ...lots of code here... than this one? while True: ...lots of code here... if not condition1:

Re: "Error en el bus" from python

2009-10-11 Thread Philip Semanchuk
# registerForeign(notify) # prolog.consult("hanoi.pl") # list(prolog.query("hanoi(%d)" % N)) If the bus error no longer occurs, then you know the problem is in the pyswip.prolog library. With that knowledge, I'd move to the mailing list or newsgroup for pyswip. Hope that helps Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: "Error en el bus" from python

2009-10-11 Thread Philip Semanchuk
On Oct 11, 2009, at 11:56 PM, Dennis Lee Bieber wrote: On Sun, 11 Oct 2009 13:45:54 -0700 (PDT), Yusniel > declaimed the following in gmane.comp.python.general: prolog.consult("hanoi.pl") where "hanoy.pl" is a program with python code. Any solution for this error?. Thanks.

Re: "Error en el bus" from python

2009-10-12 Thread Philip Semanchuk
On Oct 12, 2009, at 11:27 AM, Yusniel wrote: On 12 oct, 00:08, Philip Semanchuk wrote: On Oct 11, 2009, at 11:56 PM, Dennis Lee Bieber wrote: On Sun, 11 Oct 2009 13:45:54 -0700 (PDT), Yusniel declaimed the following in gmane.comp.python.general: prolog.consult("han

Re: Python GUI

2009-10-25 Thread Philip Semanchuk
d IMO reasonably well laid out. I hear great things about PyQt (which wraps QT) but I haven't used it. PySide is a new wrapper for QT that has generated a lot of excitement but is still its infancy, I think. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

How to get a unique function name for methods

2009-10-29 Thread Philip Guo
} (Simply using their line numbers isn't gonna work for me, I need their class names.) Does anyone know how to get this information either from a code object or from a related object? I am hacking the interpreter, so I have full access to everything. Thanks in advance, Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Are *.pyd's universal?

2009-10-29 Thread Philip Semanchuk
On Oct 29, 2009, at 8:41 PM, Christian Heimes wrote: Lawrence D'Oliveiro schrieb: In message , Christian Heimes wrote: On Linux and several other Unices the suffix is .so and not .pyd. Why is that? Or conversely, why isn't it .dll under Windows? .so is the common suffix of shared libra

Re: How to parse HTTP time header?

2009-11-07 Thread Philip Semanchuk
tolerant of slightly malformed dates, but that module is deprecated as of Python 2.5 in favor of the email module which hopefully has an equivalent function. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: How to parse HTTP time header?

2009-11-07 Thread Philip Semanchuk
3 date = time.strptime(HttpDateString, RFC_1123_FORMAT) return calendar.timegm(date) bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: comparing alternatives to py2exe

2009-11-10 Thread Philip Semanchuk
On Nov 9, 2009, at 9:16 PM, Gabriel Genellina wrote: En Fri, 06 Nov 2009 17:00:17 -0300, Philip Semanchuk > escribió: On Nov 3, 2009, at 10:58 AM, Jonathan Hartley wrote: Recently I put together this incomplete comparison chart in an attempt to choose between the different alternatives

Re: Pause a script before termination

2009-11-11 Thread Philip Semanchuk
On Nov 11, 2009, at 11:47 AM, noydb wrote: On Nov 11, 11:43 am, noydb wrote: Hi All, I want to pause my script before it terminates, just so a user can have a moment to read some print statements I include at the end. How can this be accomplished? Thanks! Never mind, duh, found my ans

Re: A beginner question about GUI use and development

2009-11-13 Thread Philip Semanchuk
(Linux, FreeBSD, etc.) In the beginning it is okej to code the gui "by hand" to learn but after that i like som kind of GUI-designtool, and god to recommade ?? wxGlade is popular for wxWidgets. I don't know about PyQT or Tkinter. Lycka till, Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: How to know if a file is a text file

2009-11-14 Thread Philip Semanchuk
#x27;re trying to solve, then maybe we can help you better. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Using "setup.py" for an application, not a library module.

2009-11-18 Thread Philip Semanchuk
g like py2exe or py2app. distutils doesn't provide a facility for that. DOes that give you an idea about what you were asking? bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a float to a formatted outside of print command

2009-11-23 Thread Philip Semanchuk
On Nov 23, 2009, at 4:15 PM, stephen_b wrote: I'd like to convert a list of floats to formatted strings. The following example raises a TypeError: y = 0.5 x = '.1f' % y You're missing a percent sign: x = '%.1f' % y or: print '%.1f'

Re: error: Setup script exited with error: command 'gcc' failed with exit status 1

2010-02-15 Thread Philip Semanchuk
On Feb 15, 2010, at 3:33 PM, chiranjeevi muttoju wrote: Hi, When i'm trying to install some modules for python i'm getting the fallowing error.. error: Setup script exited with error: command 'gcc' failed with exit status 1 can any one know what it exactly means.. if any body know please repl

Re: Shipping Executables

2010-02-16 Thread Philip Semanchuk
er from a typical open source distribution. Do you not want people to change the code? Are you worried about your code & ideas being stolen? bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Python 3.0 usage?

2010-02-17 Thread Philip Semanchuk
re it's worth it. I'm interested in opinions -- is Python 3.0 seeing use in production anywhere, or did most of the Python world move to 3.1 as soon as it was released? Thanks Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 usage?

2010-02-18 Thread Philip Semanchuk
m I accept patches :) Excellent idea. =) Thanks to all who replied. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: DreamPie - The Python shell you've always dreamed about!

2010-02-21 Thread Philip Semanchuk
On Feb 21, 2010, at 8:39 PM, rantingrick wrote: Mensanator snipped: """Yeah, I saw that. Funny that something important like that wasn't part of the announcement. I notice no mention of Mac OS, so visiting the website was a complete waste of time on my part, wasn't it?""" Oh Mensanator, why

Re: Draft PEP on RSON configuration file format

2010-03-01 Thread Philip Semanchuk
llective throats, I might object to RSON. But he's not. He appears willing for it live or die on its merits, so I say good luck to him. I don't want or need it, but someone else might. Cheers Philip * You had floppies? Bleddy luxury! We wrote our data on wood pulp we'd chewe

Re: freebsd and multiprocessing

2010-03-02 Thread Philip Semanchuk
7;sysctl kern.ipc' can probably tell you that and may even let you change it. Other than that I can't think of any SysV limitations that might bite you. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: freebsd and multiprocessing

2010-03-02 Thread Philip Semanchuk
On Mar 2, 2010, at 1:31 PM, Tim Arnold wrote: On Mar 2, 12:59 pm, Tim Arnold wrote: On Mar 2, 11:52 am, Philip Semanchuk wrote: On Mar 2, 2010, at 11:31 AM, Tim Arnold wrote: Hi, I'm intending to use multiprocessing on a freebsd machine (6.3 release, quad core, 8cpus, amd64). I s

Re: taking python enterprise level?...

2010-03-03 Thread Philip Semanchuk
is to redesign your app/system so you don't need to solve that kind of problem anymore (hence the join-less databases). Other times, the cure is worse than the disease and you're better off throwing hardware at the problem. My $.02 Philip -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   >