Re: any complete and actual pysqlite example?

2009-04-18 Thread Philip Semanchuk
it's a wonderful little database, especially for experimentation like you're doing. Remember, if things get really screwed up you can always delete the database file and start over! =) Have fun and good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

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 http://pypi.python.org/pypi/python-crontab/0.7 for this. I'm stuck with the

Re: Open source web crawler with mysql integration

2009-04-10 Thread Philip Semanchuk
. 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 -Original Message- From: Philip

Re: Open source web crawler with mysql integration

2009-04-10 Thread Philip Semanchuk
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: Friday, April 10, 2009 8:10 AM To: Python (General

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 mailman.3655.1239380993.11746.python-l...@python.org, 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

Re: Open source web crawler with mysql integration

2009-04-09 Thread Philip Semanchuk
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: mmap resizing macosx unix

2009-04-05 Thread Philip Semanchuk
with 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

Python version(s) for new project?

2009-03-26 Thread Philip Semanchuk
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 prepare

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 phi...@semanchuk.com 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

Re: Compiling modules in OSX, eg PyUSB?

2009-03-20 Thread Philip Semanchuk
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 might not be such a package. :-/ Hope this helps Philip -- http

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.

Re: Compiling modules in OSX, eg PyUSB?

2009-03-20 Thread Philip Semanchuk
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: 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

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

2009-03-17 Thread Philip Semanchuk
Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python + PostgreSQL

2009-03-17 Thread Philip Semanchuk
. 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
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/tree/browse_frm/thread/56b7fca444a5aa5d/4064a307dca37686

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 pbl...@crystald.com 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 in 5.8 seconds. from

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,

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

RE: Question on periods in strings

2009-03-11 Thread Philip Bloom
@python.org [mailto:python-list-bounces+pbloom=crystald@python.org] On Behalf Of Gabriel Genellina Sent: Wednesday, March 11, 2009 6:17 PM To: python-list@python.org Subject: Re: Question on periods in strings En Wed, 11 Mar 2009 22:35:22 -0200, Philip Bloom pbl...@crystald.com escribió

Re: Decorators

2009-03-06 Thread Philip Semanchuk
for that, 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

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

Re: Parsing/Crawler Questions..

2009-03-04 Thread Philip Semanchuk
Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for template package

2009-03-03 Thread Philip Semanchuk
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 hate. Good luck Philip -- http

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 sjmac...@lexicon.net wrote: On Mar 2, 7:30 pm, Hussein B hubaghd...@gmail.com wrote: On Mar 1, 4:51 pm, Philip Semanchuk phi...@semanchuk.com wrote: What are you getting out of the database? Is it being converted

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 phi...@semanchuk.com 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

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 phi...@semanchuk.com 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

Re: Characters aren't displayed correctly

2009-03-01 Thread Philip Semanchuk
. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Mac 10.5

2009-02-25 Thread Philip Semanchuk
somewhat helpful? Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python shell scripting and errors

2009-02-23 Thread Philip Semanchuk
without the need to modify the script. python /usr/local/foo/bar.py /var/log/foo/bar.txt 21 HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python C-API Object Allocation

2009-02-23 Thread Philip Semanchuk
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

Re: Problems with OS X 10.5.6 and Python 2.5 and GDAL 1.6

2009-02-19 Thread Philip Semanchuk
On Feb 19, 2009, at 12:30 PM, Helly John J. wrote: Hi Philip. I installed the 2.5.4 binary from the python.org site. I did this because NumPy and SciPy currently only work with 2.5 and the system version was 2.4. It looks like you're using the same Python at the command line

Re: Is there something easier than ORM?

2009-02-17 Thread Philip Semanchuk
to all database access problems, and I certainly don't feel like it is. Good luck, Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads vs. processes, what to consider in choosing ?

2009-02-17 Thread Philip Semanchuk
and multiprocessing, I'll point you to some low level libraries I wrote for doing interprocess communication: http://semanchuk.com/philip/posix_ipc/ http://semanchuk.com/philip/sysv_ipc/ Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems with OS X 10.5.6 and Python 2.5 and GDAL 1.6

2009-02-17 Thread Philip Semanchuk
On Feb 16, 2009, at 8:35 PM, Helly John J. wrote: Hi. I'm a newbie to python and am running: OS X 10.5.6 Python 2.5.4 Hi John, Are you using the system Python or have you installed another version? Cheers Philip and have run easy_install for gdal like this: /Library/Python/2.5

[issue5298] Inconsistency in C-API thread docs

2009-02-17 Thread Philip Semanchuk
New submission from Philip Semanchuk osvens...@users.sourceforge.net: The language in the threading API documentation is a little inconsistent. The section I'm talking about is here: http://docs.python.org/c-api/init.html#thread-state-and-the-global-interpreter-lock The GIL is variously

[issue5299] PyGILState_Ensure()/PyGILState_Release() documentation incomplete?

2009-02-17 Thread Philip Semanchuk
New submission from Philip Semanchuk osvens...@users.sourceforge.net: The threading API documentation might omit out some important information about the GIL. The GIL can be acquired by explicitly calling PyEval_AcquireLock(). One can also acquire the GIL by calling PyGILState_Ensure

Re: Pythonic way to determine if a string is a number

2009-02-15 Thread Philip Semanchuk
On Feb 15, 2009, at 12:46 PM, pyt...@bdurham.com wrote: What's the Pythonic way to determine if a string is a number? By number I mean a valid integer or float. try: int(number) is_an_int = True except: is_an_int = False try: float(number) is_a_float = True except:

Re: Pythonic way to determine if a string is a number

2009-02-15 Thread Philip Semanchuk
On Feb 15, 2009, at 1:27 PM, Christian Heimes wrote: Philip Semanchuk schrieb: On Feb 15, 2009, at 12:46 PM, pyt...@bdurham.com wrote: What's the Pythonic way to determine if a string is a number? By number I mean a valid integer or float. try: int(number) is_an_int = True except

Re: A little bit else I would like to discuss

2009-02-12 Thread Philip Semanchuk
On Feb 12, 2009, at 3:04 PM, azrael wrote: Why will Microsoft's products kick the ass of open source. Because anyone does what he wants. Let's say There are 5 GUI libraries competing against each other. Think about it what could these 5 teams acomplish if they would work together. Or maybe a

Re: Python Launcher.app on OS X

2009-02-10 Thread Philip Semanchuk
On Feb 9, 2009, at 10:26 PM, kpp9c wrote: okay... for the life of me i do not see any Python Launcher.app and i just installed OS X 10.5 (running 10.5.6 on intel) and i also installed the dev kit. Where the heck is this application? Hi kp, I don't seem to have any such beast on my

Re: STMP, mail, sender-from, to-bcc-addr

2009-02-10 Thread Philip Semanchuk
job as the programmer building the application that sends the message to send the mail to everyone on the BCC list. Something like this: for recipient in bcc: send_mail(to=recipient) Hope this helps Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Calling into Python from a C thread

2009-02-10 Thread Philip Semanchuk
On Feb 9, 2009, at 3:59 PM, Christian Heimes wrote: Philip Semanchuk wrote: Yes, that's accurate except for the word forgot. To forget something one must first know it. =) I found the threading API documentation difficult to follow, but I suppose that what I'm doing is a little unusual so

Re: Python Launcher.app on OS X

2009-02-10 Thread Philip Semanchuk
On Feb 10, 2009, at 11:49 AM, Benjamin Kaplan wrote: On Tue, Feb 10, 2009 at 10:06 AM, Philip Semanchuk phi...@semanchuk.com wrote: On Feb 9, 2009, at 10:26 PM, kpp9c wrote: okay... for the life of me i do not see any Python Launcher.app and i just installed OS X 10.5 (running 10.5.6

Re: Calling into Python from a C thread

2009-02-09 Thread Philip Semanchuk
On Feb 9, 2009, at 12:02 PM, Aahz wrote: [posted e-mailed] In article mailman.8619.1233597806.3487.python-l...@python.org, Philip Semanchuk phi...@semanchuk.com wrote: I'm trying call Python from inside of a C thread that's running in a Python extension I've written and I am not having

Re: Calling into Python from a C thread

2009-02-09 Thread Philip Semanchuk
On Feb 9, 2009, at 2:35 PM, Christian Heimes wrote: Philip Semanchuk wrote: I didn't know there *was* such a thing. Thanks for the tip! For those who might be interested, the list is here: http://mail.python.org/mailman/listinfo/capi-sig FYI, I got my code working and it is in the latest

Re: How to call python from a foreign language thread (C++)

2009-02-05 Thread Philip Semanchuk
enough to release it) will be in the next version that should be out soon, so you will have a full working example with which to experiment. HTH, Philip -- http://mail.python.org/mailman/listinfo/python-list

[issue1757126] [PATCH] Fix ptcp154 encoding cyrillic_asian alias

2009-02-04 Thread Philip Jenvey
Changes by Philip Jenvey pjen...@users.sourceforge.net: -- title: Fix ptcp154 encoding cyrillic_asian alias - [PATCH] Fix ptcp154 encoding cyrillic_asian alias ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1757126

Re: How to call python from a foreign language thread (C++)

2009-02-03 Thread Philip Semanchuk
.html It includes the quote, The current thread state API doc, as you read it from top to bottom now, is in fact totally confusing for anyone who didn't develop Python himself I like! =) Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Calling into Python from a C thread

2009-02-02 Thread Philip Semanchuk
C, now I'm trying to add a call to a user-specified Python function. Thanks Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Process crash with no reason

2009-01-28 Thread Philip Semanchuk
On Jan 28, 2009, at 12:12 PM, gil.shi...@gmail.com wrote: On Jan 27, 5:59 pm, Philip Semanchuk phi...@semanchuk.com wrote: On Jan 27, 2009, at 10:34 AM, gil.shi...@gmail.com wrote: On Jan 27, 2:10 pm, Tim Golden m...@timgolden.me.uk wrote: Then how are you interacting with Sybase? I'm

Re: Profiling Python Apps on Mac?

2009-01-28 Thread Philip Semanchuk
On Jan 28, 2009, at 2:14 PM, RGK wrote: I'm writing a python app on a Mac (in Eclipse + PyDev w/ Python2.5 wxPython under OSX 10.4) As I make program architecture decisions, it would be nice to be able to profile the choices. Should I add that extra thread? Is this big-assed xml

Re: Process crash with no reason

2009-01-27 Thread Philip Semanchuk
On Jan 27, 2009, at 7:00 AM, gil.shi...@gmail.com wrote: On Jan 26, 8:40 pm, Philip Semanchuk phi...@semanchuk.com wrote: On Jan 26, 2009, at 1:13 PM, gil.shi...@gmail.com wrote: Hi All, I'm running a program that is acting as a nice interface to sybase' replication server. The program

Re: Process crash with no reason

2009-01-27 Thread Philip Semanchuk
On Jan 27, 2009, at 10:34 AM, gil.shi...@gmail.com wrote: On Jan 27, 2:10 pm, Tim Golden m...@timgolden.me.uk wrote: gil.shi...@gmail.com wrote: On Jan 26, 8:40 pm, Philip Semanchuk phi...@semanchuk.com wrote: On Jan 26, 2009, at 1:13 PM, gil.shi...@gmail.com wrote: Hi All, I'm running

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread Philip Semanchuk
On Jan 27, 2009, at 6:06 PM, joseph.a.mar...@gmail.com wrote: Greetings! I've heard enough raving about Python, I'm going to see for myself what all the praise is for! I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you even use an IDE for Python? Some people do; I don't.

Re: New to python, open source Mac OS X IDE?

2009-01-27 Thread Philip Semanchuk
On Jan 27, 2009, at 7:44 PM, James Stroud wrote: joseph.a.mar...@gmail.com wrote: Greetings! I've heard enough raving about Python, I'm going to see for myself what all the praise is for! I'm on a Mac. I use Netbeans for Java, PHP, and C if needed. Do you even use an IDE for Python? Any

Re: Process crash with no reason

2009-01-26 Thread Philip Semanchuk
On Jan 26, 2009, at 1:13 PM, gil.shi...@gmail.com wrote: Hi All, I'm running a program that is acting as a nice interface to sybase' replication server. The program is using the cherrypy web service for the GUI. The process is crashing every few days with no reason. In the log I can see INFO

Re: Why is it faster the second time ?

2009-01-25 Thread Philip Semanchuk
On Jan 23, 2009, at 12:46 PM, jalanb3 wrote: Hello the group, I am wondering why doctests run slower the first time. In the transcript below try is a script which finds and runs doctests in the current directory. It also shows how long it takes to run these tests. I added a new test which

Re: *.python.org broken?

2009-01-24 Thread Philip Semanchuk
On Jan 24, 2009, at 8:06 PM, tgvaug...@gmail.com wrote: Hi all, Is anybody else having trouble accessing sites (including www, docs, wiki) in the python.org tree, or is it just me? (Or just .au?) No problem here in Durham, NC, USA. -- http://mail.python.org/mailman/listinfo/python-list

Re: The First Law Of comp.lang.python Dynamics

2009-01-22 Thread Philip Semanchuk
On Jan 23, 2009, at 12:39 AM, Kay Schluehr wrote: Whatever sufficiently sophisticated topic was the initially discussed it ends all up in a request for removing reference counting and the GIL. Is this a variant of Godwin's Law for Python? --

Re: quick beginners List comprehension question

2009-01-21 Thread Philip Semanchuk
; to them I'll add the comment that list comprehensions are for *constructing* lists, not manipulating the elements thereof. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: quick beginners List comprehension question

2009-01-21 Thread Philip Semanchuk
On Jan 21, 2009, at 11:52 AM, Lou Pecora wrote: In article mailman.7691.1232554737.3487.python-l...@python.org, Philip Semanchuk phi...@semanchuk.com wrote: Other answers have been good; to them I'll add the comment that list comprehensions are for *constructing* lists, not manipulating

Re: Doubts related to subprocess.Popen()

2009-01-20 Thread Philip Semanchuk
On Jan 20, 2009, at 9:19 AM, srinivasan srinivas wrote: Do parent process will have different file descriptor in it for each subprocesses or paprent uses a single file descriptor for all? I really want to know creation of each subprocess will occupy an entry in parents'file descriptor

Re: python resource management

2009-01-19 Thread Philip Semanchuk
elements back in, making your minimalist script more and more like the real one. If the extreme memory usage problem is isolated to one component or section, you'll find it this way. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 weirdness

2009-01-17 Thread Philip Semanchuk
as crs_dep_hour, origin from flightdata where date = '01-05-2007' If a simple query like that doesn't work, I suspect you have something fundamental wrong with your setup. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem using python C API

2009-01-16 Thread Philip Semanchuk
). Since your module is called examplemodule, Python is looking for a function called initexamplemodule. Change your build step to build a module called example and not examplemodule and I think you'll be OK. bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Crashes

