Bizarre behavior of the 'find' method of strings

2011-08-10 Thread Jim
y reason why this is not happening. So, can anybody help me out about this? Thank you very much. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Bizarre behavior of the 'find' method of strings

2011-08-10 Thread Jim
Thanks for all you guys. Now I got it. To Steven, I was in a little rush when I put this post. But you are right. It's not the find method's problem. -- http://mail.python.org/mailman/listinfo/python-list

Re: Literate Programming

2011-04-08 Thread Jim
On Apr 7, 2:09 pm, Hans Georg Schaathun wrote: > Has anyone found a good system for literate programming in python? Are you aware of pyweb http://sourceforge.net/projects/pywebtool/ ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Literate Programming

2011-04-09 Thread Jim
ch provide the > features of reST directly in LaTeX.  Do you know of a good candidate? What features? Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: This newsgroup (comp.lang.python) may soon be blocked by Google Gro

2018-02-09 Thread Jim
Surely you mean NNTP/Usenet client. That's what he said :-) Thunderbird does both mail and news. Or at least it did, last time I checked. It does, using it for this reply. Regards, Jim -- https://mail.python.org/mailman/listinfo/python-list

Using sudo with pip3?

2017-01-06 Thread jim
t something to install. So is it necessary or even desirable to use sudo with pip3? Thanks, Jim -- https://mail.python.org/mailman/listinfo/python-list

Re: Using sudo with pip3?

2017-01-07 Thread jim
using Selenium and paste it into Libreoffice Calc spreadsheets. Will using virtualenv have any effect on me running those scripts? Thanks, Jim Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Using sudo with pip3?

2017-01-07 Thread jim
On 01/07/2017 03:17 PM, Dennis Lee Bieber wrote: On Sat, 7 Jan 2017 12:22:45 -0600, jim declaimed the following: What is "system python"? If I do $ which python I get /usr/bin/python which points to python 2.7xx. So if everything I added was for python 3 either using pip3 or apt-g

Re: Using sudo with pip3?

2017-01-07 Thread jim
tories but the module pandas-datareader, which I may need to use, is not. Regards, Jim On Sat, Jan 7, 2017 at 4:39 PM, Chris Angelico wrote: On Sun, Jan 8, 2017 at 9:34 AM, Michael Torrie wrote: On 01/07/2017 11:39 AM, Clint Moyer wrote: All Linux operating systems come with Python insta

Re: Using sudo with pip3?

2017-01-07 Thread jim
On 01/07/2017 08:42 PM, Cameron Simpson wrote: On 07Jan2017 19:45, jim wrote: On 01/07/2017 05:58 PM, Clint Moyer wrote: So to minimize your issues with installing Python packages, take the path of least resistance and install through your system repo. And use Python2 or Python3 explicitly to

pyuno in Libreoffice 5.1.4.2

2017-01-22 Thread Jim
NV/enter_INV.py", line 112, in move_selected_cell cell = sheet.cellrange[cellRow + row, cellCol + col] AttributeError: cellrange Or maybe I am misunderstanding how to use it. Regards, Jim [1] https://cgit.freedesktop.org/libreoffice/core/commit/?id=af8143bc40cf2cfbc12e77c9bb7de01b6

Re: pyuno in Libreoffice 5.1.4.2

