Re: Problem in Installing PyGreSQL

2009-08-04 Thread Philip Semanchuk
ered already. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: WindowsError: exception: access violation writing 0x00000000

2009-08-04 Thread Philip Semanchuk
pect that all this will do is give you confidence that it isn't your Python code that's wrong. You might want to write a minimal C program that invokes ECount. That would help you to prove whether or not you have a working C (not C++!) interface for your function. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python to automate builds

2009-08-04 Thread Philip Semanchuk
On Aug 4, 2009, at 5:40 PM, Kosta wrote: On Aug 4, 2:34 pm, Dave Angel wrote: + I have released pyKook 0.0.2. +http://pypi.python.org/pypi/Kook/0.0.2 +http://www.kuwata-lab.com/kook/ +http://www.kuwata-lab.com/kook/pykook-users-guide.html Other possibilities: + http://pypi.python.org/pypi/

Re: access string data from within cython

2009-08-05 Thread Philip Semanchuk
On Aug 5, 2009, at 1:16 PM, Diez B. Roggisch wrote: Hi, I'm trying to wrap a C-API which has a call that takes a void* and a size_t as arguments. void foo(void *data, size_t length) The wrapper is supposed to be called with a python (byte)string instance, which might contain more than

Re: access string data from within cython

2009-08-05 Thread Philip Semanchuk
On Aug 5, 2009, at 5:19 PM, Diez B. Roggisch wrote: Philip Semanchuk schrieb: On Aug 5, 2009, at 1:16 PM, Diez B. Roggisch wrote: Hi, I'm trying to wrap a C-API which has a call that takes a void* and a size_t as arguments. void foo(void *data, size_t length) The wrapper is sup

Re: Character encoding & the copyright symbol

2009-08-06 Thread Philip Semanchuk
where you need to specify the encoding, but the Python docs should help you out. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Character encoding & the copyright symbol

2009-08-06 Thread Philip Semanchuk
On Aug 6, 2009, at 12:41 PM, Robert Dailey wrote: On Aug 6, 11:31 am, "Richard Brodie" wrote: "Robert Dailey" wrote in message news:29ab0981-b95d-4435-91bd-a7a520419...@b15g2000yqd.googlegroups.com ... UnicodeEncodeError: 'charmap' codec can't encode character '\xa9' in position 1650: c

Re: Character encoding & the copyright symbol

2009-08-06 Thread Philip Semanchuk
On Aug 6, 2009, at 3:14 PM, Martin v. Löwis wrote: As a side note, you should probably use something other than "file" for the parameter name in GetFileContentsAsString() since file() is a Python function. Python 3.1.1a0 (py3k:74094, Jul 19 2009, 13:39:42) [GCC 4.3.3] on linux2 Type "help

Re: i Don't get why it makes trouble

2009-08-13 Thread Philip Semanchuk
QL will break due to mismatched single quotes. This kind of code is vulnerable to SQL injection attacks: http://en.wikipedia.org/wiki/SQL_injection Parameterized SQL is safer. Googling for 'parameterized SQL Python' should find some examples for you. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: i Don't get why it makes trouble

