Re: How to install local module other than in "site-packages"?

2010-01-18 Thread Jive Dadson
Thankee. I had just figgered that out. I wrote everything up in a message titled "The answer," but I accidentally created a new thread with it. I'll post it in this thread. -- http://mail.python.org/mailman/listinfo/python-list

Re: More version woes

2010-01-18 Thread Jive Dadson
Steven D'Aprano wrote: On Sun, 17 Jan 2010 23:15:28 -0800, Jive Dadson wrote: Sorry. That deprecation warning has nothing to do with the slowness. It does torque my jaw, however. Komodo costs money, and Python 2.6 broke it. @#^&!!! (Again.) So, the new question is, does anyone kn

Re: More version woes

2010-01-17 Thread Jive Dadson
Sorry. That deprecation warning has nothing to do with the slowness. It does torque my jaw, however. Komodo costs money, and Python 2.6 broke it. @#^&!!! (Again.) So, the new question is, does anyone know how to make Komodo 3.5 run at speed with Python 2.6? Or perhaps better yet, can someon

Re: Arrrrgh! Another module broken

2010-01-17 Thread Jive Dadson
Jive Dadson wrote: Matt Newville wrote: On Jan 17, 7:25 pm, Jive Dadson wrote: I just found another module that broke when I went to 2.6. > Gnuplot. Apparently one of its routines has a parameter named "with." That used to be okay, and now it's not. This was fixed

More version woes

2010-01-17 Thread Jive Dadson
This has to do with Komodo. I cannot use Python 2.4, because numpy is broken on my machine for that release for reasons unknown. I want to use 2.6 anyway. But when I use Python 2.6 and Komodo 3.5, it runs slow as death. I think it might have something to do with the warning I'm getting. Do

Re: Arrrrgh! Another module broken

2010-01-17 Thread Jive Dadson
Matt Newville wrote: On Jan 17, 7:25 pm, Jive Dadson wrote: I just found another module that broke when I went to 2.6. > Gnuplot. Apparently one of its routines has a parameter named "with." That used to be okay, and now it's not. This was fixed in version 1.8 of Gnupl

Re: The answer

2010-01-17 Thread Jive Dadson
alex23 wrote: > > Actually, if you're using Python 2.6+/3.x, you can effectively skip > steps 1-5, as these versions now support user site-packages. > > Rather than create a Module folder and modify your PYTHONPATH, add (if > it doesn't exist already) the following folder: > %APPDATA%/Python/Pytho

Re: Arrrrgh! Another module broken

2010-01-17 Thread Jive Dadson
Matt Newville wrote: On Jan 17, 7:25 pm, Jive Dadson wrote: I just found another module that broke when I went to 2.6. > Gnuplot. Apparently one of its routines has a parameter named "with." That used to be okay, and now it's not. This was fixed in version 1.8 of Gnupl

The answer

2010-01-17 Thread Jive Dadson
Okay, with your help I've figured it out. Instructions are below, but read the caveat by Ben Fenny in this thread. All this stuff is good for one default version of Python only. The PYTHONPATH described below, for example, cannot specify a version number. Yes, that's a pain in the butt, but

Re: Arrrrgh! Another module broken

2010-01-17 Thread Jive Dadson
Matt Newville wrote: Hey, good luck with that forever plan. --Matt Yeah, I know. I'm just glad I don't have to get new executables and dll's from all my software vendors every Tuesday when the MS Window XP updates come out. 2.6 FOREVER! -- http://mail.python.org/mailman/listinfo/python-li

The answer

2010-01-17 Thread Jive Dadson
Okay, with your help I've figured it out. Instructions are below, but read the caveat by Ben Fenny in this thread. All this stuff is good for one default version of Python only. The PYTHONPATH described below, for example, cannot specify a version number. Yes, that's a pain in the butt, but

Arrrrgh! Another module broken