2017-01-22 Thread Jim
On 01/22/2017 07:02 PM, MRAB wrote: On 2017-01-23 00:10, Jim wrote: Does anyone know if the changes outlined here [1] have been implemented? Supposedly changes have been made to pyuno to make it more pythonic. Item 2 Cellranges says that: cell = sheet.getCellByPosition(cellCol + col, cellRow

How to write libreoffice python macros in venv?

2017-01-30 Thread Jim
other necessary modules so I can write calc macros in it? Thanks, Jim -- https://mail.python.org/mailman/listinfo/python-list

Problems after upgrading Python 3.6.3 to 3.6.5

2018-05-09 Thread Jim
tkinter working again in 3.5. Regards, Jim (1) Commit Log for Thu May 3 13:26:38 2018 Removed the following packages: python3-tk Upgraded the following packages: libpython3.6-minimal (3.6.3-1ubuntu1~16.04.york1) to 3.6.5-5~16.04.york0 libpython3.6-stdlib (3.6.3-1ubuntu1~16.04.york1) to

Python 3.6 causes error, python 3.5 does not.

2018-05-20 Thread Jim
ce problem, file corruption or a Python problem. The fact that 3.6 gives an error but 3.5 does not is the reason I decided to ask here first. Regards, Jim -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3.6 causes error, python 3.5 does not.

2018-05-21 Thread Jim
On 05/20/2018 02:03 PM, Jim wrote: Mint 18 Libreoffice 5.1.6.2 Python 3.6.5 in one virtual environment Python 3.5.2 in another I am writing a script that uses pyautogui to get some data and paste it into a Libreoffice calc file, there by bypassing the complexity of uno. The problem is it

Looking for a Scrapy cheatsheet

2018-09-13 Thread Jim
able. So does anyone know of a cheatsheet I can download. Thanks, Jim -- https://mail.python.org/mailman/listinfo/python-list

Re: Looking for a Scrapy cheatsheet

2018-09-14 Thread Jim
On 09/14/2018 01:27 AM, Danyelle Davis wrote: The one that sans provides seems pretty decent. Did you not like it? What is sans? Do you have a url. Thanks, Jim On Thu, Sep 13, 2018 at 4:05 PM Jim wrote: I'm in the process of learning Scrapy. I've read through the docs and a

Re: Looking for a Scrapy cheatsheet

2018-09-14 Thread Jim
On 09/14/2018 08:15 AM, Jim wrote: On 09/14/2018 01:27 AM, Danyelle Davis wrote: The one that sans provides seems pretty decent. Did you not like it? What is sans? Do you have a url. Thanks,  Jim Nevermind. I googled scrapy sans and I think we are talking about two different programs with

Re: Python3 packages installation

2018-10-10 Thread Jim
install a package called 'python3-pip'. At least that's what I had to do on Ubuntu. Regards, Jim -- https://mail.python.org/mailman/listinfo/python-list

Re: why no camelCase in PEP 8?

2020-05-19 Thread Jim
Me: "Well, I guess that's the point then, isn't it." ChrisA Couldn't resist: Why not Chris_A :) Jim -- https://mail.python.org/mailman/listinfo/python-list

Re: why no camelCase in PEP 8?

2020-05-19 Thread Jim
On 5/19/20 3:49 PM, Chris Angelico wrote: On Wed, May 20, 2020 at 6:38 AM Jim wrote: On 5/19/20 1:24 PM, Chris Angelico wrote: On Wed, May 20, 2020 at 4:03 AM Schachner, Joseph wrote: And, because '_' looks sort of like a space, the individual words are more easil

Does this dataframe look correct?

2020-06-28 Thread Jim
A couple of people reported a work around using try/except. It worked for some people and not others. It didn't work for me. I'd appreciate any advice you could give. Thanks, Jim -- https://mail.python.org/mailman/listinfo/python-list

Re: Does this dataframe look correct?

2020-06-28 Thread Jim
On 6/28/20 8:53 PM, MRAB wrote: On 2020-06-28 23:11, Jim wrote: linux mint 19.3, python 3.6 I wrote a program to download stock info from yahoo using yfinance. I have been running it unchanged for the past 3 months, today it gave an error. When looping through a list of stocks the error is

Re: Does this dataframe look correct?

2020-06-29 Thread Jim
On 6/29/20 2:16 AM, Peter Otten wrote: Jim wrote: linux mint 19.3, python 3.6 I wrote a program to download stock info from yahoo using yfinance. I have been running it unchanged for the past 3 months, today it gave an error. When looping through a list of stocks the error is random, never

Re: A rule for your twitlist/mailing list

2020-07-16 Thread Jim
-- Grant I think that should now be news.gmane.io, at least that's how I get comp.python. I think gmane.org shut down. Regards, Jim -- https://mail.python.org/mailman/listinfo/python-list

Set up Windows environment with python

2005-09-29 Thread Jim
this sort of system preperation scripting? Thanks, -Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Set up Windows environment with python

2005-09-29 Thread Jim
Thanks Thomas! That did it. I can now set the wallpaper, mouse shadows, menu shadows, and I can disable the screensaver. Does anyone know how I can adjust the power options? I want to make sure any hibernate or standby options are set to Never. Thanks, -Jim -- http://mail.python.org/mailman

MS Word Outline -> reStructuredText script?

2005-10-14 Thread Jim
Structured Text? If not I've got a fun project ahead of me. Thanks, -Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: MS Word Outline -> reStructuredText script?

2005-10-14 Thread Jim
cBook, I just need to do the opposite. http://www-128.ibm.com/developerworks/library/x-matters24/?ca=dnt-45 -Jim -- http://mail.python.org/mailman/listinfo/python-list

urlencode with high characters

2005-11-02 Thread Jim
to convert to ASCII? # encode generates a string, but "replace" or "ignore" # lose information and "strict" can raise UnicodeError v = quote_plus(v.encode("ASCII","replace")) l.append(k + '=' + v) so I think that it is *not* liking latin-1. Thank you, Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: lists <-> tuple

2005-11-02 Thread Jim
ces are they do everything you're intending to implement. Immutability example: tup = ("a", "b", "c") tup[1] = "g" Traceback (most recent call last): File "", line 1, in ? TypeError: object does not support item assignment lst = ["

Re: generate HTML

2005-11-15 Thread Jim
Perhaps you are trying to do this: 'text to go here: %s' % ('text',) ? For that you need a double-quoted string: "text to go here: %s" % ('text',) (or triple-doubles: """ .. """ as you noted). Jim -- http://mail.python.org/mailman/listinfo/python-list

zipfile and soft links

2005-12-07 Thread Jim
g (e.g., what if the soft link is to '/bin/ls' ?). Thanks, Jim Hefferon -- http://mail.python.org/mailman/listinfo/python-list

Images & Connected Component labeling

2005-12-08 Thread Jim
ss/helpdesk_r13/help/toolbox/images/getting3.html Thanks, -Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: newby question: Splitting a string - separator

2005-12-08 Thread Jim
Hi Tom, > a regex for "more than one whitespace". RegEx for whitespace is \s, but > what would i use for "more than one"? \s+? For more than one, I'd use \s\s+ -Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Upgraded to python2.3 but httpd taking old version

2005-01-11 Thread Jim
ur file say #!/usr/bin/python2.3 (or whatever is appropriate for your system)? Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: script to automate GUI application (newbie)

2005-01-18 Thread Jim
It sounds like a case for the Expect program, to me. Try Google-ing for "Expect". If you are looking for a Python approach, then try googling for "Expect Python". Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: create a pdf file

2005-06-24 Thread Jim
If it is a plain text file (or close to it, like the Gutenburg Project files), think about using pdfLaTeX. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Search Engine app

2005-09-15 Thread Jim
it is in an early stage of development). Jim -- http://mail.python.org/mailman/listinfo/python-list

