a simple question

2021-07-26 Thread Glenn Wilson via Python-list
.      thanks, glenn -- https://mail.python.org/mailman/listinfo/python-list

Re: nltk related issue

2018-06-25 Thread Glenn Hutchings
To: Sharan Basappa From: Glenn Hutchings On 21/06/18 04:40, Sharan Basappa wrote: > Folks, > > I am trying to run a simple example associated with nltk. > I get some error and I don't know what the issue is. > I need some guidance please. >

Re: nltk related issue

2018-06-24 Thread Glenn Hutchings
ta\\Local\\Enthought\\Canopy\\edm\\envs\\User\\lib\\nltk_data' > - 'D:\\Users\\sharanb\\AppData\\Roaming\\nltk_data' > - u'' > ** > As the error message says, you need to do a one-time installation of the NLTK data. See http://www.nltk.org/data.html for more info. Glenn -- https://mail.python.org/mailman/listinfo/python-list

Re: print without ()

2017-09-06 Thread Glenn Hutchings
On Thursday, 7 September 2017 07:14:57 UTC+1, Andrej Viktorovich wrote: > Sometimes I find code with strange print function usage. String is passed > without brackets. > > #!/usr/bin/python > list = ['physics', 'chemistry', 1997, 2000]; > print "Value available at index 2 : " > print list[2] > l

Re: Proposed new syntax