2009-08-13 Thread Philip Semanchuk
On Aug 13, 2009, at 6:00 PM, azrael wrote: On 13 kol, 22:09, Philip Semanchuk wrote: On Aug 13, 2009, at 2:56 PM, azrael wrote: j [u'Tata', u'Oriovac', u'PrimorskoGoranska', u'hrvatska', u'Kuna'] len(j) 5 h = """SE

Re: Help with arrays

2009-08-25 Thread Philip Semanchuk
to do it (not necessarily efficient) is to make a list of your possible guesses (e.g. range(1,10)), use random.shuffle() to put them in random order and then run through the guesses one at a time. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: codecs.open on Win32 -- converting my newlines to CR+LF

2009-08-26 Thread Philip Semanchuk
he newlines ("\n") are replaced with CR+LF ("\r \n") ... Why? Try using "rb" instead of "r" for the mode in the call to open(). HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Combining C and Python programs

2009-08-29 Thread Philip Semanchuk
k for you for some reason and you're willing to use something outside of the standard library, you might find Cython useful. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Entry Level Python Jobs

2009-09-02 Thread Philip Semanchuk
d say, "I wrote that". Anyway, it's something to do in between hitting refresh on http://www.python.org/community/jobs/ Good luck to you Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: cross platform distribution

2009-09-04 Thread Philip Semanchuk
On Sep 4, 2009, at 4:44 AM, vpr wrote: Hi All After a couple of experiments, searching around and reading Steve Holden's lament about bundling and ship python code, I thought I'd direct this to to the group. I'm using Python 2.6 btw. I've build a commercial application that I'd like to bundle

Re: cross platform distribution

2009-09-04 Thread Philip Semanchuk
On Sep 4, 2009, at 9:24 AM, vpr wrote: On Sep 4, 3:19 pm, Philip Semanchuk wrote: On Sep 4, 2009, at 4:44 AM, vpr wrote: Hi All After a couple of experiments, searching around and reading Steve Holden's lament about bundling and ship python code, I thought I'd direct this

Re: How do I post to the wxPython mailing list?

2009-09-07 Thread Philip Semanchuk
On Sep 7, 2009, at 12:52 PM, mma...@gmx.net wrote: Hi Since I have been told in this group to post wxPython related topics in the wxPython-users mailing list instead of here, I just tried doing that. However, I always get an error message back when using gmane. Mailing directly, there is n

Re: Python C/API Problem

2009-09-11 Thread Philip Semanchuk
i do some mistakes, but where? Hi G, With some basic debugging you should at least be able to figure out on which line the segfault happens. Have you done that? bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python/MySQL Frustration

2009-09-20 Thread Philip Semanchuk
debugger? Simplify your code, for your sake and ours. Begin commenting out lines, starting with cursor.execute(sql) and working your way up to the first line below the while statement. (You can replace the cursor.execute() with a print statement to monitor the value of i.) Does your infinite loop disappear when you get rid of that stuff? HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python: automate input to MySQL query

2009-09-21 Thread Philip Semanchuk
to this: WHERE traveler.travelerFirstName = %s""") and pass person as a list of params to db.query(). Something like this should work: sql = """SELECT blah blah blah WHERE traveler.travelerFirstName = %s""" db.query(sql, [person]) See the Python DB API documentation for specifics. This might look like the same thing as string interpolation, but it isn't. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: pycopg2 build problems

2009-09-23 Thread Philip Semanchuk
ctory missing. Any help is appreciated. Try asking on the psycopg2 mailing list. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

RE: Speed-up for loops

2010-09-02 Thread Philip Bloom
Uh. Try: Imax=10 a=0 i=0 While(imailto:python-list-bounces+pbloom=crystald@python.org] On Behalf Of Nobody Sent: Thursday, September 02, 2010 9:05 AM To: python-list@python.org Subject: Re: Speed-up for loops On Thu, 02 Sep 2010 12:02:40 +0200, Michael Kreim wrote: > I was comparin

Re: Extracting item from list of tuples?

2010-09-05 Thread Philip Semanchuk
On Sep 5, 2010, at 1:09 PM, Roy Smith wrote: I'm using httplib, and want to get the Location header from the response. The getheaders() method gives you back a list of (name, value) tuples. It would be a lot more convenient if it gave you back a dict, but it is what it is. Anyway, I came

Re: Extracting item from list of tuples?

2010-09-05 Thread Philip Semanchuk
On Sep 5, 2010, at 1:45 PM, Peter Otten wrote: Philip Semanchuk wrote: On Sep 5, 2010, at 1:09 PM, Roy Smith wrote: I'm using httplib, and want to get the Location header from the response. The getheaders() method gives you back a list of (name, value) tuples. It would be a lot

Re: self-closing window with wxPython

2010-09-17 Thread Philip Semanchuk
s an event and I'll bet that would have the same effect as moving the mouse over it. 3) Both the wxPython and wxWidgets mailing lists are probably better places to ask for help on wxPython. Good luck Philip > > == > > class MyThread(threading.Thread): >d