Loop in list.

2005-02-08 Thread Jim
Where did this type of structure come from: mat = ['a' for i in range(3)]? This will produce a list of three elements but I don't see reference for it in any of the books. -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop in list.

2005-02-08 Thread Jim
Thanks for the help. Python is somewhat ïmysterious to an old fortan programer. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop in list.

2005-02-08 Thread Jim
Particularly one who can't spell. Fortran. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop in list.

2005-02-09 Thread Jim
Wow! All I wanted to do was write the equivalence of the Fortran statement: Real*4 matrix(n,n). I'm going to have to go to the intrepreter to see what your saying. Thanks for all the help. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop in list.

2005-02-10 Thread Jim
I did appreciate the reference. I started with Fortran on an IBM (7040 maybe, not sure) using keypunched cards. Some of the concepts of the newer languages take some to seem useable. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Loop in list.

2005-02-10 Thread Jim
use a different language. Thanks for the help. Jim -- http://mail.python.org/mailman/listinfo/python-list

beeping portably

2005-03-20 Thread Jim
offered in the past seem not to satisfy both points. For instance, that I can tell, "\a" or curses.beep() doesn't give you control over the frequency or duration. I also looked at wxWindows but there were warnings about the MMedia module ("status is unclear") th

Re: Python for a 10-14 years old?