2009-01-14 Thread Philip Semanchuk
On Jan 14, 2009, at 3:57 PM, koranthala wrote: Hi, I have a twisted based application based on Python 2.4.3. I also have one thread in this application. I found that my program crashes repeatedly after a random interval (ranging from 10 min to 3 hr). When I say crash, it is not just

Re: urllib2 - 403 that _should_ not occur.

2009-01-13 Thread Philip Semanchuk
On Jan 13, 2009, at 1:22 AM, Steve Holden wrote: Philip Semanchuk wrote: On Jan 12, 2009, at 6:48 PM, ajaksu wrote: On Jan 11, 11:59 pm, James Mills prolo...@shortcircuit.net.au wrote: Hey all, The following fails for me: from urllib2 import urlopen f = urlopen(http://groups.google.com

Re: Standard IPC for Python?

2009-01-13 Thread Philip Semanchuk
, shared memory and messages queues: http://semanchuk.com/philip/posix_ipc/ sysv_ipc gives you semaphores and shared memory: http://semanchuk.com/philip/sysv_ipc/ shm also gives access to SysV semaphores and shared memory: http://nikitathespider.com/python/shm/ The only reason to use shm over

Re: Standard IPC for Python?

2009-01-13 Thread Philip Semanchuk
as well. Feel free to reinvent the wheel. Or, you could pitch in and help with what's already out there. bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Standard IPC for Python?

2009-01-13 Thread Philip Semanchuk
priority. bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Standard IPC for Python?

2009-01-13 Thread Philip Semanchuk
On Jan 13, 2009, at 2:01 PM, Laszlo Nagy wrote: I realize that lack of Windows support is a big minus for both of these modules. As I said, any help getting either posix_ipc or sysv_ipc working under Windows would be much appreciated. It sounds like you have access to the platform and

Re: Standard IPC for Python?

2009-01-13 Thread Philip Semanchuk
of certain semantics, and you might find it difficult to fulfill that promise in certain cases (e.g. implementing the POSIX function mq_notify() ). If you call them Nagy message queues then no one will be disappointed or surprised as long as your code implements FIFO IPC. Bye Philip -- http

Re: Standard IPC for Python?

2009-01-13 Thread Philip Semanchuk
On Jan 13, 2009, at 4:31 PM, drobi...@gmail.com wrote: On Jan 13, 2:37 pm, Philip Semanchuk phi...@semanchuk.com wrote: I was suggesting getting posix_ipc or sysv_ipc to compile against a compatibility library (Cygwin?) under Windows. It sounds like you're proposing something totally

Re: Standard IPC for Python?

2009-01-13 Thread Philip Semanchuk
On Jan 13, 2009, at 6:41 PM, Mel wrote: Philip Semanchuk wrote: I'm working on message queue support, but the Sys V IPC API is a headache and takes longer to code against than the POSIX API. I hadn't found it that bad. I have a C extension I should perhaps clean up and make public

Re: urllib2 - 403 that _should_ not occur.

2009-01-13 Thread Philip Semanchuk
On Jan 13, 2009, at 9:42 PM, ajaksu wrote: On Jan 13, 1:33 am, Philip Semanchuk phi...@semanchuk.com wrote: I don't think I understand you clearly. Whether or not Google et al whitelist the Python UA isn't a Python issue, is it? Hi, sorry for taking so long to reply :) I imagine it's