2010-01-17 Thread Jive Dadson
I just found another module that broke when I went to 2.6. Gnuplot. Apparently one of its routines has a parameter named "with." That used to be okay, and now it's not. Once I get everything to work under 2.6, I am using it forever or until new releases no longer break working code, whicheve

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
Okay, I might go this route anyway. It's almost working. I created a directory (folder in MS-speak) named Modules, and put its path in the PYTHONPATH env variable. I can now put a file foo.py into the directory Modules, and it will load foo.py when I say "import foo." Now I put a folder in

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
Diez B. Roggisch wrote: Did "echo %PYTHONPATH%" yield anything? Or is it part of >>> import sys >>> sys.path ? Diez Update: It's working now. I guess I hadn't reloaded something that I need to. Thanks for your help. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
Diez B. Roggisch wrote: Did "echo %PYTHONPATH%" yield anything? Or is it part of >>> import sys >>> sys.path ? Diez Yes and no in that order. Never mind. Ben Fenny talked me out of it anyway. Gr. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
Ben Finney wrote: Jive Dadson writes: How do I install a module that I wrote, without putting it in the site-packages directory for a specific release? I have stuff that, to the best of my knowledge and belief, ought to work under any release. Nevertheless, the compiled byte-code

Re: How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
Diez B. Roggisch wrote: Am 18.01.10 01:07, schrieb Jive Dadson: (My apologies if this question shows up twice. I posted it quite a while ago, and it's yet to show up.) This is no doubt a beginner's question, but I've searched for the answer for quite a while, to no avail. I&#

How to install local module other than in "site-packages"?

2010-01-17 Thread Jive Dadson
(My apologies if this question shows up twice. I posted it quite a while ago, and it's yet to show up.) This is no doubt a beginner's question, but I've searched for the answer for quite a while, to no avail. I'm running Python 2.6 under Windows XP. How do I install a module that

Re: weekdays in range

2009-10-19 Thread Jive Dadson
I'm using weekdays as a proxy for days when the US stock market is open. (I'll miss holidays.) The application is pricing CALL and PUT options. Speed is not a problem. The number of days will typically be between 1 and 254. -- http://mail.python.org/mailman/listinfo/python-list

weekdays in range

2009-10-19 Thread Jive Dadson
(Sorry if this shows up twice.) Can someone think of an easy way to calculate the number of weekdays between two calendar dates (in Python)? Thankee. -- http://mail.python.org/mailman/listinfo/python-list

Re: weekdays in range

2009-10-18 Thread Jive Dadson
Wow. It's a danged tutorial. Thanks again. Take a break. -- http://mail.python.org/mailman/listinfo/python-list

Re: weekdays in range

2009-10-18 Thread Jive Dadson
Ben Finney wrote: Jive Dadson writes: Can someone think of an easy way to calculate the number of weekdays between two calendar dates (in Python)? That depends on what you mean by “weekdays”. >>> import datetime >>> begin_date = datetime.date(2009, 10, 9

Re: Once again, comparison wxpython with PyQt

2009-06-18 Thread Jive Dadson
Qt has far better documentation, and it has Qt Designer. The documentation is a big deal. I wrote a little project in wxPython, and I spent 90% of my time just trying to find the names of member functions and then to figure out what they do. Why not use Qt C++? I like Python a lot. Heck, I

Re: AT&T Usenet Netnews Service Shutting Down

2009-06-18 Thread Jive Dadson
newsmas...@bellsouth.net wrote: Please note that on or around July 15, 2009, AT&T will no longer be offering access to the Usenet Netnews service. If you wish to continue reading Usenet newsgroups, access is available through third-party vendors. http://support.att.net/usenet Distribution: AT

wxPython gurus, please help

2009-05-23 Thread Jive Dadson
I have an application that opens an image file of the user's choice. I have an exception handler for the case that the user selected a bad or unsupported image file. My code is catching the exception, but unfortunately for me, after I exit the except-clause, wxPython is popping up its own

Re: Cursor movement question

2009-05-23 Thread Jive Dadson
Aahz wrote: In article , Jive Dadson wrote: Gosh, you guys are slow. :-) I figured it out. Perhaps you could post the solution for posterity's sake? The double secret magic encantation is "WarpPointer." Unfortunately, it does not work in a plain vanilla ScrolledWindow.

Cursor movement question

2009-05-22 Thread Jive Dadson
Howdy, folks. I am using wxPython 2.8 on Windoze XP Pro. I want my application to move the cursor and the mouse-point (the coordinates in the mouse-click events) to the left when the user presses the left-arrow key, up when they press the up-arrow key, etc.. I think I can figure out how to g

Re: Cursor movement question

2009-05-21 Thread Jive Dadson
Gosh, you guys are slow. :-) I figured it out. -- http://mail.python.org/mailman/listinfo/python-list