2005-03-24 Thread Jim
My kids like http://www.alice.org (although they run it under Windows). Jim Hefferon -- http://mail.python.org/mailman/listinfo/python-list

Re: Archives and magic bytes

2005-03-25 Thread Jim
feel that you completely understand which steps are working (I think I use popen2, IIRC, and capture stderr for error messages). Perhaps this is mostly a reflection on me as a programmer :-} but I found the job surprisingly tricky. Jim -- http://mail.python.org/mailman/listinfo/python-list

import and scope inconsistency?

2005-04-04 Thread Jim
couldn't use Numeric methods. What's going on? Thanks Jim O'Donnell -- http://mail.python.org/mailman/listinfo/python-list

Re: Raise Error in a Module and Try/Except in a different Module

2005-04-04 Thread Jim
tried in Module B import ModuleA ... class(): ... try: a = ModuleA.FUNC1 except ModuleA.EXCP1: print 'catch' But It does not work. What is wrong? I'm just back from holiday so rusty but I tried to do this w few weeks ago. What's the error? Jim -- http://mail.python.org/mai

Re: Raise Error in a Module and Try/Except in a different Module

2005-04-04 Thread Jim
You're not *calling* FUNC1 here, you're just assigning a reference to it to the name 'a'. Try FUNC1() instead. Oh yeah. -- http://mail.python.org/mailman/listinfo/python-list

Re: import and scope inconsistency?

2005-04-04 Thread Jim
Heiko Wundram wrote: You're putting a Reply-To header in your posts to the mailing-list, but the Reply-To address bounces. Please correct: on't put in a Reply-To header, or at least put in some address that doesn't bounce. Thanks -- http://mail.python.org/mailman/listinfo/python-list

A beginer question about SOAP and Python: : {}

2005-04-12 Thread Jim
Hi all, I am new to SOAP and Python. I am practicing learning SOAP with Python. I sent a request and I got the following response: : {} What does that mean? and how can I print the result hash string ? Please reply to the group. Thanks for your help. Jim. -- http://mail.python.org/mailman

How to debug SOAP using TCpMon and Python?

2005-04-12 Thread Jim
Hello, I am trying to debug a Python SOAP application using tcpmon. I am wondering what listen port, target port number and host address should I use. What about optional parameters: Http Proxy support, host and port? My PC is behind a firewall. Thanks for your help. Jim -- http

Re: numarray.array can be VERY slow

2005-04-13 Thread Jim
appended the results to a results set. Now I create a list of objects of the size required and the overwrite them. Much faster :) Jim Getting in there late cos I've been skiving -- http://mail.python.org/mailman/listinfo/python-list

Re: how to explain such codes, python's bug or mine?

2005-04-13 Thread Jim
ot attempting to change the original list but make a copy. That's perfectly easy to do in Python as it is. The exampmle is a cautionary one about changing the list on which you are iterating. Jim -- http://mail.python.org/mailman/listinfo/python-list

terminate exectutioin in PythonWin

2005-04-13 Thread Jim
Hi all 1.Could someone tell me how to terminate execution in PythonWin? 2.Can anyone recommend a free development environment in which you can save your workspace (e.g. open files, debugging breakpoints etc.) Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: terminate exectutioin in PythonWin