2017-08-12 Thread Glenn Linderman
standing of various physical phenomena, but Einstein's theory of relativity shows that Newtonian physics is only a partial understanding, not a comprehensive one. And maybe someday there'll be a theory that demonstrates that relativity is only a partial understanding as well (someone ch

Re: Python 3.4.7 binaries for windows?

2017-08-10 Thread Glenn Linderman
rsions of Python, and only a small subset of those actually have ever affected my code. Cheers, Glenn -- https://mail.python.org/mailman/listinfo/python-list

Re: cgiapp versus apache & nginx+fcgiwrap

2017-08-02 Thread Glenn Linderman
On 8/2/2017 1:13 AM, Robin Becker wrote: we always seem to get keys in K even if it is an empty list. Can you treat None and empty list the same? Looking at the envirnment that the cgi script sees I cannot see anything obvious except the expected differences for the two frontend servers.

Re: how to sort a list of tuples with custom function

2017-08-01 Thread Glenn Linderman
On 8/1/2017 2:10 PM, Piet van Oostrum wrote: Ho Yeung Lee writes: def isneighborlocation(lo1, lo2): if abs(lo1[0] - lo2[0]) < 7 and abs(lo1[1] - lo2[1]) < 7: return 1 elif abs(lo1[0] - lo2[0]) == 1 and lo1[1] == lo2[1]: return 1 elif abs(lo1[1] - lo2[1]) == 1

Re: How to package my project and make it ready to be installed by using pip

2017-03-21 Thread Glenn Hutchings
On Monday, 20 March 2017 17:21:04 UTC, Daiyue Weng wrote: > If I tried > > pip3 install git+https://user_n...@bitbucket.org/user_name/project_name.git > > the package would get installed, but there are no python files that have > been installed in /usr/local/lib/python3.5/dist-packages/project_n

Re: How to package my project and make it ready to be installed by using pip

2017-03-20 Thread Glenn Hutchings
On Monday, 20 March 2017 11:36:34 UTC, Daiyue Weng wrote: > Hi, I using Python 3.5.2 on Linux Mint 18.1, and I am wondering how to > package my PyCharm Python project as a module so that it can installed by > someone else by using pip. Like what tools and script I need to use or > write in order t

Reading the Windows Location API

2016-10-01 Thread Glenn Linderman
I found some GeoLocation stuff on PyPi, but it seems to be focused on turning an IP address into a (rough) location rather than reading a GPS. Seems like if a GPS is attached, reading it would be the best way to obtain a more accurate location, falling back to approximations if there is no GPS.

Re: EOFError: marshal data too short -- causes?

2016-01-08 Thread Glenn Linderman
On 1/7/2016 7:44 PM, Dennis Lee Bieber wrote: On Thu, 7 Jan 2016 10:55:38 -0800, Glenn Linderman declaimed the following: But all the touched files are .pyc files (and the directories __pycache__ directories). None of the source files were modified. So why would any .pyc files ever be

Re: EOFError: marshal data too short -- causes?

2015-12-30 Thread Glenn Linderman
the question, but the tech I talked to was as much a parrot as a tech... Glenn -- https://mail.python.org/mailman/listinfo/python-list

Re: EOFError: marshal data too short -- causes?

2015-12-30 Thread Glenn Linderman
On 12/29/2015 5:56 AM, D'Arcy J.M. Cain wrote: On Tue, 29 Dec 2015 00:01:00 -0800 Glenn Linderman wrote: OK, so I actually renamed it instead of zapping it. Them, actually, Really, just zap them. They are object code. Even if you zap a perfectly good .pyc file a perfectly good one wi

Re: EOFError: marshal data too short -- causes?

2015-12-29 Thread Glenn Linderman
On 12/28/2015 11:19 PM, Terry Reedy wrote: On 12/29/2015 1:50 AM, Glenn Linderman wrote: Here's a sanatized stack trace off my web server: File ".../cgihelpers.py", line 10, in import cgitb File ".../py34/lib/python3.4/cgitb.py", line 24, in import insp

EOFError: marshal data too short -- causes?

2015-12-28 Thread Glenn Linderman
Here's a sanatized stack trace off my web server: File ".../cgihelpers.py", line 10, in import cgitb File ".../py34/lib/python3.4/cgitb.py", line 24, in import inspect File ".../py34/lib/python3.4/inspect.py", line 54, in from dis import COMPILER_FLAG_NAMES as _flag_names File

Re: Unable to use python 3.5

2015-12-23 Thread Glenn Hutchings
On Wednesday, 23 December 2015 12:46:43 UTC, Ankit Deshmukh wrote: > I am maters student in India, I have installed python 3.5 in my windows 10 > 64bit machine. Everything works fine except package installing. When in use > "pip install numpy" is shows unable to find *'vcvarsall.bat'* I don't know

msvcr100.dll missing ... error started after Windows 10 update to 10586.17

2015-12-04 Thread Glenn Linderman
y, however. So this is just a data point and warning and solution, not really an expectation that anyone will be able to explain M$. Glenn -- https://mail.python.org/mailman/listinfo/python-list

Launcher, and ftype Python.File

2015-11-18 Thread Glenn Linderman
Setting up a new machine with Windows 10, I installed Python 3.5.0 and the Launcher. Invoking python files from batch files as foo.py -a -bunch -of -parameters Didn't seem to do _anything_ so I checked: d:\>assoc .py .py=Python.File d:\>ftype Python.File Python.File="C:\Windows\py.exe" "%L" %

New to Python and setting up

2015-10-17 Thread Glenn Schultz
shoot it out (Bond Lab Py and BondLab R) for supremacy. Thanks, Glenn -- https://mail.python.org/mailman/listinfo/python-list

Some Help getting started

2015-10-12 Thread Glenn Schultz
oming out in Feb so the Python version will benefit from earlier mistakes. http://www.amazon.com/Investing-Mortgage-Backed-Securities-Website/dp/1118944003/ref=sr_1_1?ie=UTF8&qid=1444689641&sr=8-1&keywords=glenn+schultz I have two Python books I have been reading but at some point one

Re: Code Review for Paper, Rock, Scissors

2014-10-14 Thread Glenn Hutchings
Hi there! Welcome to Python. On Tuesday, 14 October 2014 09:04:51 UTC+1, Revenant wrote: > I am new to Python and would also like to see if any of you programming > gurus have some suggestions about how I can simplify code, and also if > there are any other good starter programs to work on to i

Re: Python code in presentations

2014-10-01 Thread Glenn Hutchings
/docutils.sourceforge.net/docs/user/slide-shows.html). It can do syntax highlighting of python, and produces a slide show you display in a browser. An example of what you can produce is at http://farmdev.com/talks/unicode. Glenn -- https://mail.python.org/mailman/listinfo/python-list

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Glenn Linderman
On 8/4/2014 3:24 AM, Wolfgang Maier wrote: On 08/04/2014 11:53 AM, Glenn Linderman wrote: I've never used the API from Python but random console access is documented at http://msdn.microsoft.com/en-us/library/windows/desktop/ms687404%28v=vs.85%29.aspx Would using the API from P

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Glenn Linderman
On 8/4/2014 3:33 AM, Andrew Berg wrote: If you want to save your users the hassle, I would definitely recommend a graphical environment. If I had realized that you intended your application to be widely deployed, I would have simply recommended that from the start. Graphical environments are go

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Glenn Linderman
On 8/4/2014 1:39 AM, Terry Reedy wrote: On 8/3/2014 6:52 PM, Wiktor wrote: Hi, as OO programming exercise, I'm trying to port to Python one of my favorite game from early'90 (Atari 65XL/XE) - Kolony (here's video from original version on C64 https://www.youtube.com/watch?v=UFycYOp2cbE, and h

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-04 Thread Glenn Linderman
On 8/3/2014 10:06 PM, Andrew Berg wrote: On 2014.08.03 23:14, Glenn Linderman wrote: Having read a bit about ConEmu, it seems that it is a "pretty face" built on top of Windows Console, by screen scraping the real (but hidden) Windows Console, and providing a number of interesti

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-03 Thread Glenn Linderman
On 8/3/2014 5:17 PM, Glenn Linderman wrote: On 8/3/2014 4:25 PM, Andrew Berg wrote: On 2014.08.03 18:08, Chris Angelico wrote: The best way to do it is to use the Unicode codepage, but cmd.exe just plain has issues. There are underlying Windows APIs for displaying text that have problems with

Re: cmd.exe on WIndows - problem with displaying some Unicode characters

2014-08-03 Thread Glenn Linderman
ing Unicode in Python on Windows). Glenn -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 is killing Python