Re: Which C compiler?

2009-05-18 Thread Jive Dadson
Martin v. Löwis wrote: Jive Dadson wrote: I am using Python 2.4. I need to make a native Python extension for Windows XP. I have both VC++ 6.0 and Visual C++ 2005 Express Edition. Will VC++ 6.0 do the trick? That would be easier for me, because the project is written for that one. If not

Re: Which C compiler?

2009-05-18 Thread Jive Dadson
P.s. I just found out that there's a new Express edition, 2008. (New to me, that is.) I'm installing it. -- http://mail.python.org/mailman/listinfo/python-list

Which C compiler?

2009-05-17 Thread Jive Dadson
I am using Python 2.4. I need to make a native Python extension for Windows XP. I have both VC++ 6.0 and Visual C++ 2005 Express Edition. Will VC++ 6.0 do the trick? That would be easier for me, because the project is written for that one. If not, will the 2005 compiler do it? Thanks much,

Re: urllib and login with passwords

2008-07-26 Thread Jive Dadson
Thanks, Rob! Some of that is beyond my maturity level, but I'll try to figure it out. If anyone has specific info on about how YouTube does it, I would appreciate the info. -- http://mail.python.org/mailman/listinfo/python-list

urllib and login with passwords

2008-07-26 Thread Jive Dadson
Hey folks! There are various web pages that I would like to read using urllib, but they require login with passwords. Can anyone tell me how to find out how to do that, both in general and specifically for YouTube.com. Thankee. -- http://mail.python.org/mailman/listinfo/python-list

Re: web client in Python Q

2008-05-08 Thread Jive Dadson
Jerry Hill wrote: On Wed, May 7, 2008 at 11:22 PM, Jive Dadson <[EMAIL PROTECTED]> wrote: I wonder why it does not work with http://stockcharts.com/webcgi/wb.exe?Data.web+SLW It looks like that is a subscription site. That makes things more complicated, because it means you'

Re: web client in Python Q

2008-05-07 Thread Jive Dadson
Thanks, Jerry! That's so cool. I actually managed to blunder through with sockets and so forth, but this is much cleaner. I wonder why it does not work with http://stockcharts.com/webcgi/wb.exe?Data.web+SLW I get a connection reset by peer error. -- http://mail.python.org/mailman/listinfo/p

web client in Python Q

2008-05-07 Thread Jive Dadson
Hey folks. I know approximately zero about web clients. There's a simple task I want to do. (I think it's probably simple.) And I figure a Python script ought to be just the ticket. Various web services for daily stock ticker info. For example, http://finance.google.com/finance/historical?q

Re: wxPython help please

2006-12-16 Thread Jive Dadson
Sandra-24 wrote: > Try the wxPython mailing list, which you can find on their site. And > the best wxPython reference is the book (also available as an e-book) > by Robin Dunn, who created wxPython. Seeing wxPython from his > perspective is well worth the money. If I recall correctly he devoted > a

Re: wxPython help please

2006-12-16 Thread Jive Dadson
Sandra-24 wrote: > Try the wxPython mailing list, which you can find on their site. And > the best wxPython reference is the book (also available as an e-book) > by Robin Dunn, who created wxPython. Seeing wxPython from his > perspective is well worth the money. If I recall correctly he devoted > a

wxPython help please

2006-12-16 Thread Jive Dadson
I hope someone can help me with a couple of wxPython questions, or point me to the right newsgroup for the questions. I am trying to modify the floatcanvas demo program. I want to load an image from a file (jpg or whatever), then do a kind of color-picker action on it. I haven't tried yet to

