def __init__(self):
self.noise=""
def voice(self):
return "voice:" + self.noise
class dog(creature):
def __init__(self):
self.noise="bark"
def voice(self):
print "brace your self:"
thanks
glenn
--
http://mail.python.org/mailman/listinfo/python-list
Chaz Ginger wrote:
> Chaz Ginger wrote:
> > glenn wrote:
> >> hi - Im quite new to python, wondering if anyone can help me understand
> >> something about inheritance here. In this trivial example, how could I
> >> modify the voice method of 'dog'
Bruno Desthuilliers wrote:
> glenn wrote:
> > hi - Im quite new to python, wondering if anyone can help me understand
> > something about inheritance here. In this trivial example, how could I
> > modify the voice method of 'dog' to call the base class 'crea
ess it wants something in position of self?
any idea what Im doing wrong? - this would be very handy as its a point
Im stymied on a couple of 'projects'
thanks
Glenn
> If you want dog.voice() to do something else, you can call superclass'
> method like this:
>
>
ssname
doesnt - so I got into that habit, except for where I had a constructor
with parameters - except now Im feeling foolish because I cant
replicate the error - which suggests I didnt understand the error
message properly in the first place... arrgh
I guess thats just part of the process of gainin
thanks - interesting essay/article - a lot in their I've never really
considered - though its only recently ive started playing with multiple
inheritance in any context - thanks for that
Bruno Desthuilliers wrote:
> glenn wrote:
> > Bruno Desthuilliers wrote:
> >
> (snip)
&
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 other details
about the media itself?
thanks
Glenn
--
http://mail.python.org/mailman/listi
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
>
> 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
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
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
>
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
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.
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
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.
>
Announcing PySuDoku version 0.1, yet another Sudoku program written in
Python. But this one has features that I don't see in any of the others:
* Cute interactive solving mode via Tkinter.
* Puzzle generation option, for making your own puzzles.
* Nicely packaged for installation via distut
Announcing PySuDoku version 0.2, yet another Sudoku program written in
Python, featuring:
* Cute interactive solving mode via Tkinter.
* Puzzle generation option, for making your own puzzles.
* Nicely packaged for installation via distutils.
New in this release:
* Now uses psyco module,
In article <[EMAIL PROTECTED]>,
Michael McGarry <[EMAIL PROTECTED]> wrote:
> One problem is my Window created in Qt appears underneath all others on
> the screen and focus never goes completely onto this window. Kind of weird.
>
> Any ideas?
>
If the application is not properly bundled you wi
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
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
--
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
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
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
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
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
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
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
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
shoot it out (Bond Lab Py and BondLab R) for
supremacy.
Thanks,
Glenn
--
https://mail.python.org/mailman/listinfo/python-list
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" %
ration that can "just be used" for any language?
Glenn
--
https://mail.python.org/mailman/listinfo/python-list
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
ing Unicode in
Python on Windows).
Glenn
--
https://mail.python.org/mailman/listinfo/python-list
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
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
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
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
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
/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
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
You could try Portable Python (http://www.portablepython.com). No need to
install anything!
--
http://mail.python.org/mailman/listinfo/python-list
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
s dealt with by the
native C++ build system, so you have to use a recognized suffix (either
.cpp or .cc, and possibly others). Looks like .c++ isn't a standard
one. See
http://docs.python.org/dist/describing-extensions.html#SECTION00232
Glenn
--
http://mail.python.org/mailman/listinfo/python-list
sn't modify
anything. I have no idea why they aren't implemented either.
Glenn
--
http://mail.python.org/mailman/listinfo/python-list
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
"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
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
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
python-1992/0285.html
Glenn
--
http://mail.python.org/mailman/listinfo/python-list
Hi I have been trying to wrap a c library called FreeImage for python
and am having trouble with a couple of functions.
One function is
FreeImage_Load which takes parameters (enum, const char*, int)
I have wrapped the function with the following code
static PyObject *
freeimage_load(PyObject *sel
ource/'],
library_dirs=['../../Dist/'],
libraries = ['FreeImage'],
sources = ['freeimagemodule.c'])
setup (name = 'freeimage',
version = '1.0',
author = 'Glenn Pierce',
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
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
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
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
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
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
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
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
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,
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
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
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
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/
==
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
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
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
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/
==
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://
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
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:
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
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
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...
-
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
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,
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:
.
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/
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
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
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 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
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
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 --
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
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
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
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
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
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
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
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
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
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
t place to get it. Fire away!
Glenn
--
http://mail.python.org/mailman/listinfo/python-list
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
interested in, that
is...
Glenn
[*] Haven't checked, so don't really know :-)
--
http://mail.python.org/mailman/listinfo/python-list
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
; 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
Ps. Short-term, at least, I'll probably implement these externally.
--
Glenn Maynard
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 113 matches
Mail list logo