Re: Standard IPC for Python?

2009-01-13 Thread Philip Semanchuk
On Jan 13, 2009, at 11:26 PM, drobi...@gmail.com wrote: On Jan 13, 5:08 pm, Philip Semanchuk phi...@semanchuk.com wrote: On Jan 13, 2009, at 4:31 PM, drobi...@gmail.com wrote: On Jan 13, 2:37 pm, Philip Semanchuk phi...@semanchuk.com wrote: I was suggesting getting posix_ipc or sysv_ipc

Re: urllib2 - 403 that _should_ not occur.

2009-01-12 Thread Philip Semanchuk
On Jan 12, 2009, at 6:48 PM, ajaksu wrote: On Jan 11, 11:59 pm, James Mills prolo...@shortcircuit.net.au wrote: Hey all, The following fails for me: from urllib2 import urlopen f = urlopen(http://groups.google.com/group/chromium-announce/feed/rss_v2_0_msgs.xml ) Traceback (most recent

Re: urllib2 - 403 that _should_ not occur.

2009-01-11 Thread Philip Semanchuk
Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 - 403 that _should_ not occur.

2009-01-11 Thread Philip Semanchuk
On Jan 11, 2009, at 10:05 PM, James Mills wrote: On Mon, Jan 12, 2009 at 12:58 PM, Philip Semanchuk phi...@semanchuk.com wrote: On Jan 11, 2009, at 8:59 PM, James Mills wrote: Hey all, The following fails for me: from urllib2 import urlopen f = urlopen(http://groups.google.com/group

Re: if-else statement

2009-01-10 Thread Philip Semanchuk
that this expression was only added to Python in v2.5, so if you want your code to be compatible with versions of Python = 2.4, you should not use the ternary if. bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Imaging Library and textmate

2009-01-09 Thread Philip Semanchuk
but I don't know what you mean when you say you can't get TM to import a module. Can you give a little more context? There was a similar thread in this list with textmate but I can't understand how that issue was solved in the end. link? bye Philip -- http://mail.python.org/mailman

Re: Python Imaging Library and textmate

2009-01-09 Thread Philip Semanchuk
On Jan 9, 2009, at 12:19 PM, bilgin arslan wrote: Hi Philip, I tried to install PIL with the directions given and it seemed to be ok. When I tried it with IDLE, import Image did not give an error and as far as I checked it seemed to be working. However, importing Image module in TextMate

Re: mac osx how to use a specific python environment

2009-01-07 Thread Philip Semanchuk
the env in my python script. Hi Marco, I'm not exactly sure what you want to do. But if you execute `python` at the command line, OS X will launch whatever version of Python it finds first in your PATH. Hope this helps Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it ok to type check a boolean argument?

2009-01-07 Thread Philip Semanchuk
, first_name, age DESC. I can understand your temptation to enforce bool-ness, but you have a very good point about this one function then being different from all of the others that aren't as picky. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: pep-8 vs. external interfaces?

2009-01-06 Thread Philip Semanchuk
that I did it wrong :-) I promise to be the first to complain no matter what you choose. ;) Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: having problems with a multi-conditional while statement