2005-04-13 Thread Jim
nd re-insert breakpoints etc. :( Jim -- http://mail.python.org/mailman/listinfo/python-list

preallocate list

2005-04-13 Thread Jim
at is the best way of reading them into a list (or other ordered structure)? I was iterating with readline and appending to a list but it is taking ages. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: preallocate list

2005-04-13 Thread Jim
rbt wrote: Jim wrote: If I have a file with a floating point number on each line, what is the best way of reading them into a list (or other ordered structure)? I was iterating with readline and appending to a list but it is taking ages. Perhaps you should use readlines (notice the s) instead

Re: preallocate list

2005-04-13 Thread Jim
tokens = line.split() factors.append([float(tokens[0])] * number) return factors OK. I've just tried with 4 lines and the code works. With 11000 lines it uses all CPU for at least 30 secs. There must be a better way. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: terminate exectutioin in PythonWin

2005-04-13 Thread Jim
Neil Hodgson wrote: Jim, 1.Could someone tell me how to terminate execution in PythonWin? Use the "Break into running code" command on the context menu of the PythonWin icon in the bottom right of the taskbar. Neil Great thanks! PythonWin isn't hot on keyboard shortcuts

Re: preallocate list

2005-04-13 Thread Jim
Steven Bethard wrote: Jim wrote: Thanks for the suggestions. I guess I must ensure that this is my bottle neck. def readFactorsIntoList(self,filename,numberLoads): factors = [] f = open(self.basedir + filename,'r') line = f.readline() tokens =

Re: preallocate list

2005-04-13 Thread Jim
: factor.append(float(i)) factors.append(factor) Is this nasty? Jim Oh the relief :) Of course, line.split() is already a list. Couple of seconds for the 1 line file. Thanks. What I really want is a Numeric array but I don't think Numeric supports importing files. Jim --

Re: preallocate list

2005-04-13 Thread Jim
Steven Bethard wrote: Jim wrote: .. OK. I've just tried with 4 lines and the code works. With 11000 lines it uses all CPU for at least 30 secs. There must be a better way. Was your test on *just* this function? Or were you doing something with the list produced by this function as well?

Re: terminate exectutioin in PythonWin

2005-04-13 Thread Jim
Steve Holden wrote: Jim wrote: [...] Actually I meant how do I stop a program running that I have started in the interpreter. If I get into an infinite loop I can't stop it without qutting PythonWin. Then I have to open all the files and re-insert breakpoints etc. :( Jim Look in the s

Re: preallocate list

2005-04-13 Thread Jim
F. Petitjean wrote: Le Wed, 13 Apr 2005 16:46:53 +0100, Jim a écrit : What I really want is a Numeric array but I don't think Numeric supports importing files. Numeric arrays can be serialized from/to files through pickles : import Numeric as N help(N.load) help(N.dump) (and it is space effi

Re: preallocate list

2005-04-13 Thread Jim
Steven Bethard wrote: Jim wrote: What I really want is a Numeric array but I don't think Numeric supports importing files. Hmmm... Maybe the scipy package? I think scipy.io.read_array might help, but I've never used it. STeVe Sounds promising. I only got Numeric because I wanted scip

Re: preallocate list

2005-04-13 Thread Jim
Python's (welcome) termination of a program when one tries to use an uninitalized scalar variable. I feel foolish that I forgot about *. I've just started with Python then took 2 weeks off. I'll explore pre-allocation when I'm back up to speed. Yep, I use None a lot. Thanks Jim

Re: preallocate list

2005-04-14 Thread Jim
John Machin wrote: On Wed, 13 Apr 2005 14:28:51 +0100, Jim <[EMAIL PROTECTED]> wrote: Thanks for the suggestions. I guess I must ensure that this is my bottle neck. def readFactorsIntoList(self,filename,numberLoads): 1. "numberLoads" is not used. factors = []

zipfile module and directories and symlinks