2014-08-01 Thread Glenn Linderman
On 7/16/2014 7:27 AM, Frank Millman wrote: I just tried an experiment in my own project. Ned Batchelder, in his Pragmatic Unicode presentation, http://nedbatchelder.com/text/unipain.html, suggests that you always have some unicode characters in your data, just to ensure that they are handled corr

Re: Exploring Python for next desktop GUI Project

2014-07-24 Thread Glenn Linderman
ration that can "just be used" for any language? Glenn -- https://mail.python.org/mailman/listinfo/python-list

Google app engine database

2014-02-22 Thread glenn . a . isaac
Is there a way to make sure that whenever you're making google engine app iterations to a database that that info does not get wiped/deleted. Please advise -- https://mail.python.org/mailman/listinfo/python-list

Re: Using virtualenv to bypass sudoer issues

2014-02-08 Thread Glenn Hutchings
d to share the installation with anyone else. If not, you could also install packages using: python setup.py install --user This will install in your home directory, in the '.local' subdirectory. And to run any scripts that get installed, add ~/.local/bin to your PATH. Glenn --

Re: Pep8 in SetupTools

2013-12-12 Thread Glenn Hutchings
On Thursday, 12 December 2013 11:13:51 UTC, Chandru Rajendran wrote: > Please help me with running Pep8  using setuptools. Also help me how to Pep8 > for files in a folder. The tool you're looking for is flake8. It integrates with setuptools, so that you can run 'python setup.py flake8'. Mor

Re: python install on locked down windows box?