2009-01-06 Thread Philip Semanchuk
On Jan 6, 2009, at 7:18 PM, bowman.jos...@gmail.com wrote: Hi, I'm trying to write a multi-conditional while statement, and am having problems. I've broken it down to this simple demo. #!/usr/bin/python2.5 condition1 = False condition2 = False while not condition1 and not condition2:

Re: How to declare python ints in C extensions?

2009-01-04 Thread Philip Semanchuk
about writing extensions from looking at the Python source code. Lots of valuable tricks to be learned there. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: multiprocessing vs thread performance

2008-12-31 Thread Philip Semanchuk
://poshmodule.sourceforge.net) Or sysv_ipc? Or posix_ipc? http://semanchuk.com/philip/sysv_ipc/ http://semanchuk.com/philip/posix_ipc/ Bug fix version of the latter coming out in a day or two... -- http://mail.python.org/mailman/listinfo/python-list

Re: SQL, lite lite lite

2008-12-29 Thread Philip Semanchuk
well at the latter. After a look at the syntax you're proposing, I wonder how you feel it differs from ORMs like SQLAlchemy (for instance). Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Django/Turbogears too specific?

2008-12-22 Thread Philip Semanchuk
On Dec 22, 2008, at 1:52 AM, Tino Wildenhain wrote: Philip Semanchuk wrote: ... I prefer Mako over the other template languages I've seen. From what I can tell Mako is nearly identical to all other template languages you might have seen (e.g. PHP style tags). Thats why I personally would