2005-04-21 Thread Jim
make a dir else make a file Is that right? What about symlinks? How do I know one of those? Thanks for any help, Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Quickest way to make py script Web accessible

2006-01-05 Thread Jim
y") and then returns a little HTML saying that the cleanup was done at such-and-such a time? Is that what you are asking to do? Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Python training, 2006 Feb 1-3, San Francisco

2006-01-12 Thread jim
On Wed, 11 Jan 2006, w chun wrote: ... > as promised, this is the FINAL reminder i'll send out about our > upcoming Python course at the beginning of February. Is it too much to ask that you refrain altogether from using these lists for advertising, with the possible exception of the local one?

Re: a more precise re for email addys

2006-01-18 Thread Jim
There is a precise one in a Perl module, I believe. http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html Can you swipe that? Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode html

2006-07-17 Thread Jim
, encode it as such, and you're done. Much easier. For example, I am programming a script that makes html pages, but I do not have the ability to change the "Content-Type .. charset=.." line that is sent preceeding those pages. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode html

2006-07-17 Thread Jim
Sybren Stuvel wrote: > Jim enlightened us with: > > For example, I am programming a script that makes html pages, but I > > do not have the ability to change the "Content-Type .. charset=.." > > line that is sent preceeding those pages. > > "line"?

Re: unicode html

2006-07-17 Thread Jim
Sybren Stuvel wrote: > Jim enlightened us with: > > Ah, but I cannot change it. It is not my machine and the folks who > > own the machine perceive that the charset line that they use is the > > right one for them. > > Well, _you_ are the one providing the content, a

Re: Understanding Unicode & encodings

2006-07-23 Thread Jim
), but I always get an exception. Where does this ascii codec > error comes from? How can I simply build this query string? Some more information may help: is the error returned before or during the execute call? If before, then the execute() call is a distraction. If during, then what is your dB, what is it's encoding (is the dB using latin1, or does the dB only accept ascii?), and what are you using to connect to it? Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Understanding Unicode & encodings

2006-07-23 Thread Jim
John Machin wrote: > Jim wrote: > > No, I'll bet that you'd like to run something like > > self.dcCursor.execute("INSERT INTO track (name, nbr, idartist, > > idalbum,path) VALUES (%(track)s, %(nbr)s, > > %(idartist)s,%(idalbum)s,'%(path)s'

Re: Get age of a file/dir

2006-08-01 Thread Jim
; Build and Release > MontaVista Software Hi, You should check out the datetime module. And convert dates to an ordinal number. today = datetime.date.today().toordinal() age = today - datetime.date(year, month, day).toordinal() Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: XML parsing and writing

2006-08-01 Thread Jim
need to strip out the extra stuff (or print it out not pretty; can you get a viewer that buffs-up a notbuff file so you are seeing pretty but the data isn't actually pretty?). Jim -- http://mail.python.org/mailman/listinfo/python-list

Why do I require an "elif" statement here?

2006-08-04 Thread Jim
Could somebody tell me why I need the "elif char == '\n'" in the following code? This is required in order the pick up lines with just spaces in them. Why doesn't the "else:" statement pick this up? OLD_INDENT = 5 # spaces NEW_INDENT = 4 # spaces print 'Reindent.py:' print '\nFrom file %s' % in

Re: Why do I require an "elif" statement here?

2006-08-05 Thread Jim
.write(whitespace*NEW_INDENT*x+line.lstrip()) > > n += 1 > > break > > else: > > output.write(line) > > break > > else: > > output.write(line) > > > > input.close() > > output.close() > > print 'Total number of %i lines reindented out of %i lines.' % (n, > > nline) > > Thank you Tim. Hard to believe that lstrip() produces an empty string on lines with just spaces and doesn't remove the '\n' with lines that have characters. I'm now using all your suggestions, even "print repr(thing)" which I wasn't aware of. Thanks, Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Why do I require an "elif" statement here?

2006-08-05 Thread Jim
Good stuff! Since I'm only interested in spaces being my only whitespace it makes sense for me to use "line.lstrip(whitespace)" in my script, thus eliminating the "elif char == '\n':" statement. Thanks, Jim Tim Chase wrote: > > Hard to believe that lstrip

Re: do people really complain about significant whitespace?

2006-08-07 Thread Jim
but I have had errors moving code like: if .. try: .. except .. else .. where it wound up (with the help of the emacs tab key) as if .. try: .. except .. else .. . I attempt to be careful, but certainly it has happened to me. Jim

Re: trouble using "\" as a string

2006-08-19 Thread Jim
Try using: tempname = "\\" Jim OriginalBrownster wrote: > Hi there... > > I'm still pretty new to turbogears. but i have gotten pretty familiar > with it > > i'm just trying to clear something up, i'm having a difficult time > using \ when decl

Re: CGI Tutorial

2006-10-05 Thread Jim
sages, the second of which, using the "devel" string, only appears when DEBUG is True). In my humble experience, all cgi programs should follow something like that scheme. You asked for an opinion! :-) Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: CGI Tutorial