Re: Standard library function to remove folder with files and subfolders?

2010-09-18 Thread Philip Semanchuk
removedirs()? In Python 2.x: shutil.rmtree() Might have moved in Python 3.x. HTH Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: This Is International Don’t-Squawk-Like-A -Parrot Day

2010-09-19 Thread Philip Semanchuk
On Sep 19, 2010, at 7:37 AM, Tim Chase wrote: > On 09/18/10 23:46, Lawrence D'Oliveiro wrote: >> Do your bit to help stamp out parrocy. > > Did you send this by mistake? It looks like a parroty-error. I think it's a > bit off... What an wkward thing to say. Are you crackers? -- http://m

Re: Down with tinyurl! (was Re: importing excel data into a python matrix?)

2010-09-19 Thread Philip Semanchuk
On Sep 19, 2010, at 6:05 PM, Xavier Ho wrote: > On 20 September 2010 07:59, Ken Watford > >> wrote: > >> >> Not that I disagree with you, but you might find this helpful: >> http://tinyurl.com/preview.php >> -- >> http://mail.python.org/mailman/listinfo/python-list >> > > I don't think the O

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Philip Semanchuk
ng Python >= 2.6 since Fedora 11 which was released in June of 2009. http://distrowatch.com/table.php?distribution=fedora bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread Philip Semanchuk
ng Python >= 2.6 since Fedora 11 which was released in June of 2009. http://distrowatch.com/table.php?distribution=fedora bye Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing error for ConfigParser

2010-09-23 Thread Philip Semanchuk
n't like into something ConfigParser finds more palatable. Or if you're not interested in those lines, parse the error message, delete the offending lines and re-run the INI file through ConfigParser. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: if the else short form

2010-09-29 Thread Philip Semanchuk
til you're more familiar with programming > in Python. Does Python make any guarantee that int(True) == 1 and int(False) == 0 will always hold, or are their values an implementation detail? Thanks Philip > On 29 September 2010 11:42, Tracubik wrote: > >> Hi all, >> I&

how to test get_special_folder_path()?

2010-09-29 Thread Philip Semanchuk
ound with these functions outside of a post-install script? It's time-consuming to install something just to experiment with a single function. Thanks Philip -- http://mail.python.org/mailman/listinfo/python-list

Strange os.stat behavior

2010-09-29 Thread Philip Bloom
I'm on python 2.6.1: Ran into some os.stat behavior that knocked me for a loop. I was using os.stat to retrieve file st_ctime and st_mtime from a remote server through a unc path, and doing this I encountered that os.stat was returning me st_ctime and st_mtime values that were months off, rep

Re: SQLite is quite SQL compliant

2010-10-02 Thread Philip Semanchuk
ns. One just has to hope that the bits one needs are not in the missing 2-10%. I agree with the OP that the Python doc description of SQLite, while factually correct, seems a bit severe. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLite is quite SQL compliant

2010-10-03 Thread Philip Semanchuk
ta > or configuration parameters. Use MySQL or Postgres for your > web site. Granted, but we're talking about whether or not SQLite complies with the SQL standard, not whether it's suitable for an e-commerce Web site or running the NYSE. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling as 32bit on MacOSX

2010-10-12 Thread Philip Semanchuk
On Oct 12, 2010, at 8:29 PM, Gregory Ewing wrote: > I'm getting my Python environment set up on a new > Snow Leopard machine, and I'd like to compile everything > in 32 bit mode for the time being, because some of the > extensions I need use APIs that aren't available in > 64 bit. > > Is there s

Re: Compiling as 32bit on MacOSX

2010-10-13 Thread Philip Semanchuk
On Oct 13, 2010, at 3:54 AM, Gregory Ewing wrote: > Philip Semanchuk wrote: > >> Hi Greg, >> Are you talking about compiling Python itself or extensions? > > I've managed to get Python itself compiled as 32 bit, > and that also seems to take care of extension