2011-09-22 Thread Glenn Hutchings
You could try Portable Python (http://www.portablepython.com). No need to install anything! -- http://mail.python.org/mailman/listinfo/python-list

Re: English Idiom in Unix: Directory Recursively

2011-05-18 Thread Glenn Knickerbocker
On 05/18/2011 02:50 AM, Harrison Hill wrote: > Recursion: (N). See recursion. The index of IBM's Document Composition Facility SCRIPT/VS Text Programmer's Guide, Release 3.0 (form SH35-0069-2), put it thus: > Circular definition > See definition, circular > definition > circular 211 >

Arrays and CTYPE

2010-09-20 Thread Glenn Pringle
;> print hold.getBufferLength() 1400 >>> print hold.resetMonitor() 1 >>> print hold.getState() 42607516 >>> Would greatly appreciate if somebody points me in the right direction. Thanks, Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: Overload print

2010-08-25 Thread Glenn Hutchings
On 25 Aug, 22:18, Ross Williamson wrote: > Is there anyway in a class to overload the print function? > > >> class foo_class(): > >>      pass > >> cc = foo_class() > >> print cc > > Gives: > > <__main__.foo_class instance at > > > Can I do something like: > > >> class foo_class(): > >>     de

Re: ZipFile - file adding API incomplete?

2009-11-17 Thread Glenn Maynard
ritten ZIP parsing code several times over the years (https://svn.stepmania.com/svn/trunk/stepmania/src/RageFileDriverZip.cpp), so I'm familiar with the more widely-used parts of the file format, but I havn't dealt with ZIP writing very much. I'm not sure if I'll have time to get to this soon, but I'll keep thinking about it. [1] seems odd, but mimicing http://docs.python.org/library/stdtypes.html#file.close -- Glenn Maynard -- http://mail.python.org/mailman/listinfo/python-list

ZipFile - file adding API incomplete?

2009-11-16 Thread Glenn Maynard
Ps. Short-term, at least, I'll probably implement these externally. -- Glenn Maynard -- http://mail.python.org/mailman/listinfo/python-list

Re: Query about doing fortran-esque repeat formatting

2009-11-09 Thread Glenn Hutchings
; tmp[i][8], tmp[i][9]) There certainly is. You can use python's string concatenation and repeat operators: print "%s" + " %-5.3f" * 7 % Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: import overwrites __name__

2009-05-08 Thread Glenn Hutchings
int my_name > > -> > __main__ > 119 > x > 117 > unhandled NameError "name 'my_name' is not defined" Interesting. Here's one possibility for the contents of module x.py: import sys del sys.modules['__main__'].my_name y = 42

Re: free chart lib for Python?

2009-05-08 Thread Glenn Hutchings
On Fri, 08 May 2009 10:27:08 +0800, oyster wrote: > I mean chart, not plot. If you don't know the difference, you can > check www.advsofteng.com, which is a commercial program > > is there such a thing with many kinds of chart, i.e. pie-chart, > line-chart, ..? You could try matplotlib: http

Re: [ANN] regobj - Pythonic object-based access to the Windows Registry

2009-05-04 Thread Glenn Linderman
ing for the value of a key, one could return a dictionary of nameless value types... and allow iterations over that. Subkeys could be a tuple with the type of key, and the value of a key object. Well, these are just thoughts. I don't know if they would increase or decrease the Pythonicity o

Re: Tutorial on working with Excel files in Python (without COM and cross platform!) at PyConUS 2009

2009-01-31 Thread Glenn Linderman
than COM, and (although I'm using Windows) I think it could be done on Linux. -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking -- http://mail.python.org/mailman/listinfo/python-list

errno 22 instead of errno 2

2009-01-27 Thread Glenn Linderman
valid file name (errno 22). Yes, I'm aware that \a is ASCII 007. Using a valid, non-existent file name produces errno 2 on both versions. -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire,

Re: length of a tuple or a list containing only one element

2009-01-07 Thread Glenn Linderman
tem1': 'value1', 'item2': 'value2', }, So I was focusing on the items and values of the pprint, and they were all correct. But this tuple clearly didn't belong, but my brain was expecting that tuples would be surrounded by () in source... -

Re: python3 urlopen(...).read() returns bytes

2008-12-22 Thread Glenn G. Chappell
Okay, so I guess I didn't really *get* the whole unicode/text/binary thing. Maybe I still don't, but I think I'm getting closer. Thanks to everyone who replied. On Dec 22, 1:41 pm, ajaksu wrote: > On Dec 22, 8:25 pm, Christian Heimes wrote: > That said, a "decode to declared HTTP header encoding

python3 urlopen(...).read() returns bytes

2008-12-22 Thread Glenn G. Chappell
I just ran 2to3 on a py2.5 script that does pattern matching on the text of a web page. The resulting script crashed, because when I did f = urllib.request.urlopen(url) text = f.read() then "text" is a bytes object, not a string, and so I can't do a regexp on it. Of course, this is easy

Re: Multiple Versions of Python on Windows XP

2008-12-04 Thread Glenn Linderman
On approximately 12/4/2008 5:29 AM, came the following characters from the keyboard of Colin J. Williams: Glenn Linderman wrote: The equivalent of those commands is available via Windows Explorer, Tools / Folder Options, File Types, scroll-scroll-scroll your way to .py, Click Advanced

Re: Multiple Versions of Python on Windows XP

2008-12-03 Thread Glenn Linderman
s the currently active version. If Glenn Lindermann's answer doesn't help, you need to explain: what is a "currently active version"? How is one Python version more active than any other? I was hoping that there is some simpler way than the "Repair" procedure. See G

Re: Simple ini Config parser examples needed

2008-12-02 Thread Glenn Linderman
On approximately 12/2/2008 3:22 PM, came the following characters from the keyboard of Chris Rebert: On Tue, Dec 2, 2008 at 2:51 PM, Glenn Linderman <[EMAIL PROTECTED]> wrote: On approximately 12/2/2008 1:31 PM, came the following characters from the keyboard of Chris Rebert:

Re: Simple ini Config parser examples needed

2008-12-02 Thread Glenn Linderman
short enough to read into a string, then prepend the line, then parse with ConfigParser. -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple Versions of Python on Windows XP

2008-12-02 Thread Glenn Linderman
and assoc have the same content as was created by the corresponding version installation. -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking -- http://

Re: Multiple Versions of Python on Windows XP

2008-12-01 Thread Glenn Linderman
e" "%1" %* c:\>assoc .py assoc .py .py=Python25.File It would be nice if the ftypes were version specific as created by the installer; IIRC, I created the above three from the ftype Python.File as I installed each version. -- Glenn -- http://nevcal.com/ ==

Re: what's so difficult about namespace?

2008-11-25 Thread Glenn Linderman
kers provide for long names. Life is good. There are still throwbacks, and still small applications, and still languages that don't offer such facilities. -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire

Re: Installing python 2.6 on Vista

2008-11-23 Thread Glenn Linderman
make the job of the various packagers that make .exe files easier, too! -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking -- http://mail.python.org/mai

Re: Installing python 2.6 on Vista

2008-11-23 Thread Glenn Linderman
lling! -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking -- http://mail.python.org/mailman/listinfo/python-list

CherryPy vs Bluehost

2008-11-23 Thread Glenn Linderman
no response yet... it _is_ holiday time, of course. Anyway, if anyone has an active cherrypy-users account and can repost this there if that would bring more enlightened responses, I'd appreciate that; I can see that group, just not post, yet. -- Glenn -- http://nevcal.com/ ==

Re: how to detect if a dictionary has been modified ?

2008-11-23 Thread Glenn Linderman
On approximately 11/23/2008 9:50 AM, came the following characters from the keyboard of Arnaud Delobelle: Glenn Linderman <[EMAIL PROTECTED]> writes: On approximately 11/23/2008 1:40 AM, came the following characters from the keyboard of Steven D'Aprano: On Sun, 23 Nov 20

Re: how to detect if a dictionary has been modified ?

2008-11-23 Thread Glenn Linderman
bove code would declare it has, but most people, when shown before and after copies of the dict, with declare it hasn't. -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking -- http://mail.python.org/mailman/listinfo/python-list

Re: who to thank for the new RST doc format?

2008-11-18 Thread Glenn Hutchings
On 18 Nov, 08:46, [EMAIL PROTECTED] wrote: > I am really loving the output, and have started using RST for some > of my own docs as well. > > It's wonderful and I know it was a lot of work on somebody's part > to think it through and make the changes. > > If it was you, Many Thanks!!! It *is* good

Re: Snippets management

2008-11-05 Thread Glenn Linderman
s-platform printing. Because of that, I've started learning PyQt, which seems to be cross-platform at least for Linux, Mac, and Windows... -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple Comp

Re: push-style templating - an xml-like way to process xhtml

2008-11-05 Thread Glenn Linderman
On approximately 11/3/2008 2:51 PM, came the following characters from the keyboard of has: On 3 Nov 2008, at 18:18, Glenn Linderman wrote: On approximately 11/3/2008 12:20 AM, came the following characters from the keyboard of has: On 2 Nov, 14:06, Tino Wildenhain <[EMAIL PROTEC

Re: What's your choice when handle complicated C structures.

2008-11-05 Thread Glenn Linderman
r of the fields, perhaps, for reconstruction; maybe that is what a container is, already?), namedtuples, all seem to be reasonable alternative targets, with different usage tradeoffs, of course. -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left

Re: Structures

2008-11-03 Thread Glenn Linderman
do provide mechanisms to define structures / records: C, C++, Scheme, Common Lisp, Haskell, SML, Ocaml. I don't know even half of those. What about Perl? Does anyone know that? structs in Perl are generally implemented as hashes, which is similar to a Python dict. -- Glenn --

Re: Structures

2008-11-03 Thread Glenn Linderman
ot. Perhaps a more experience Python user can answer that question, at least for some particular implementation. -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking -- http://mail.python.org/mailman/listinfo/python-list

Re: push-style templating - an xml-like way to process xhtml

2008-11-03 Thread Glenn Linderman
re only combined in memory, which means the logic developer has to work harder in mentally modelling their View layer's structure and behaviour. These would certainly be useful measures to make, and like you point out, there can be advantages and disadvantages of each approach. -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows DOS box redirection

2008-10-31 Thread Glenn Linderman
On approximately 10/31/2008 9:22 PM, came the following characters from the keyboard of Dennis Lee Bieber: On Fri, 31 Oct 2008 12:14:36 -0700, Glenn Linderman <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: A little bit ago, I wrote: Creating the registry s

Re: Windows DOS box redirection

2008-10-31 Thread Glenn Linderman
versions of Windows) after creating the InheritConsoleHandles registry value, and it works then. XP, latest patches. The old CMD Prompt still fails. -- Glenn -- http://nevcal.com/ === A protocol is complete when there is nothing left to remove. -- Stuart Cheshire, Apple

Re: Windows DOS box redirection

2008-10-31 Thread Glenn Linderman
On approximately 10/31/2008 5:06 AM, came the following characters from the keyboard of Bill McClain: On 2008-10-31, Glenn Linderman <[EMAIL PROTECTED]> wrote: The problem with stdin/stdout is on Windows 2000 (and maybe the earlier NT?). But not on XP or AFAIK Vista. It only

Re: Code not work - DESPERATE HELP :(

2008-10-30 Thread Glenn Linderman
. It only occurs when a program is executed indirectly using the file associations instead of directly via the command line. File associations, are the Windows "let's do it a different way" alternative for Unix she-bang lines (#!/path/to/python). -- Glenn -- http://nevcal.com/

Re: 2.6, 3.0, and truly independent intepreters

2008-10-30 Thread Glenn Linderman
On approximately 10/30/2008 6:26 AM, came the following characters from the keyboard of Jesse Noller: On Wed, Oct 29, 2008 at 8:05 PM, Glenn Linderman <[EMAIL PROTECTED]> wrote: On approximately 10/29/2008 3:45 PM, came the following characters from the keyboard of Patrick Stinson:

Re: 2.6, 3.0, and truly independent intepreters

2008-10-24 Thread Glenn Linderman
On approximately 10/24/2008 1:09 PM, came the following characters from the keyboard of Rhamphoryncus: On Oct 24, 1:02 pm, Glenn Linderman <[EMAIL PROTECTED]> wrote: On approximately 10/24/2008 8:42 AM, came the following characters from the keyboard of Andy O'Meara: Glenn,

How to create Pygments extension for Sphinx

2008-10-14 Thread Glenn Hutchings
mingly the only way is to register a setuptools 'entry point' in the setup() function -- but that implies I'm installing a Python package, which I'm not. Do I have to create one, or is there another way? Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: Process "Killed"

2008-08-29 Thread Glenn Hutchings
emporary file, then renaming the temp file to the original: import os infile = open(filePath, 'r') outfile = open(filePath + '.bak', 'w') for num, line in enumerate(infile): if num >= 2: outfile.write(line) infile.close() outfile.close() os.rename(filePath + '.bak', filePath) Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: When to use try and except?

2008-08-29 Thread Glenn Hutchings
interested in, that is... Glenn [*] Haven't checked, so don't really know :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: calling source command within python

2008-07-25 Thread Glenn Hutchings
was, it almost certainly wouldn't do what you want. The .bashrc file is supposed to contain settings applying to the current shell, and os.system() runs in a subshell, so the settings will only affect that shell. If you're doing this to set environment variables, try modifying os.enviro

[ANN] PyStar 0.1 -- A* graph search algorithm

2008-07-18 Thread Glenn Hutchings
Announcing PyStar, a python module implementing the A* graph search algorithm. Available under the GPL, you can find it at http://fluffybunny.memebot.com/pystar.html I tried to find a decent Python version of this on the Interweb, but the only one I found (http://arainyday.se/projects/python

Re: Graphics

2008-07-11 Thread Glenn Hutchings
phics() > Circle((200, 200), 60) > Line((100, 400), (580, 200)) > Box((400, 350), 120, 100) > end_graphics() You're probably getting an ImportError from the 'from gasp...' line. You need to grab and install the GASP package from https://launchpad.net/gasp. Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: Numpy not found

2008-05-04 Thread Glenn Hutchings
different package. (Just to confuse things even further, there's also another old one, called numarray). > And if I do: >>>>> import Numeric * > # I get > SyntaxError: invalid syntax The proper syntax for that is (assuming you want numpy instead) 'from numpy import *'. Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: Are rank noobs tolerated, here?

2008-05-04 Thread Glenn Hutchings
t place to get it. Fire away! Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: GUI development with 3D view

2007-12-11 Thread Glenn Hutchings
ization Toolkit (VTK) at http://www.vtk.org. It also has 3D graphics and a Python interface. Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: Distinguishing attributes and methods

2007-12-08 Thread Glenn Hutchings
On Dec 8, 7:44 pm, MonkeeSage <[EMAIL PROTECTED]> wrote: > I think it muddies the water to say that a.a() and a.a are the same > thing--obviously they are not. A thing is not what it is; A thing is what it does. This is the Way of the Duck. -- Basho (in his "3 extra syllables" phase) -- http

Re: wxPython - drawing without paint event

2007-08-11 Thread glenn . chappell
On Aug 11, 3:31 am, Bjoern Schliessmann wrote: > [EMAIL PROTECTED] wrote: > > On a related topic, it seems like it would be nice to do *all* > > drawing in > > response topaintevents. When I get aneventfrom the timer, I > > would just tell wx that part of the window needs redrawing, and > > depen

Re: wxPython - drawing without paint event

2007-08-10 Thread glenn . chappell
On Aug 10, 1:40 am, 7stud <[EMAIL PROTECTED]> wrote: > On Aug 9, 7:46 pm, Matt Bitten <[EMAIL PROTECTED]> wrote: > > > I've got a wxPython program that needs to do some drawing on a DC on a > > regular basis And there is no event, > > so my code doesn't get called. What do I do? > > Then the ev

Re: Tkinter or wxpython?

2007-08-02 Thread Glenn Hutchings
away without having to download and install anything else. And there are probably lots more examples out there that a newbie can look at and learn from. As for *better*, wxPython has a lot more kinds of widgets in it, which will make writing GUIs less tedious in the long run, and the widgets look a

Re: Need a Little Help on Tkinter and Python

2007-06-06 Thread Glenn Hutchings
On 6 Jun, 00:58, "W. Watson" <[EMAIL PROTECTED]> wrote: > is there a Tkinter intro manual somewhere Take a look at http://www.pythonware.com/library/tkinter/introduction Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter - resize tkMessageBox

2007-06-05 Thread Glenn Hutchings
f all dialogs to 10 inches, try this: root = Tk() root.option_add("*Dialog.msg.wrapLength", "10i") Regards, Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: using tkinter to display html

2007-04-19 Thread Glenn Hutchings
On 20 Apr, 02:54, "Stephen M. Gava" <[EMAIL PROTECTED]> wrote: > yeah. i feel like i'm being forced to use wxwidgets/wxpython just because > i need pretty good html display though. You could always use a real web browser: import webbrowser webbrowser.op

Re: tuple.index()

2006-12-14 Thread Glenn Hutchings
python-1992/0285.html Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: tuple.index()

2006-12-14 Thread Glenn Hutchings
meone not interested in design issues, it seems like an omission for tuples to be missing the non-modifying methods that lists have. Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: tuple.index()

2006-12-14 Thread Glenn Hutchings
Fredrik Lundh wrote: > if you cannot trust your own code not to modify objects you pass to it, > I'm not sure Python's the right language for you. It's not my own code I'm worried about. :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: tuple.index()

2006-12-14 Thread Glenn Hutchings
"heterogenous" in this thread sound bogus to me. Python is first and foremost a practical language; what lists and tuples are supposedly "for" strikes me as being irrelevant. Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: tuple.index()

2006-12-14 Thread Glenn Hutchings
Simon Brunning wrote: > It's because, philosophically, a Python tuple isn't just a read-only list. But there are situations where you might want to treat it as a read-only list. E.g., an argument to a function, so that you can guarantee the function won't modify it. In that case, it makes sense

Re: tuple.index()

2006-12-14 Thread Glenn Hutchings
sn't modify anything. I have no idea why they aren't implemented either. Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: Python tools for managing static websites?

2006-11-02 Thread Glenn Hutchings
I haven't seen mention of HTMLgen, another python package. Check it out at: http://starship.python.net/crew/friedrich/HTMLgen/html/main.html Glenn -- http://mail.python.org/mailman/listinfo/python-list

Re: analyzing removable media

2006-09-29 Thread glenn
Nick Vatamaniuc wrote: > glenn wrote: > > Hi > > can anyone tell me how given a directory or file path, I can > > pythonically tell if that item is on 'removable media', or sometype of > > vfs, the label of the media (or volume) and perhaps any oth

Re: analyzing removable media

2006-09-29 Thread glenn
> > As soon as you ask for "cross platform" and something that is > device/OS specific... you have conflict. > > From the win32 extensions: > > win32file.GetDriveType > int = GetDriveType() > > Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, > or network drive. > > R

Re: analyzing removable media

2006-09-28 Thread glenn
Hi Jay pls excuse top post - Im actually doing this project in linux, but am wanting it to be cross platform. I definitley have to cater for win32 also. I was hoping that burried in sys or os or that there'd be some x platform module that did all that stuff for me thnks for reply though

  1   2   >