Re: Drawing a grid on a picture

2006-08-14 Thread Jive Dadson
Sybren Stuvel wrote: > Jive Dadson enlightened us with: >> I also found a reference to something called PIL. Maybe that's the >> ticket. If so, where can I find it (with documentation)? Thanks. > > Just google for PIL and Python. > > Sybren Thanks Brian and S

Re: Drawing a grid on a picture

2006-08-13 Thread Jive Dadson
I also found a reference to something called PIL. Maybe that's the ticket. If so, where can I find it (with documentation)? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Drawing a grid on a picture

2006-08-13 Thread Jive Dadson
Hello folks. I know precisely zero about image processing. I want to draw a grid of lines one or two pixels wide on a picture (.jpg, .png, or whatever). [I want to transfer a sketch of the picture to a canvas (for oil painting), using the "grid method."] I figure this is probably a very easy

new division in Pythonwin

2005-07-12 Thread Jive Dadson
I like to use Pythonwin as my desktop calculator. It's bothersome to have to type in "from __future__ import division" into the interactive window every time I open it. I've tried various ways to attempt to get it to import new division at startup, but no luck. I can get it to execute a file, bu

Re: negative integer division

2005-02-09 Thread Jive Dadson
intentionally -- http://mail.python.org/mailman/listinfo/python-list

Re: negative integer division

2005-02-09 Thread Jive Dadson
Grant Edwards wrote: > > On 2005-02-09, Jive Dadson <[EMAIL PROTECTED]> wrote: > > >> [C] isn't - it's a portable assembler. > > > > I've heard that many times, but it makes no sense to me. > > I think the point is that C is a low-

Re: negative integer division

2005-02-09 Thread Jive Dadson
Mike Meyer wrote: > > Jive Dadson <[EMAIL PROTECTED]> writes: > > > Python does it right. C is allowed to do it anyway it likes, which was > > a stupifyingly horrible decision, IMHO. > > C only does it wrong if you think that C is a high level language.

Re: Name of type of object

2005-02-09 Thread Jive Dadson
I don't think I've quite got it. The application I'm writing has some similarities to an interactive shell. Like an interactive shell, it executes arbitrary code that it receives from an input stream. When it gets an exception, it should create an informative message, regardless of the type of

Name of type of object

2005-02-08 Thread Jive Dadson
The traceback routine prints out stuff like, NameError: global name 'foo' is not defined NameError is a standard exception type. What if I want to print out something like that? I've determined that "global name 'foo' is not defined" comes from the __str__ member of the exception object

Re: interactive execution

2005-02-08 Thread Jive Dadson
Yeah. I got it. exec "foo = 555" in globals(), locals() does the trick. -- http://mail.python.org/mailman/listinfo/python-list

Re: interactive execution

2005-02-08 Thread Jive Dadson
Jeff Shannon wrote: > > Jive Dadson wrote: > > > How does one execute arbitrary text as code within a module's context? > > > > I've got some code that compiles some text and then executes it. When > > the string is "print 'Hello'&q

Re: negative integer division

2005-02-08 Thread Jive Dadson
Python does it right. C is allowed to do it anyway it likes, which was a stupifyingly horrible decision, IMHO. Way back when, there was a language named Pascal. I lobbied the Pascal standards committee to define the modulus operator correctly, which they eventually did. To my astonishment, they

Re: What's wrong with `is not None`?

2005-02-08 Thread Jive Dadson
Frans Englich wrote: > > That's what PyChecker tells me, at least. > > A line of: > > if testReport is not None: > > results in: > > runner.py:587: Using is not None, may not always work > > In what circumstances can `is not None` fail? How and why does it fail? > > What is the equivalent

interactive execution

2005-02-08 Thread Jive Dadson
How does one execute arbitrary text as code within a module's context? I've got some code that compiles some text and then executes it. When the string is "print 'Hello'", it prints "Hello". I get no exception when I compile and execute "foo = 555". If I then compile and exec "print foo", I get