Once it is in everyone is hesitant to take it out for fear of
breaking someone's code that uses it (no matter how obscure).
Putting in new methods should be difficult and require lots
of review for that reason and so we don't have language bloat.
Larry Bates
George Sakkis wrote:
>
__str__ method to
generate the output from this module).
Hope information helps.
Larry Bates
Captain Dondo wrote:
> OK, I know this is covered somewhere in Python 101, but for the life of me
> I cannot figure this out. I really need a basic intro to Python book
>
> I am trying to do
If it is a print that can take direct character output (e.g. one
that has PCL or text mode emulation) you can do following:
lpr=open('LPT1','w') # or LPT2, LPT3
lpr.writeline('the output line you want')
lpr.close()
If it is a GDI-only printer it is MUCH more difficult. You need
to interface with
from some of the more advanced examples
and found several recipes that I'm sure I'll use in the future.
I think this will go on my bookshelf beside Fredrkik Lundh's
"Python Standard Library" and Mark Hammond's "Python Programming
on Win32" as a resource that I&
Sorry, I didn't ever have copy of 1st edition. Maybe Alex
can help us on this one?
-Larry
[EMAIL PROTECTED] wrote:
> Hello Larry,
>
> I don't have my copy yet. Can you give any guidance on how the 2'nd
> edition compares to the 1'st edition? At 844 pages, it seems to be 250+
> pages bigger than
ering very advanced techniques.
3) Read the standard library documentation and source code. You
can learn a lot.
4) Read this list every day. I learn something daily.
Larry Bates
Anon wrote:
> I've gotten off to a good start for programming using Python (my first
> programming language
e to first determine if the URL
actually exists.
Larry Bates
Ritesh Raj Sarraf wrote:
> Hello Everybody,
>
> I've got a small problem with urlretrieve.
> Even passing a bad url to urlretrieve doesn't raise an exception. Or does
> it?
>
> If Yes, What exception is it ?
You really should give an example so that we will know what
you mean by "weird and useless". Otherwise you are asking
us to implement TwistedSnmp to see what you are referring
to.
Larry Bates
Francesco Ciocchetti wrote:
> Hi all ml.
>
> I'm tryng to use TwistedSnm
Python you open the file with
"wb" mode.
Example:
fp=open('myfile.dat', 'wb')
fp.write(bytes)
fp.close()
>From your post I cannot tell anything more about what you are
actually doing, so I hope this helps.
Larry Bates
Cesar Andres Roldan Garcia wrote:
I don't think you can make a .DLL (but someone else might).
Why can't you use a COM server? MS seems to have written
some pretty sophisticated software using COM objects.
Almost all languages can dispatch a COM object easily.
-Larry
[EMAIL PROTECTED] wrote:
> Can I use python to make a regular
Use something like:
import zipfile
zfile=zipfile.ZipFile(zipfilename,'r')
contents=zfile.read(filenametoread)
Stripped out of a working program, but not tested.
-Larry Bates
Greg Lindstrom wrote:
> Hello-
> I am trying to read a file from a zip archive. I have read the
&g
You may want to take a look at this link. It should
be much faster than any programmatic technique.
http://www.its.niu.edu/its/CSupport/tipoftheweek/tip_080502.shtml
If you still want to do it programmatically, you will need to
look at csv module to parse the lines.
Larry Bates
3c273 wrote
nlink).
Larry Bates
Raghul wrote:
> hi
>I am having a problem. I want to copy a file from the folder and
> paste it or move it to another folder. Is it possible in python?
> Actually I need to implement this in the zope for my site. When I click
> any file it should move or copied
Take a look at ActiveState:
http://www.activestate.com/Products/ActivePythonFamily/?_x=1
or for something more general:
http://www.eclipse.org/
Larry Bates
[EMAIL PROTECTED] wrote:
> Hi !
>
> I search for an IDE that working in Windows, and knows these functions:
>
> A.)
Win32 (Hammond and Robinson) and use Mark Hammonds Python
Windows extension library.
Larry Bates
Austin wrote:
> I wrote a program running on windows.
> I put the link of the program in "Start up" folder and let it executed
> minimized.
> Every time when I open the comput
Can't address the 8-byte longs, but to strip off null padding
in strings you merely do
s=s.rstrip('\x00')
Larry Bates
[EMAIL PROTECTED] wrote:
> Hi everyone,
>
> I would like to be able to pack/unpack 8-byte longs, and have strings
> with null padding to be able to
ation with annual subscriptions.
Larry Bates
James wrote:
> This is not so much as a Python question though I will implement it in
> it.
>
> I am looking to securely aggregate documents based on a metadata from
> multiple providers. I am getting the feeling that I am reinventing th
,
bInheritHandles,
dwCreationFlags,
newEnvironment,
currentDirectory,
STARTUPINFO)
Larry Bates
[EMAIL PROTECTED] wrote:
> Hello NG,
>
> I don'
Because Python allows you to replace built-in methods with
your own. Later you will find that this can be extremely
powerful. You will stumble on this if you name a list 'list'
a string 'str', integer 'int', float 'float', dictionary
'dict', ..
1) To exit any application:
import sys
sys.exit(0)
2) I'm not familiar with any of these development systems. I use
what comes with ActiveState's PythonWin. It does have debugging
breakpoints, etc.
Larry Bates
Jim wrote:
> Hi all
>
> 1.Could someone tell me how to ter
quit. When you open
with "b" mode it reads the number of bytes that the
filesytem has stored for the file.
Hope info helps.
Larry Bates
[EMAIL PROTECTED] wrote:
> H!
>
> I'm using a database and now I want to compress a file and put it into
> the database.
>
&
py2exe works just fine, but you didn't give enough information for us
to help you. Thomas Heller (maintainer of py2exe) monitors this list.
So post some more information of what "...caused a problem in my
script..." means and we will all try to help.
Larry Bates
codecraig wro
ReportLab doesn't support this in the free version but they sell
an add-on called PageCatcher that has this feature. I've used
it on a couple of projects and it works EXTREMELY well.
-Larry
Rajarshi Guha wrote:
> Hi, I've been using pdflatex to dump ranges of pages from a PDF file via
> Python.
Zope3 experience. Plone's CMF
is going to be very hard to beat.
-Larry Bates
Mir Nazim wrote:
> Hi there.
>
> I am about to undertake a project. My employer wants it to be developed
> in PHP. While I was thinking that Python will be better for this job.
>
> The project will
nvert using time.localtime after.
For future reference: Please post a copy of your traceback
instead of just saying "<-- generates and error". It helps
people to respond more quickly and accurately.
-Larry Bates
Simon Brunning wrote:
> On 4/19/05, Ralph Hilton <[EMAIL PROTE
nt to s.setblocking(1). New in
version 2.3.
-Larry Bates
willitfw wrote:
> Does anyone know how to prevent this error from occurring: IOError:
> [Errno socket error] (10060, 'Operation timed out').
>
> I am using the following code without any luck. Obviously I am missing
>
(more general solution)
if hasattr(arg, 'next') and not hasattr(arg, '__iter__'):
# perform work on iterable
else:
print "arg must be an iterable"
Larry Bates
Charles Krug wrote:
> List:
>
> I'm working on some methods that operate on (math
fp=open(filename, 'w')
fp.write(newcontents)
fp.close()
For small files this is very efficient.
Larry Bates
kah wrote:
> How do I change a line in a file??
>
> For example I have the follwing text in my file:
>
> line1
> line2
> line3
> line4
>
> How do I
You should take a look at BeautifulSoup at:
http://www.python.org/pypi/BeautifulSoup/2.0.2
Larry Bates
raver2046 wrote:
> here i have a link http://raver2046.ath.cx/CV/";>cv network
> admin
>
> how to extract "cv network admin"
>
>
> here is the co
.
The ReportLab graphics can do barcharts, line charts,
scatter plots, etc. and you can either save as .JPG
files that can be delivered on a web page or as a .PDF
file that the user can download. Hard to say which
would work best for you.
Hope information helps a little.
-Larry Bates
Eckhoff, Mich
mpler.
-Larry Bates
[EMAIL PROTECTED] wrote:
> Hi,
>
> I am sure that this question might have come up repeatedly. Companies
> may not want to distribute their python code in source form. Even
> though pyc files are one option, it gets inconvenient to distribute
> bunch of them
/scipy.interpolate.html
http://cmp.felk.cvut.cz/~kybic/thesis/pydoc/bigsplines.html
http://www.mirror5.com/software/plotutils/plotutils.html
Good Luck
Larry Bates
John J. Lee wrote:
> "Anthra Norell" <[EMAIL PROTECTED]> writes:
>
>
>>Hi,
>>
>>The following are differences
Thanks so much for the offer, I had a friend do this for
me and it works great.
Regards,
Larry Bates
Heiko Wundram wrote:
> Larry Bates wrote:
>
>>
>>
>>The algorithm looks very much like the source code for
>>binascii.crc32 (but I'm not a C programmer).
&g
r of milliseconds
before running a second time. The example just waits for a stop
signal.
Here is a skeleton of a service that should get you started. I
HIGHLY recommend spending the money to purchase the book
(Python Programming on WIN32). There are more extensive examples
than the one you have tha
ple))
False
>>>
The old way was to use type(a), but I think isinstance is
the new "preferred" method.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
You can pass arguments into a python script, see getopt module.
Then to call an external script you would use subsystem module
(or os.system if you are on earlier version of python).
If you can, just make the other python program into a
function and import it as James Stroud suggests in a separate
, but reread the post. He asks "if a given
variable is a character or a number". I figured that even if he
is coming from another language he knows the difference between
"a given variable" and the "contents of a give variable". I guess
we will see ;-). This list is so good, he gets BOTH questions
answered.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
be stored as
binary integers in ASCII (e.g. 'a' = 65, 'b'=66, etc.). You can
go the other direction with chr(x). Not completely sure about
what you want to accomplish, but this eliminates the need for
the dictionaries.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
uot;blah" without the comma of
> length four? Is there a good reason for this or is this a bug?
Additional note:
You should not give a tuple a variable name of tuple, it masks
the built-in tuple() function. This also goes for str, or other
built-ins. This will "bite" you at some point if it hasn't already.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
work? Thanks for the help!
>
Works just fine for me.
Suggestion: You should ALWAYS post your traceback instead of just
saying "Why won't this work?".
Your subject says "Tuples" then your example is on lists.
Were you trying something like this on tuples
iables and it
> contains a 'config' entry, so why doesn't this work?
>
Not entirely sure why you want to do what you have outlined
here but this works:
class Cfg:
pass
#config = Cfg()
def assign(config):
setattr(config, 'Start' , [13, 26, 29, 34])
def foo():
config = Cfg()
assign(config)
print config.Start
foo()
You should probably post what you are trying to do. Maybe we
can make a suggestion about the best approach.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Google is your friend:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438123
-Larry Bates
Tuvas wrote:
> I am building a GUI interface with Tkinter. I need to have a way to
> open and save files. Is there a nice GUI that can do that for me, ei,
> show what files are avaliable,
own, it should help as a guide.
http://motion.sourceforge.net/related/send_jpg.py
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Anyone got any idea how to use this? It looks like it isn't available
> directly from the win32 extensions.
>
> Thanks, MW.
>
Google is your friend:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rras/rras/rasadminusergetin
o I'm a little stumped on where the road
> goes from here..MW.
>
Sorry, I misread your initial post. You should be able to use ctypes
to call the function or perhaps you can dispatch it manually. I'm not
that familiar with the function.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Something like:
def cvt(input):
if input.lower().endswith('k'): return float(input[:-1])*1000
.
. add your other special symbols here
.
return None # didn't find a match
Larry Bates
Suresh Jeevanandam wrote:
> Hi,
> I want to convert a strin
You should probably work through the tutorials.
Use a try block:
try: x=float(s)
except ValueError:
print 'Non-numeric value %s found' % s
-Larry Bates
Suresh Jeevanandam wrote:
> Hi,
> I have a string like,
> s1 = '12e3'
> s2 = 'junk&
e advice on what I'm doing wrong?
>
> Many thanks and much warmth,
>
> planetthoughtful
>
You want to 'append' the string to the list. extend
is used to combine two lists. Since your string isn't
a list Python tries to help and converts it to one for
you. That's why you get the individual letters.
> result.append(name)
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
erent things in one if
statement and it is unclear where self.currentSlice comes from.
You also need a condition on your elif. Perhaps more explanation
is needed (at least for me to help).
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Joe wrote:
> Is Python going to support s syntax the does not use it's infamous
> whitespace rules? I recall reading that Python might include such a
> feature. Or, maybe just a brace-to-indentation preprocessor would be
> sufficient.
>
> Many people think Python's syntax makes sense. There are st
ke XMPRPC, DAV, FTP, that can take quite
a lot of time to implement from scratch. It may not be for you,
but you owe it to yourself to take a look.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
3
If you want to know if list2 is found in list 1
it is as simple as:
if list2 in list1:
#
# Do something here
#
if you want to know if any member of list2 is
found in any list in list 1 then you can just do:
Found=max([y in x for y in list2 for x in list1])
works and you should h
to refer to it by a
name. The best way to do this is to put the class instance
in a dictionary and make the key 'new'
instancedict={}
instancedict['new']=Point()
then you can call methods by:
instancedict['new'].somemethod()
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Preface the update with a rename. If the rename fails,
someone else is updating the file, if it succeeds update
the file and rename back when finished.
Suggestion: ftp is not the best way to handle such a task.
Use a database, XMLRPC or sockets is probably a better
way.
-Larry Bates
[EMAIL
[EMAIL PROTECTED] wrote:
> hi all
>
> could anybody please tell me how can i copy a file from windows file
> systems like FAT12, FAT16,FAT32 and NTFS to EXT2, and EXT3.
> Is their any function in python that we can do the above
>
> Thanks in advance
> Yogi
>
I suspect that you are going to need
n(root,f))
print "Generating jpeg for %s" % f
im.thumbnail(im.size)
im.save(jpgpath, "JPEG", quality=100)
except Exception, e:
print e
continue
print "A jpeg file already exists for %s" % f
This code:
1) only processess .tif files
2) simplifies things by eliminating the splitext methods and
slicing operations.
3) eliminates else branch
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
---
>
> Changing 'list' to 'type(list)' don't change anything
>
Your string variable type is masking the built-in type
function. You should avoid variables with names like
type, list, str, tuple, ... (e.g. built-ins). As they
will mask the built-ins from your program.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
> print statements.
>
> Is there a pythonic way to read in a list from a .INI file with
> ConfigParser? Is this expected behavior for ConfigParser? I would
> not expect this conversion; rather, an exception when trying to write
> the list if the list is not supported.
>
To read lists from .INI files I use following:
listvalues=INI.get(section, option).split(',')
where INI is an instance of ConfigParser
There is the problem of if list items contain commas.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
he script
> is processing...?
>
>
> Hari
This also is shown in Python Cookbook:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299207
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Don't use wx, use native Windows controls that already
exist on the machine. That makes the application very small.
That said, I disagree that 3.5Mb is too much to download. It
only takes about 7 seconds on my machine (cable modem). If your
users won't wait that long, they weren't very interest
What about something like:
supply = supply()
compressor = compressor(supply)
combuster = combuster(compressor)
compressor.append(combuster)
turbine = turbine(combuster)
combuster.append(turbine)
-Larry Bates
[EMAIL PROTECTED] wrote:
> I have a problem. I'm writing a simulation progra
cess module and use something like (not tested):
retcode = call([r' C:\copiedfiles\*.*', cmd_out])
This will wait for execution of to complete prior
to returning.
-Larry Bates
Kilicaslan Fatih wrote:
> When I push a button to trigger the code:
>
> def runCC
.S_IWRITE)
Larry Bates
Anoop wrote:
> Hi All
>
> Please tell me how to check the existence of a file and the read
> permission to the file using python script
>
> Thanks for ur inputs
>
> Anoop
>
--
http://mail.python.org/mailman/listinfo/python-list
ppend/extend
it. IMHO it makes what is going on intuitively obvious.
-Larry Bates
[EMAIL PROTECTED] wrote:
> Bruno,
>
> Thanks. An issue is that I need to be able to link multiple objects to
> a single object etc.
> Say for example using the previous wording, I might have com
>>> d={1:'x',2:'thing',3:'thing',4:'thing',5:'thing', \
6:'z',7:'thing',8:'thing',9:'y'}
>>> [x for x in d if d[x]=="thing"]
[2, 3, 4, 5, 7, 8]
-Larry Bates
guthrie wrote:
>
e sake of practice, and am trying to
> print the name of the class that a traced method belongs to. This seems
> like it should be easy, but I think I've been staring at the problem too
> long.
print print b.__class__.__name__ gives what you want
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
> On Tue, 01 Aug 2006 10:56:52 -0500, Kirk Strauser <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>> Larry Bates wrote:
>>
>>> print print b.__class__.__name__ gives what you want
>> That doesn'
[2])
print "
Now the fun comes when you wish to embellish this with font
sizes, colors, background colors, then the frameworks
come in really handy.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Kkaa wrote:
> I'm using the os.system command in a python script on Windows to run a
> batch file like this:
>
> os.system('x.exe')
>
> The third-party program x.exe outputs some text to the console that I
> want to prevent from being displayed. Is there a way to prevent the
> output of x.exe fr
info from the user's environment.
The "trickiest" part will be to find what code is necessary to track
down the users "home directory" on each different operating system.
Hope this helps.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
win = MyFrame2(self, -1, "", sim_name=sim_name)
win.Show(True)
class MyFrame2(wx.Frame):
def __init__(self, *args, **kwds):
.
.
self.sim_name=kwds.get('sim_name',
n isn't called because the print
statement isn't executed upon entering the function. Has something
changed that I missed?
Thanks in advance for any assistance.
Regards,
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
>
Just some quick ideas (not tested):
change test1.append(create_date) to test1.append((create_date, filename))
that way the filename will tag along during the sorting as a tuple in
the test1 list.
You will also need to change prev_file = walktree(path) to
create_date, prev_file = walktree(p
to
> myself whenever there is an error in the application
>
> thanks a lot
> py
>
Here is a link to a class that will allow you to attach files. You
can either write the HTML to a tempfile and attach or modify a
little to accept a string or cstringIO object instead. H
king for and let the
database do the searching. I can promise you this will almost always be
faster and more flexible. Something like:
Assume the columns are called rownumber, c1, c2, c3, c4 and the table is
indexed on c1, c2, c3, and c4. This will happen almost instantly no matter
how many rows you
Omar wrote:
> I'm learning how to program python. a few questions
>
> a) I'm mostly interested in creating exe's that have to do with music
> -- things to help me keep track of chord progressions, transpositions,
> etc. can anyone point me in the direction of resources on this?
>
> b) I'm also
dirs, you can delete them from the dirs list here and they won't
get walked. You MUST delete them in place with del dirs[n] or
dirs.pop or some other function that deletes in-place.
You might want to type: help(os.walk) to get some more info.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
nstaller can help you with all these things.
The combination of py2exe and Inno Installer is hard to beat.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
in ?
> MemoryError
>
> Any way to get around this problem? I have a machine of 4G memory. The
> total number of data points (float) that I need to read is in the order
> of 200-300 millions.
>
> Thanks.
>
On my 1Gb machine this worked just fine, no memory error.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Yi Xing wrote:
> On a related question: how do I initialize a list or an array with a
> pre-specified number of elements, something like
> int p[100] in C? I can do append() for 100 times but this looks silly...
>
> Thanks.
>
> Yi Xing
>
Unlike other languages this is seldom done in Python. I t
Sounds like you can split the string on a space and throw
away the right side:
s='\\serverName\C:\FolderName1\FolderName2\example.exe' -u ABC -g XYZ
p=s.split(" ", 1)[0]
print p
'\\serverName\C:\FolderName1\FolderName2\example.exe'
Larry Bates
Hitesh wrote:
f AddEquipment(name, data):
equipment[name]=Equipment(data)
same for Equipment class and Component class.
class Equipment:
def __init__(self):
self.components={}
def AddComponent(name, data):
components[name]=Component(data)
class Component:
def __init__(self, data)
self.data=data
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
7;t work at all (not sure why).
Funny thing is that if I select two .txt files and do a Open With
Notepad, Explorer only opens one of them. So I think it is
Explorer that is throwing away the extra arguments. Otherwise
I would expect it to open multiple notepad instances.
-Larry Bates
Thomas
Matthew Wilson wrote:
> I wrote a function that converts a tuple of tuples into html. For
> example:
>
> In [9]: x
> Out[9]:
> ('html',
> ('head', ('title', 'this is the title!')),
> ('body',
> ('h1', 'this is the header!'),
> ('p', 'paragraph one is boring.'),
>
data
f.write(total_data)
f.close
You should take a look at shutil module. It is copyfile method
that makes your code must simpler (and faster I'm sure).
do
import shutl
help(shutil.copyfile)
import shutil
shutil.copyfile(uload_file_name, target_file_name)
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
lazaridis_com wrote:
> I would like to change the construct:
>
> if __name__ == '__main__':
>
> to something like:
>
> if exec.isMain():
>
> My (OO thought) is to place a class in an separate code module and to
> instantiate an singleton instance which would keep th something like
> this:
>
>
ws I use Inno Installer and it can modify these options inside the
.ini file during the installation so that datafilepath points to where
my data actually will live. Works perfectly for me.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Georg Brandl wrote:
> Larry Bates wrote:
>> lazaridis_com wrote:
>>> I would like to change the construct:
>>>
>>> if __name__ == '__main__':
>>>
>>> to something like:
>>>
>>> if exec.isMain():
>>>
&
a wrote:
> where is the link
> thanks a lot for your kind help
> Larry Bates wrote:
>> a wrote:
>>> What is the best way to construct an email in python and also attach a
>>> html file
>>>
>>> the html file to be attached is not on disk, but
Jason Jiang wrote:
> Hi,
>
> How to get the name of the running .py file like the macro _FILE_ in C?
>
> Thanks.
> Jason
>
>
>
import os
import sys
print sys.argv[0]
or if you just want the script and not the full path
print os.path.basename(sys.argv
Tom E H wrote:
> Larry Bates wrote:
>> Tom E H wrote:
>>> My Python application includes some data files that need to be accessed
>>> by modules I distribute with it.
>>>
>>> Where can I put them, and how should I arrange my code, so that it works
>
it was getting completely unmanageable.
If you only have to deal with GUI apps on Windows I guess
VB or Delphi would be fine. If you need to deploy to multiple
platforms (Windows, Linux, Mac) IMHO neither of them will
work very well. C++ is as portable, but the extra code that
you must write
hat it would work for small number of users. With
some good planning you should also be able to architect application
so that you can even change the underlying database later without
too much heartburn.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
;
You have two choices in Python: list or array
For simple lists of things use a list. If you want to
do vector math or matrix-type calculations look at the
array module.
For you simple example, here is the python code:
acctfile=[]
numoffiles=4
data=10
ct=1
for i in xrange(numoffiles-1):
ac
Robert Kern wrote:
> Larry Bates wrote:
>
>> If you want to
>> do vector math or matrix-type calculations look at the
>> array module.
>
> The array module in the standard library does not provide such
> capabilities. If you need them, look at numpy.
>
&
y just use that.
>
> I get the feeling the answer is no, but maybe there's something I've
> missed that will allow me to do this.
>
> Thanks.
You might want to review:
http://karrigell.sourceforge.net/
This comes just about as close to PHP-style "includes" (your term) as I
have seen.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
can't speak to Perforce python module as
I've never used it myself. Start with a small console app and them move on to
more complex applications. You may want to take a look at the py2exe newsgroup
(gmane.comp.python.py2exe) for any questions.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
s very well, is free, and seems to do everything people want in
an installer.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
ave only 1 file
(setup.exe) that needs to be distributed. Doesn't really matter ho
many files it installs when it runs, that's all hidden from the user
anyway.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
readers out here.
Occassionally I will have phantom syntax errors that seem to be
attributable to non-printing characters in a line. Other times the
error is in fact far above the place pointed to by the syntax error.
Start by commenting out large chunks of code with triple quotes a
201 - 300 of 1109 matches
Mail list logo