Re: Are Django/Turbogears too specific?

2008-12-21 Thread Philip Semanchuk
complicated because it's made of several different parts, but the positive side of complicated is flexible. Do you think I should just use eg. CherryPy and some basic AJAX? Yes or no, depending on what you're trying to do! =) Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Django/Turbogears too specific?

2008-12-21 Thread Philip Semanchuk
On Dec 21, 2008, at 3:14 PM, Bruno Desthuilliers wrote: Philip Semanchuk a écrit : (snip) From the reading I did, I gathered that Django was really good if you want to do what Django is good at, but not as easy to customize as, say, Pylons. That was my first impression too, and was more

[issue4702] [PATCH] msvc9compiler raises IOError when no compiler found instead of DistutilsError

2008-12-19 Thread Philip Jenvey
New submission from Philip Jenvey pjen...@users.sourceforge.net: Python 2.6's new msvc9compiler misbehaves when it can't find a compiler (actually a utility of the missing compiler) in its query_vcvarsall() -- it raises an IOError instead of a typical distutils error build tools expect

Re: Thread Locking issue - Can't allocate lock (sem_init fail)

2008-12-15 Thread Philip Semanchuk
is really big, start investigating kernel semaphore limits and how they're set. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: changing string encoding to different charset?

2008-12-14 Thread Philip Semanchuk
On Dec 14, 2008, at 9:21 AM, Daniel Woodhouse wrote: Is it possible to re-encode a string to a different character set in python? To be more specific, I want to change a text file encoded in windows-1251 to UTF-8. I've tried using string.encode, but get the error: UnicodeDecodeError: 'ascii'

Re: Parallelizing python code - design/implementation questions

2008-12-13 Thread Philip Semanchuk
IPC extensions useful. They're much less sophisticated than multiprocessing; they just give access to IPC semaphores and shared memory (no message queues yet) on Unix. POSIX IPC: http://semanchuk.com/philip/posix_ipc/ System V IPC: http://semanchuk.com/philip/sysv_ipc/ More System V IPC

<    1   2   3   4   5   6   7   >