Re: Does everyone keep getting recruiting emails from google?

2010-10-14 Thread Philip Semanchuk
speech again. FWIW, I got one email from Charles Nguyen and answered with a "thanks but no thanks". I have not heard from him again. He's perhaps casting too broad a net but the email I got looked legitimately from Google, judging by the headers. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: get python bit version as in (32 or 64)

2010-10-19 Thread Philip Semanchuk
tions/1405913/how-do-i-determine-if-my-python-shell-is-executing-in-32bit-or-64bit-mode Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: get python bit version as in (32 or 64)

2010-10-19 Thread Philip Semanchuk
On Oct 19, 2010, at 5:38 PM, Hexamorph wrote: > On 19.10.2010 23:18, Vincent Davis wrote: >> How do I get the bit version of the installed python. In my case, osx >> python2.7 binary installed. I know it runs 64 bt as I can see it in >> activity monitor. but how do I ask python? >> sys.version >>

Re: Help Need in running a Python Program from terminal

2010-10-25 Thread Philip Semanchuk
" which is the problem you're having. It seems like what you downloaded is expecting to find a .mo file but can't. You might want to check the package instructions on openastro.org to make sure there's not more you need to do to install it. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.7 or 3.1

2010-10-26 Thread Philip Semanchuk
xtra to get the full power of SQLite. Depending on what you want to do, that might be perfect for your needs. It's been part of Python since 2.5. If you need a heavy-duty database, I recommend checking out PostgreSQL. I've always found it solid and easy to use. Have fun Philip

Re: Create a GUI and EXE for a python app?

2010-10-28 Thread Philip Semanchuk
ny tradeoffs to be considered. If this is your first Python app, I'd say keep it simple and stick with Tkinter. Worry about the fancy stuff later. Good luck Philip > > --Original Message-- > From: Chris Rebert > Sender: ch...@rebertia.com > To: Braden Faulkner >

Re: Compiling/Installing Python 2.7 on OSX 10.6

2010-11-04 Thread Philip Semanchuk
t; are from one of the final install steps that produces optimized .pyc and > .pyo versions of all of the standard library .py files. The ._ files > aren't python files but they do end in .py so compileall mistakenly > tries to bytecompile them, too. You might want to try this

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Philip Semanchuk
ce that's pretty dense. In fact, older versions of the Python doc used to describe this section as "for language lawyers" but I see they've changed that now. BTW the more common name for this character is caret (ka-RAY). Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Philip Semanchuk
On Nov 5, 2010, at 12:43 PM, Peter Pearson wrote: > On Fri, 5 Nov 2010 10:12:05 -0400, Philip Semanchuk wrote: >> >> BTW the more common name for this character is caret (ka-RAY). > > Yes, it's caret, but no, it's KA-rit, almost the same as > carrot. It

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Philip Semanchuk
On Nov 5, 2010, at 5:21 PM, Nobody wrote: > On Fri, 05 Nov 2010 10:12:05 -0400, Philip Semanchuk wrote: > >> As others have said, ^ is for XOR. That's buried here in the >> documentation: >> http://docs.python.org/release/2.7/reference/... >> >> Not

Re: Silly newbie question - Carrot character (^)

2010-11-05 Thread Philip Semanchuk
her are decorators, assert(), global, exec, the ternary if statement, etc. It seems that plowing through a document written for language lawyers is the only formal way to learn about those language features, and that could be improved upon IMO. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Silly newbie question - Carrot character (^)

2010-11-06 Thread Philip Semanchuk
On Nov 6, 2010, at 12:33 AM, Steven D'Aprano wrote: > On Fri, 05 Nov 2010 23:21:11 -0400, Philip Semanchuk wrote: > >> Take the OP's question. How is one supposed to find out about bitwise >> operators in Python? AFAICT they're not mentioned in the tutori

Re: Silly newbie question - Carrot character (^)

