favorite is PyScripter available at:
http://mmm-experts.com/Products.aspx?ProductId=4
Another good choice is Eclipse with Python plug-in but
it is a very large application. If you do Java and other
development as well as Python that might be an excellent
choice.
-Larry
--
http://mail.python.or
pyscripter, available here:
http://mmm-experts.com/Products.aspx?ProductId=4
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
ould never access it again in the
future. It would then be thrown away by garbage collection.
Proper way is:
class One:
def __init__(self):
self.Two=Two()
Of course Two must be a proper class definition also.
class Two:
def __init__(self):
self.Three=Three()
class
es and functions you will
almost certainly have to look at the source code to make sure of
what they are and how they can be utilized.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
to the printer as it
> does in win98.
>
> jim-on-linux
>
I don't get any such message on my XP Pro Service Pack 2 system
here using your method.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
hat you are asking is a virus/trojan "like" program. There's no reason
you shouldn't be able to write the code to TEMP directory and execute it.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
estions. Thanks in advance.
>
> Cheers,
> Mohan.
>
Object Craft wrote the csv library that predated the one released in
Python 2.3. You can still get it for earlier Python versions here:
http://www.object-craft.com.au/projects/csv/download.html
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
uot;", line 1, in
> AttributeError: 'NoneType' object has no attribute 'fetchall'
>
> Thanks,
> Sean
>
I think you will find that there result returned by the
cur.execute is None upon success. You probably meant:
cur.execute('SELECT * FROM g_rif')
table=cur.fetchall()
Then process table.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
>
Generally I always check the day of week (DOW) of the beginning
and ending dates in the sequence and adjust them so that they
align with "real" weeks. Then it is usually as easy as adding
7 days inside the loop to increment each row. I'm not 100% sure
I understand the problem but perhaps this will help.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
Take a look at ConfigParser module. The format of the file would be
something like:
[members]
peter=16
anton=21
People are accustomed to this format file (windows .ini format).
-Larry
Ilias Lazaridis wrote:
> within a python script, I like to create a collection which I fill with
>
names = [filename.lower() \
for filename in filenames \
if (filename[-4:].lower() == ".asc" and filename[0] != "-" )]
is better rewritten as (not tested):
import glob
filenames=glob.glob(os.path.join(gp.workspace, '*.asc'))
filenames = [f.lower() for f in filenames if not f.st
>
> where errata_package is JUST the errata_topic hash value.
>
> Any advice would be great on how to do that.
>
> Regards,
>
> Johhny
>
You must use 'errata_topic' as index into your dictionary
to get the string and then replace the \n chars.
Example assumes that the dict is pointed to by d):
errata_topic_text=d['errata_topic'].replace('\n',' ')
Hope this helps.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Documents/python/changetext.py", line 9, in ?
> var = str(a[t[something]])
> KeyError: '7704'
>
> I've explained what is needed to happen in the comments. Also, if any of
> you can think of a better way to do this can you possibly tell me this?
> Thanks.
text = '@[EMAIL PROTECTED]@[EMAIL PROTECTED]'
a={'7704':'l','7002':'a','7075':'w'}
u=[]
for c in text.split('@')[1:]:
u.append(a[c])
print ''.join(u)
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
runtime so I need to pass them as arguments.
>
> Thanks
>
>
>
>
Take a look at the subprocess module or on older versions of Python
you can use os.spawn.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
e pointer and I will do
> the rest.
Probably the numeric module:
http://numeric.scipy.org/
But you can also do nested lists.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
files instead of just defining everything as Python classes?
Get good baseclass definitions and use OOP inheritance to
create your specific class instances. I think mixing XML,
language definition file (LDF), LDF to python parser is a LOT
harder (and slower) than just writing the classes outright.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Beep('MB_OK')
> Traceback (most recent call last):
> File "", line 1, in ?
> TypeError: an integer is required
>
> So what do I need to do to play the other sounds listed in the docs (using
> MessageBeep). Thanks.
>
> Louis
>
>
You need to call winso
Ognen Duzlevski wrote:
> Larry Bates <[EMAIL PROTECTED]> wrote:
>>> Now I want to use something like xml.dom.minidom to "parse" the
>>> .xml file into a set of classes defined according to the "language
>>> definition" file. The parse() me
Yes.
To open file:
fp=open(r'C:\directory\filename.txt','r')
To open file to write to:
fp=open(r'C:\directory\filename.txt','w')
You probably need to go through the Python tutorial as
these items are covered.
-Larry Bates
Ernesto wrote:
> Can
try os.path.exists(path)
-Larry Bates
Ernesto wrote:
> Ernesto wrote:
>> I couldn't find this with a search, but isn't there a way to overwrite
>> a previous folder (or at least not perform osmkdir( ) if your program
>> detects it already exists). Thanks !
>
on="1.50",
options={"py2exe": {"compressed": 1,
"optimize": 2,
"bundle_files":1}},
)
If that doesn't help, you may want to post to the py2exe
specific newsgroup at gmain.comp.python.py2exe.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
if it was 50 Mb!
>
> TIA
>
>
> Simon
Use py2exe to create distribution and then use Inno Installer to
create a single setup.exe file that can easily be distributed.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
You should take a look at for the screen-scraping part:
http://www.crummy.com/software/BeautifulSoup/
To put them in your html page all you need to do is to have some
placeholders in your html and use python to replace the placeholders
with the values you get from the other screen.
-La
iler written
> in python?
>
>
> Thomas
>
Google turned up the following:
http://bobomail.sourceforge.net/
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
is necessary for the program to access
ODBC data source. All I did was to observe the changes in the
registry before and after manually setting up a ODBC datasource
and put that code in my Inno script. Works like a charm.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
at a hosting facility that has
rock-solid Internet pipes and generator backed power. It won't
do any good to have a kick-ass server and software that can
handle all types of failures if someone knocking over a power
pole outside your office can take you offline.
Hope info helps.
-Larry Bates
in a hosting facility
--
http://mail.python.org/mailman/listinfo/python-list
You don't have to determine it. Just os.startfile('page1.html')
and let the OS figure it out.
-Larry Bates
John McMonagle wrote:
> Is there a python module which can determine an operating system's
> default web browser application.
>
> I would like to use it i
e I understand, but here goes. I normally
use list comprehensions. I'm assuming that calculate_something()
is acting on a list of items. If not then maybe some underlying
data refactoring is in order. If so you write:
results=[calculate_something(x) for x in list_of_items]
foo=result[x[
l that is important right) for all but device
drivers and highly scientific applications (and even then
there are solutions). The parts of Python that need to be
fast have been rewritten as binary libraries. That way you
get the best of both worlds: high level language that has
fast libraries when required.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
nd
py2exe imbeds the .ZIP file inside the .EXE file (making it
somewhat harder to hack).
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
that I should look into
> and these modules are the ones that will allow me to accomplish what I
> am interested in doing? Thanks for your help.
>
I'll bet you'll find that the cheapest way to to this is to use
PHP and MySQL (both free on even the lowest cost hosting plans).
A
Foo': printFoo, 'printFOO': printFOO}
functions=('printFoo', 'printFOO')
for function in function:
if fdict.has_key(function: fdict[function]()
else:
print "No function named=%s defined" % function
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
and if I have missed obvious docs please take it easy on me
> - I am new here :-)
>
Take a look here. This package works perfectly for us.
http://www.amk.ca/python/code/crypto
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
do this as follows:
Create dictionary with the function names as keys and the pointer to
function definition as value:
def printFoo():
print "Foo"
return
def printFOO():
print "FOO"
return
fdict={'printFoo': printFoo, 'printFOO': printFO
ion about what you are trying to
accomplish before we can help.
Just as a wild guess I think you want a dictionary.
vdict=['baz1': 3.0, 'baz2': None}
vdict['baz2']=4.2
print vdict['baz2']
if you insist on an index you can do:
vars=['
[EMAIL PROTECTED] wrote:
> How do I make a tab character in code to split a line read with tabs in
> it?
>
>
> Thanks.
>
> Tom
>
You should also take a look at csv module. If you are reading lines
that contain tab delimeted data the csv module can make splitting
er program on
another computer I would (so as to not mess up 2.4.2 install).
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
iled language. A good test is to copy the file and measure
the time. You can't make your program run any faster than a copy
of the file itself without making hardware changes (e.g. RAID
arrays, etc.).
You might also want to take a look at csv module. Reading lines
and splitting on delimeters is almost always handled well by csv.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Since the target is Windows only, consider using win32gui
(part of Mark Hammonds win32 extensions) calls to use
native Windows controls. That way you can eliminate
wxWindows altogether. If all you need is a file dialog,
it isn't very difficult.
-Larry Bates
Mikael Olofsson wrote:
> D
your homework, but I'll give you a clue.
You need to get the your coin tosses inside your loop. Otherwise
you only toss the coin once and then loop 100 times with the
same value.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
> Many thanks to you all
> Math
Using a database is good when you want to access data based on
indexes or if you wish to have 1-n relationships between tables.
Plain files don't handle this very well. If all you want to do
is store raw data and get it back, look at pickle and shelve
Use os.walk to iterate over each of these directories and add
all the files contained in each day/month subdirectory into a .zip archive.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
t isn't timing the
> setup of the for loop.
>
> Any ideas what is causing the difference? I'm running Python 2.3 under
> Linux.
>
> Thanks,
>
>
>
Steven,
In timer2 you are making a million extra calls to timer()
function and doing a million additions and a millio
s not exist,
> but ' XXX ' does indeed exist.
>
> Can anyone rescue me from this madness :(
>
> Many Thanks,
> Brad
How about not naming files with leading and trailing spaces on
the Mac? Seems like a bad habit that needs breaking ;-).
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
rtilley wrote:
> Larry Bates wrote:
>> How about not naming files with leading and trailing spaces on
>> the Mac? Seems like a bad habit that needs breaking ;-).
>>
>> -Larry Bates
>
> Users will be users! Tell that to the guys and gals on Macs who like to
Steven D'Aprano wrote:
> On Thu, 23 Feb 2006 14:30:22 -0600, Larry Bates wrote:
>
>> How about not naming files with leading and trailing spaces on
>> the Mac? Seems like a bad habit that needs breaking ;-).
>
> Why is it a bad habit? Because *Windows* is primitiv
ere for it to be saved.
fp=open_file()
print fp.read()
fp.close()
Others have pointed out the filename is a bad choice for a
variable name as it is a pointer to a file object. Most
tutorials and a lot of standard library code use fp.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
("Enter a message: ")
> letter = len(message)
> while (letter > 0):
> newMessage = ""
> newMessage += message[letter-1]
> letter -= 1
> print newMessage
>
>
> Thanks!!
>
> Dan
>
Better was is:
message = ra
py", line 231, in test
> print dont_exist
> NameError: global name 'dont_exist' is not defined
>
>
> So all the exception are raised except the KeyError outside the try/except!
>
> I don't know what can be.
>
> Thanks to all that can help me.
&
' ' \
' ' \
'08:14'
c=BeautifulSoup.BeautifulSoup(test)
times=[]
for i in c.childGenerator():
if i.contents[0] == " ": continue
times.append(i.contents[0])
date=times.pop(0)
day=times.pop(0)
print "date=", date
print "day=", day
print "times=", times
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
hrough the pipes faster than their upper bandwidth.
Just some thoughts to consider.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
ooclass'].method()
in foo.method
>>>
Instances of classes are just like any other data you might put into
a list or a dictionary. I hope that is what you were asking.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
> On Thu, 23 Feb 2006 18:06:46 -0600, Larry Bates
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
>
>> Better was is:
>>
>> message = raw_input("Enter a message: ")
>> print message[::-1]
>>
Jeffrey Schwab wrote:
> Larry Bates wrote:
>
>> IMHO leading and/or trailing spaces in filenames is asking for
>> incompatibilities with cross-platform file access.
>
> With what platforms specifically?
>
>> Much like
>> using single-quote in filena
Steven D'Aprano wrote:
> On Thu, 23 Feb 2006 17:49:31 -0600, Larry Bates wrote:
>
>> Steven D'Aprano wrote:
>>> On Thu, 23 Feb 2006 14:30:22 -0600, Larry Bates wrote:
>>>
>>>> How about not naming files with leading and trailing spaces on
>&
t imported...
> tnx
>
> Fabio
>
You may want to post to the py2exe-specific newsgroup at
gmane.comp.python.py2exe.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
sTrayIcon.py.html
Here is a link that says it works for KDE:
http://rootprompt.org/article.php3?article=8294
This may help with gnome:
http://www.realistanew.com/2005/04/19/bittorrent-tray-icon/
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
t; Gerhard
Pick up a copy of the Python Cookbook, it is full of examples.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
;bundle_files":1}}
)
Of course replace 'server' with the name of your program.
These are merely EXAMPLES. Your specific needs might be
different depending on specifics of your program.
Hope it helps.
Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
__(self, initialvalue=None):
if initialvalue is not None: self.sum=initialvalue
else:self.sum=0
for i in range(10):
sum+=i
b=A(sum)
c=A(sum)
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
y having SvcStop set the event flag so that the
next time through your loop in SvcDoRun you see that the stop has
been issued and exit your while loop. Here is some skeleton code
that I stripped from a working service. Hope it helps. Note: I
copied most of this from Mark Hammond and Andy Robinson
trl.SB_SETTEXT,iPane,extension.GetStringAddr(text))
>
>
> --- swig:
> static PyObject *_wrap_GetStringAddr(PyObject *self, PyObject *args) {
> PyObject *resultobj;
> char *arg0 ;
> int result ;
>
> if(!PyArg_ParseTuple(args,(char *)"s:GetStringAddr",&arg0)) return
> NULL;
> result = (int )GetStringAddr((char const *)arg0);
> resultobj = PyInt_FromLong((long)result);
> return resultobj;
> }
I've run on Dual 1.7, 2.4Ghz Xeon machines and a hyperthreaded
3.0Ghz machine for several years with no problems. I don't think
there is an inherent problem.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
It parses HTML code
and allows for extractions of data from strings like this in a
very easy to use way. If this is a one-off thing, don't bother.
If you do this commonly, BeautifulSoup is worth a little study.
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
t;
> Thanks for your help .
>
> Pierre
>
>
>
You can call methods/functions in a .dll using ctypes.
http://starship.python.net/crew/theller/ctypes/
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
d pass it around.
I'm not 100% sure I understand what you want to accomplish, but I
hope this helps. Have digest return a dictionary of tokens/values.
tokenDict=digest("FOR", "IDENT", "EQ", "INTVAL", "COLON")
then refer to things as tokenDict['ident'], tokenDict['start']
-Larry Bates
--
http://mail.python.org/mailman/listinfo/python-list
pierlau wrote:
> Larry Bates a écrit :
>>
>> pierlau wrote:
>>
>>> Hello,
>>>
>>> I use an OPC server for connection to DC Drive.
>>> I would like to write a small OPC client.
>>> I have the dll OPCDAAuto.dll which contains al
quot;. They
do some work and go to sleep for some period of time, then wake
up and loop. The stop signal comes while they are asleep.
When they wake up, they exit the infinite loop. If you can't
implement a listen-with-timeout it is going to be hard to make
this into a service.
-Larry
foreground
and have it execute in the background (unlike on Linux).
Larry Bates
Harlin Seritt wrote:
> Hi,
>
> I have a script.py that is converted to .exe using py2exe. From another
> script I call script.exe and would like to be able to run this
> script.exe in the background (as wel
the bullet and just learn and write in VB/VBA.
-Larry Bates
Engineer wrote:
> I'm looking for a Python interpreter written in BASIC, preferably
> Visual Basic, and one written in VBA would be best of all. An
> alternative would be a Python-2-Basic compiler.
>
> Unfortunatel
I don't have direct experience by Google turned this up:
http://trevp.net/tlslite/
Larry Bates
scrimp wrote:
> Hello,
>I was wondering if there is any other way to securly connect to an
> FTP site using SSL or TLS? I dont have the option of purchasing
> M2Crypto from t
How about?
put apythonscript_function.py in a separate file
then
inculde apythonscript_function.py at the top of maincode.py
Looks like you probably need to go back and read the tutorial.
-Larry
[EMAIL PROTECTED] wrote:
> H!
>
> I'm trying to find a python function to
PIL is the best way. Or you can call some external program to
do it (using os.system).
Larry Bates
[EMAIL PROTECTED] wrote:
> Hi I would like to know how to resize an Image without using python
> Imaging library.
>
--
http://mail.python.org/mailman/listinfo/python-list
There is a great class for doing just this at:
http://motion.technolust.cx/related/send_jpg.py
I've used it many times and it has worked very
well.
-Larry Bates
praba kar wrote:
> Dear All,
> In Php we can do all the mailing operations like
> sending a text as a m
print "'%s'" % fpath
lexi_file.close() # Remember to close each file
Now you have:
files_and_lines[0][0] -> Line 1 of the first file
files_and_lines[0][1] -> Line 2 of the first file
.
.
.
files_and_lines[0][n] -> Line n of the first file
files_and_lines[1][0] -
Mario,
Here is a function stripped from a working program that uses printpreview
from wxWindows to print out cells from a grid that the user is working
on. Hopefully this can point you in the proper direction.
Regards,
Larry Bates
def DO_printpreview(self, event):
if self._trace
In python they are called decorators, but I've never had a
need to use them myself, but then I'm a little old fashioned.
Larry Bates
Wolfram Kriesing wrote:
> i was already searching and remember i had seen something like "its not
> needed".
>
> Anyway, are
The argument to string format expression needs to be a tuple not a list.
Also, all the string escaping makes this very hard to read. You can
mix single and double quotes to achieve:
print '\t\t\t\n' % \
(number, name, seconds // 60, seconds % 60)
which IMHO is much easier to re
s=-1
#
# Other attributes work just fine
#
a.yyy=10
Larry Bates
Steve wrote:
> Hi,
>
> Read this:
> http://www.python.org/2.2.3/descrintro.html#property
>
> If you still don't understand or are confused about it's usage, ask here.
>
> Hint: Sup
Yes code can be compiled with py2exe. I then use Inno Installer
to create single setup.exe file that installs everything and
registers it for use.
Larry Bates
flyaflya wrote:
> I know using ActivePython can make a COM easily,but I wander how to
> distribute the COM,normal COM can be ins
Might not be the problem but try without the leading
spaces before your method calls.
for s in c.Win32_Service ():
should be
for s in c.Win32_Service():
-Larry
Jean-Sébastien Guay wrote:
> Hello,
>
> I'm pretty new to Python, though I have a fair bit of experience with
>
am (1)". Always write
this as "spam(1)".
-Larry
Jean-Sébastien Guay wrote:
> Hello Larry,
>
>> Might not be the problem but try without the leading
>> spaces before your method calls.
>>
>> for s in c.Win32_Service ():
>>
>> should be
Why not merge the lists together using zip() and then
sort.
info=zip(l1, l2, l3)
info.sort()
info.reverse
Larry Bates
Philippe C. Martin wrote:
> l1 = ['a','b','c']
> l2 = ['toto','titi','tata'] # 'toto' refe
have your php web page access that
information every time it refreshes. The database
would need to be hosted at the website (but most ISPs
now give you free MySQL anyway).
Sort of depends on how often this happens, how complex
the php page is, etc. as to which is best method.
Larry Bates
[EMAIL
Plone/Zope does support the environment you describe. Viacom
uses Zope (and I think Plone) to provide their live video
streaming from their site.
Since Plone/Zope are free you can download and test to your
heart's desire.
Larry Bates
[EMAIL PROTECTED] wrote:
> I'm conducting
Python does have struct module that allows you to create
C-style structures.
Googling for "python struct" give us:
http://docs.python.org/lib/module-struct.html
I use it a lot to interface to COM object and to call
methods in .DLLs.
Larry Bates
Gijs Korremans wrote:
> Hi,
&
tail about application).
Even if you don't want to use all of Zope the ZODB is a well
tested persistent Python object store that might prove
helpful.
There are many other projects supporting WAY more than 200
users that are written in Python.
-Larry Bates
john67 wrote:
> The company I work for is
code optimization.
Larry Bates
[EMAIL PROTECTED] wrote:
> Is there a better way to code nested for loops as far as performance is
> concerned.
>
> what better way can we write to improve the speed.
> for example:
> N=1
> for i in range(N):
>for j in range(N):
>
s probably elsewhere. If there
are many, indexing on GUID would provide speed improvement.
Larry Bates
bart wrote:
> I run a python website on a IIS server. I replaced my flat file DB
> with SQL server, but the reads are very slow. 7 seconds for 3 querrys
> like these
>
> conn= ad
I don't know about emacs, but this works in PythoWin IDE.
import time
import sys
for i in range(20):
sys.stdout.write(str(i)+' ')
sys.stdout.flush()
time.sleep(1)
-Larry
[EMAIL PROTECTED] wrote:
> Hello,
>
> I tried this code in emacs.
> for i in
You use PIL (Python Imaging Library) if you want simple
conversion or ReportLab if you want to combine several along with
text, etc.
-larry
Raghul wrote:
> Hi friends
> Is it possible to convert jpg to pdf in python. I need a
> program to convert jpg format file to pdf. Is
x for x in ini.options(section)
if x.lower().startswith('ignore_')]
ignores_list=[]
for option in ignore_options:
ignores_list.append(ini.get(section, option))
Larry Bates
Thomas Guettler wrote:
> Hi,
>
> I need a config like this:
>
> [sync
I have found that the SmtpWriter class "hides" all the
complexity in creating emails like you want to send.
Check it out here:
http://motion.sourceforge.net/related/send_jpg.py
HTH,
Larry Bates
Syscon, Inc.
Ivan Shevanski wrote:
> I really can't figure out anything about the
oogle turned
these up quickly.
Larry Bates
Greg Lindstrom wrote:
> Hello-
>
> I just picked up my daughters' report cards for the year (they did well,
> thank-you) and was approached by the school administrator about writing
> an Acess application to help track attendance
You should supply more information:
What operating system?
What do you mean by "drive folder"? Does this mean file dialog?
Or perhaps you mean an Explorer Window?
Larry Bates
John Henry wrote:
> Can somebody please tell me how to pop open a drive folder from a
> Python scri
Curiously yours, thank in advance,
>
How about something like:
class fooStruct(ctypes.Structure):
_pack_ = 1
_fields_=[]
def __init__(self, fields):
self._fields_=fields
ctypes.Structure.__init__(self)
a=fooStruct([('first', 3*ctypes.c_ubyte),
('second', 4*ctypes.c_ubyte)])
print a._fields_
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
> Larry Bates wrote:
>> I have a project that I wanted to solicit some advice
>> on from this group. I have millions of pages of scanned
>> documents with each page in and individual .JPG file.
>> When the documents were scanned the people tha
her.__dict__)
>
> HTH,
>
Have you looked at Pyro? Maybe it would work for you.
http://pyro.sourceforge.net/
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
> Larry Bates wrote:
>> Steve Holden wrote:
>>> Larry Bates wrote:
>>>> I have a project that I wanted to solicit some advice
>>>> on from this group. I have millions of pages of scanned
>>>> documents with each page in
use:
maxzipbytesupperlimit=int((1L<<31)-(8*(1<<20)))
That is 2Gb-8Mb maximum TOC limit of a zip file.
I look at zipbytes add the uncompressed size of the next file, if it
exceeds maxzipbytesupperlimit, I close the file and move to the next
zip archive. If it is smaller, I add the file to the archive.
Hope this helps.
-Larry
--
http://mail.python.org/mailman/listinfo/python-list
James T. Dennis wrote:
> Some Other Guy <[EMAIL PROTECTED]> wrote:
>> vdicarlo wrote:
>>> I am a programming amateur and a Python newbie who needs to convert
>>> about 100,000,000 strings of the form "1999-12-30" into ordinal dates
>>> for sorting, comparison, and calculations. Though my script doe
1001 - 1100 of 1904 matches
Mail list logo