2006-10-06 Thread Jim
bout something entirely unrelated? But at all events it seems not to have to do with CGI. Jim -- http://mail.python.org/mailman/listinfo/python-list

where to put .pth file

2006-10-13 Thread Jim
. Trouble is, when I issue a PyRun statement, it fires up 24, not 25, and gives me the 24 prefix. In short: how do I find the latest installed site-packages directory? -- Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: unescape HTML entities

2006-10-28 Thread Jim
Rares Vernica wrote: > How can I unescape HTML entities like " "? Can I ask what you mean by "unescaping"? Do you mean converting into numeric references? Into Unicode? Jim -- http://mail.python.org/mailman/listinfo/python-list

win32file.DeviceIoControl(FSCTL_GET_RETRIEVAL_POINTERS)

2006-11-04 Thread Jim
I'm not sure how to perform this operation in Python. The difficulty is in knowing the size of the output buffer: if it is too small, I get an "insufficient buffer" exception; too large, and I get an "end of file" exception. In neither case is any partial data available. I'd rather not resort to a

Re: win32file.DeviceIoControl(FSCTL_GET_RETRIEVAL_POINTERS)

2006-11-04 Thread Jim
Mea culpa: files with *no* clusters return the end-of-file error. -- http://mail.python.org/mailman/listinfo/python-list

Re: building python with utf-8 default encoding?

2006-11-06 Thread Jim
e.py. But changing it is typically inadvisable in that any programs you write will not port to other people's machines. Jim -- http://mail.python.org/mailman/listinfo/python-list

deciding what is a dir (folder) in a zip file

2006-11-16 Thread Jim
ld os.system("unzip "+fn) and search the disk for directories but I'd rather not, for reasons I won't list.) I'd be grateful for any help, Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Cross-site scripting (XSS) defense

2006-06-16 Thread Jim
Have a look at http://feedparser.org/docs/html-sanitization.html . Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: Cross-site scripting (XSS) defense

2006-06-16 Thread Jim
Have a look at http://feedparser.org/docs/html-sanitization.html . Jim -- http://mail.python.org/mailman/listinfo/python-list

can't find win32api from embedded pyrun call

2006-06-19 Thread Jim
loaded with directories including the one with win32api.pyd. Besides, if it were an install or path problem, why would it work at the command prompt? Could it be a problem with the debug lib I built? Any suggestions are welcome. -- Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: can't find win32api from embedded pyrun call

2006-06-20 Thread Jim
ng ("execfile(fname)"). I got this from the win32 FAQ. I hope someone benefits from this, it cost me plenty to figure out. -- Jim -- http://mail.python.org/mailman/listinfo/python-list

embedded Python calling app via COM

2006-06-21 Thread Jim
and do something hack, I thought I'd see if anyone else is in this situation and knows a good way to do the job. -- Jim -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   >