2010-11-07 Thread Philip Semanchuk
On Nov 6, 2010, at 10:45 AM, D'Arcy J.M. Cain wrote: > On Sat, 6 Nov 2010 10:22:47 -0400 > Philip Semanchuk wrote: >>> The tutorial isn't meant as an exhaustive lesson on every single Python >>> feature. >> >> I agree, and I don't expect othe

Re: Silly newbie question - Caret character (^)

2010-11-09 Thread Philip Semanchuk
ify things. What's funny is that I went looking for a printed copy of the C standard a few years back and the advice I got was that the cheapest route was to find a used copy of Schildt's "Annotated ANSI C Standard" and ignore the annotations. So it serves at least one useful purpose. Cheers Philip -- http://mail.python.org/mailman/listinfo/python-list

Re: Copy Protected PDFs and PIL

2010-11-11 Thread Philip Semanchuk
On Nov 11, 2010, at 3:28 PM, Brett Bowman wrote: > I'm trying to parse some basic details and a thumbnail from ~12,000 PDFs for > my company, but a few hundred of them are copy protected. To make matters > worse, I can't seem to trap the error it causes: whenever it happens PIL > throws a "FATAL

Question regarding building Python Windows installer

2013-07-15 Thread Mcadams, Philip W
ws Server 2008 R2 box. To explain why I'm attempting to do this instead of just using the Windows Installer provided by Python: I needed to modify a _ssl.c file in the Python source code to deal a Mercurial that I'm trying to resolve. Any help on why I'm hitting these errors wo

RE: Question regarding building Python Windows installer

2013-07-15 Thread Mcadams, Philip W
\Python-2.7.4\Modules to my environment variables in Windows. Wasn't exactly following your comment. Thank you. Philip McAdams Systems Administrator - NVM Solutions Group Systems Engineering Apps & Infrastructure Desk: (916) 377-6156 Cell: (916) 534-0092 Pole: FM3-1-D7 -Origina

RE: Question regarding building Python Windows installer

2013-07-15 Thread Mcadams, Philip W
ation where did indeed need to make a fix to Python I've wondered what's the best way to do that. Hopefully this gives you a little insight on what I'm trying to do. Thanks for your replies. Thank you. Philip McAdams Systems Administrator - NVM Solutions Group Syst

Source code of Windows installer for Python interactive interpreter

2012-12-28 Thread philip . a . molloy
I am writing a command-line application for Windows. I would like to review the Python source code to find out how to install my application so that it doesn't have to be called using the path and file name (i.e. being able to type `python` into the Command prompt, instead of `C:\path\to\execut

Getting Syslog working on OSX Monterey

2022-02-27 Thread Philip Bloom via Python-list
[CA= Sender appName] file /var/log/appName/appName.log My end goal is really to get just a working python logging -> var/log/appname/appname.log again so glad to just be pointed in the right direction if way off base. -- Philip Bloom Director, Services Engineering *AppLovin Corporation* M: (786

Re: Getting Syslog working on OSX Monterey

2022-02-27 Thread Philip Bloom via Python-list
OS Syslogd -> parsed ASL config -> /var/log/Appname/Appname.log). It's why I think I may be missing something fundamental, but it feels like something subtle changed in the latest OSX. On Sun, Feb 27, 2022 at 11:26 AM Dennis Lee Bieber wrote: > On Sun, 27 Feb 20

Re: Getting Syslog working on OSX Monterey

2022-03-02 Thread Philip Bloom via Python-list
er| Story must make more sense than reality. > > |_|_) || > > | | | h...@hjp.at |-- Charles Stross, "Creative writing > > __/ | http://www.hjp.at/ | challenge!" > > -- > > https://mail.python.org/mailman/listinfo/pytho

Re: Getting Syslog working on OSX Monterey

2022-03-03 Thread Philip Bloom via Python-list
dback. On Thu, Mar 3, 2022 at 10:32 AM Barry Scott wrote: > > > On 3 Mar 2022, at 03:01, Philip Bloom wrote: > > I'm probably asking on the wrong list, and probably should bother wherever > apple's ASL experts live for changes in monterey. Guess nobody else is > see

<    1   2   3   4   5