MackS wrote:
> This program is meant to process relatively long strings (10-20 MB) by
> selectively modifying small chunks one at a time.
...
> Can I get over this performance problem without reimplementing the
> whole thing using a barebones list object?
Is that a problem? Are you using stri
Replying to myself... the first sign of madness *wink*
Steven D'Aprano wrote:
> size = 1024*1024*20 # 20 MB
> original = "A" * size
> copy = [None] * size
> for i in range(size):
> copy[i] = original[i].lower()
> copy = ''.join(copy)
Do you notice the premature optimization? Rather than
Op 2005-11-10, Mike Meyer schreef <[EMAIL PROTECTED]>:
> [Context recovered from top posting.]
>
> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
>> Daniel Crespo wrote:
>>> Well, I hope that newcomers to Python don't confuse himselves :)
>> This mutable/immutable object and name/variable is confu
Antoon Pardon <[EMAIL PROTECTED]> writes:
> We could then have something like the following.
>
> a = 5
> b = a
> a @= 7
> b ==> would result in 7.
Ouch! :-(((
Can't you live with
a = [5]
b = a
a[0] = 7
so b[0] is now 7.
--
http://mail.python.org/mailman/listinfo/python-list
Claudio Grondi wrote:
> A small hint about the Web-site:
> At least to me, the links to the documentation as e.g.
>
> http://pysizer.8325.org/doc/auto/home/nick/sizer-trunk/doc/auto/scanner.html
> are broken (no big thing, because the distro has it anyway).
>
Oops. That should be fixed now.
--
Hello,
how can I clone a class instance?
I have trouble finding that in the documentation...
thanks and best regards,
Yves
--
http://mail.python.org/mailman/listinfo/python-list
http://docs.python.org/lib/module-copy.html
I would assume you want deep/shallow copy.
Yves Glodt wrote:
> Hello,
>
> how can I clone a class instance?
> I have trouble finding that in the documentation...
>
> thanks and best regards,
> Yves
--
http://mail.python.org/mailman/listinfo/python-li
Alex Martelli <[EMAIL PROTECTED]> wrote:
> As things stand now (gmpy 1.01), an instance d of decimal.Decimal cannot
> transparently become an instance of any of gmpy.{mpz, mpq, mpf}, nor
> vice versa (the conversions are all possible, but a bit laborious, e.g.
> by explicitly going through stri
Someone once asked about this an got no answer:
http://groups.google.dk/group/comp.lang.python/browse_frm/thread/c3cc0b8d7e9cbc2/ff11efce3b1776cf?lnk=st&q=python+http+%22keep+alive%22&rnum=84&hl=da#ff11efce3b1776cf
Maybe I am luckier :)
Does anyone know how to do Keep-Alive with urllib2, that is
Peter <[EMAIL PROTECTED]> wrote:
> First off, please explain what you are talking about better next time.
>
> Second, What on earth are you talking about?
>
> "f" is a file object, correct?
>
> Are you trying to close a file by typing f.close or is the file closing
> when you type f.close?
[ss2003]
> I am stuck at above after doing a lot of f.write for every line of HTML
> . Any betterways to do this in python?
See the "Templating Engines" section of
http://wiki.python.org/moin/WebProgramming - I hope you have a few hours to
spare! 8-)
--
Richie Hindle
[EMAIL PROTECTED]
hi
i have fucntion that generates a HTML page
def genpage(arg1,arg2):
print ''' BLAH BLAH.%s %s
''' % (arg1, arg2)
print ''' blah blah... %s %s
''' % (arg1,arg2)'
The func is something like that, alot of open''' and closing ''' triple
quotes. anyway, i wish to
"john boy" <[EMAIL PROTECTED]> wrote:
> ok...I am running the following program:
>
> def printMultiples (n):
> i = 1
> while i <= 6:
> print n*i, ' \t ',
> i = i + 1
> i = 1
> while i <= 6:
> printMultiples(i)
> i = i + 1
>
> this is supposed to return a simp
is there any python code doing this:
there are two line segments (2x+y-1=0 with the coordinates of two ending points are (1,-1) and (-1,3);
x+y+6=0 with the coordinates of two ending points are (-3,-3) and
(-4,-2);). They extend and when they meet each other, stop extending.
how can i use python t
[EMAIL PROTECTED] wrote:
> The Digital Mars D compiler is a kind of "improved c++", it contains a
> "foreach" statement:
> http://www.digitalmars.com/d/statement.html#foreach
>
> Usage example:
> foreach(int i, inout int p; v1) p = i;
>
> Is equal to Python:
> for i in xrange(len(v)): v[i] = i
[.
is there any python code doing this:
there are two line segments (2x+y-1=0 with the coordinates of two ending points are (1,-1) and (-1,3);
x+y+6=0 with the coordinates of two ending points are (-3,-3) and
(-4,-2);). They extend and when they meet each other, stop extending.
how can i use python t
Op 2005-11-14, Paul Rubin schreef :
> Antoon Pardon <[EMAIL PROTECTED]> writes:
>> We could then have something like the following.
>>
>> a = 5
>> b = a
>> a @= 7
>> b ==> would result in 7.
>
> Ouch! :-(((
>
> Can't you live with
>
> a = [5]
> b = a
> a[0] = 7
>
> so b[0] is now 7.
And what do
David Pratt wrote:
> My code so far. I guess my problem is how to generate a tuple
> dynamically when it is immutable?
you can use tuple() to convert lists to tuples.
>>> x = []
>>> x.append(1)
>>> x.append(2)
>>> x.append(3)
>>> tuple(x)
(1, 2, 3)
but doesn't fetchall a
Hi,
Before 2.2 I could initialize multiple super classes like this:
class B(A,AA):
def __init__(self, args):
A.__init__(self,args)
AA.__init__(self,args)
Tutorials say that since python 2.2 superclasses should be initialized
with the super() construct.
class A(object):
de
Hi Peter,
I'm aware of the Enthought distribution, which really is my preferred
2.3 Python distribution.
Problem is that many programs I'm working on would require both 2.4 &
SciPy
What kind of puzzles me is that SciPy.core is available for wintel 2.4,
is that an indication a full SciPy distribut
Hi all
Am trying to read an html page using win32com in the following way.
from win32com.client import Dispatch
ie = Dispatch("InternetExplorer.Application")
ie.Navigate("https://secure.authorize.net/";)
doc =ie.Document
print doc.body.innerHTML
with this code am easily able to read the
I have four lists:
lisA=[1,2,3,4,5,6,9]
lisB=[1,6,5]
lisC=[5,6,3]
lisD=[11,14,12,15]how can I write a function to compare lisB, lisC and lisD with lisA, if they share two continuous elements (the order does not matter), then return 1, otherwise return 0. For example, lisA, lisB and lisC have 5,6 or
Hi all
Am trying to read an html page using win32com in the
following way.
from win32com.client import Dispatch
ie = Dispatch("InternetExplorer.Application")
ie.Navigate("https://secure.authorize.net/")
doc =ie.Document
print doc.body.innerHTML
with this code am easily
able to
Mike Meyer wrote:
> > I have considered distributing my program as open source but with
> > encrypted data. Unfortunately anyone can just read the source to
> > determine the decryption method and password. Maybe I could put that
> > into an extension module, but that just moves the weak link along
Alex Greif wrote:
> BUT what happens if B extends from A and AA like:
>
> class A(object):
> def __init__(self, args):
> ...
>
> class AA(object):
> def __init__(self, args):
> ...
>
> class B(A,AA):
> def __init__(self, args):
> super(B, self).__init__(args)
>
>
> How can I tell that B.__ini
Alex Martelli wrote:
> As things stand now (gmpy 1.01), an instance d of decimal.Decimal cannot
> transparently become an instance of any of gmpy.{mpz, mpq, mpf}, nor
> vice versa (the conversions are all possible, but a bit laborious, e.g.
> by explicitly going through string-forms).
>
> I'm thin
Hi,
look for SciTE
http://www.scintilla.org/SciTE.html
it is small, fast and lightweight
Alex Greif
http://www.fotobuch-xxl.de/
D H wrote:
> [EMAIL PROTECTED] wrote:
> > i want some python ide use pygtk
> > eric3 is good for me ,but i like gtk,so i want
> Zope has WebDAV support and is written in Python. You could
> use Zope or perhaps use "parts" of it (since it is open source).
I wouldn't use Zope as file storage. The ZODB is inefficient for storing big
files.
--
damjan
--
http://mail.python.org/mailman/listinfo/python-list
On 11/14/05, Ben Bush <[EMAIL PROTECTED]> wrote:
> is there any python code doing this:
> there are two line segments (2x+y-1=0 with the coordinates of two ending
> points are (1,-1) and (-1,3);
> x+y+6=0 with the coordinates of two ending points are (-3,-3) and
> (-4,-2);). They extend and when th
Is
http://heanet.dl.sourceforge.net/sourceforge/scipy/scipy-0.4.3.win32-py2.4.exe
not what are you looking for?
Claudio
"jelle" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Hi Peter,
>
> I'm aware of the Enthought distribution, which really is my preferred
> 2.3 Python dis
Hi Fredrik. Many thanks for your reply and for the tuple tip. The
cursor.fetchall returns a list of lists in this instance with each list
in the main list containing the field values. With the tip, I
simplified my code to:
vlist_dict = {}
record_count = 0
for record in cursor.fetchall():
David Pratt wrote:
> With the tip, I
> simplified my code to:
>
> vlist_dict = {}
> record_count = 0
> for record in cursor.fetchall():
> record_count += 1
> vlist_dict[record_count] = tuple(record)
> print vlist_dict
I missed your original post, so forgive me if I'm missing the point
The utility is designed to run in the background and maintain/update a
parallel copy of a production system database. We are using the
stored procedure to do a If Exist, update, else Insert processing for
each record.
The originating database is a series of keyed ISAM files. So we need
to read
The ones that were best for me:
-Python 2.1 Bible (Dave Brueck and Stephen Tanner)
(dated but good to learn)
-Python Cookbook (Alex Martelli, Anna Martelli
Ravenscroft & David Ascher)
If you write for Windows:
Python Programming on Win32 (Mark Hammond & Andy
Robinson)
Larry Bates
David Rasmu
Raymond L. Buvel <[EMAIL PROTECTED]> wrote:
...
> This is a bit off topic but I would like to know how you would go about
> doing an implicit operation with an mpz and Decimal becoming a Decimal.
I would tweak Decimal.__new__ to accept an mpz and perform an int() on
it before proceeding as it d
Hola, me llamo Andres de la cuadra, soy un usuario de python en chile y me
gustaría saber como puedo cerrer un programa a través de python. Yo se que
con la librería os puedo ejecutar programas, pero no e encontrado una
librería para poder cerrarlos
Gracias
--
http://mail.python.org/mailman/li
Antoon Pardon <[EMAIL PROTECTED]> writes:
> Op 2005-11-10, Mike Meyer schreef <[EMAIL PROTECTED]>:
>> [Context recovered from top posting.]
>> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
>>> Daniel Crespo wrote:
Well, I hope that newcomers to Python don't confuse himselves :)
>>> This muta
> We are using the stored procedure to do a If Exist, update, else Insert
> processing for
> each record.
Consider loading the data in batches into a temporary table and then
use a single insert statement to insert new records and a single update
statement to update existing ones. This way, you a
Andres de la Cuadra wrote:
> Hola, me llamo Andres de la cuadra, soy un usuario de python en chile y me
> gustaría saber como puedo cerrer un programa a través de python. Yo se que
> con la librería os puedo ejecutar programas, pero no e encontrado una
> librería para poder cerrarlos
Hola Andres,
On 14 Nov 2005 11:20:53 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote:
>Op 2005-11-14, Paul Rubin schreef :
>> Antoon Pardon <[EMAIL PROTECTED]> writes:
>>> We could then have something like the following.
>>>
>>> a = 5
>>> b = a
>>> a @= 7
>>> b ==> would result in 7.
>>
>> Ouch! :-(((
>>
>> Can
Hello,
If you want some goood examples of reading Web pages and automating
this process
I have a class that wraps all these functions.
http://pamie.sourceforge.net
But for your problem:
You are trying to read the page before it is completely loaded
either add a wait function or a simple sleep (
Hi,
Should execute() be allowed to execute multiple operations?
e.g.
from dbi import *
conn = connect(database="test")
curs = conn.cursor()
curs.execute("""
INSERT INTO test_table VALUES (1, 'one');
INSERT INTO test_table VALUES(2, 'two');
Yves Glodt wrote:
>
>
> puedes cerrer un programa con os.kill, pero depende de tu plataforma,
> por ejemplo en linux (no se para windows):
>
> os.kill(pid_del_proceso, 9)
>
>>
Y tambien, algunas platformas necesita el mandato "sudo", como esto:
os.system('echo su_contraseña | sudo -S kill pid
David Rasmussen wrote:
> What is the best book for Python newbies (seasoned programmer in other
> languages)?
>
> /David
A couple of years ago I was in the same boat you're in now. I learned
from _Python in a Nutshell_ by Alex Martelli and still use it as my
main reference. (It only covers up to
> Just an idea: because in CherryPy it is running in multithreading mode?
> If you are using threads together with COM stuff, you will have to
> add pythoncom.CoInitialize() and pythoncom.CoUninitialize() calls
> in your code -- for each thread.
That worked perfectly. Thanks a million!
I used to
[EMAIL PROTECTED] wrote:
> Hi,
>
> Should execute() be allowed to execute multiple operations? [...]
You best ask such questions on the DB-SIG. I say "no" and I think most
people there will agree.
Most DB-API modules will accept multiple statements, but that's an
implementation artifact, and n
[EMAIL PROTECTED] wrote:
> hi
> i have fucntion that generates a HTML page
>
> def genpage(arg1,arg2):
>print ''' BLAH BLAH.%s %s
> ''' % (arg1, arg2)
>
>print ''' blah blah... %s %s
>
> ''' % (arg1,arg2)'
>
> The func is something like that, alot of open'''
danger wrote:
> hi everybody, i have a problem with py2exe that gives me this error:
>
> ImportError: could not import pango
> ImportError: could not import pango
> Traceback (most recent call last):
> File "acqua.py", line 40, in ?
> File "gtk\__init__.pyc", line 113, in ?
> AttributeError: '
On 13 Nov 2005 22:57:50 -0800, "MackS" <[EMAIL PROTECTED]> wrote:
>Hello everyone
>
>I am faced with the following problem. For the first time I've asked
>myself "might this actually be easier to code in C rather than in
>python?", and I am not looking at device drivers. : )
>
>This program is mea
I need to take a screen shot of the computer screen.
I am trying to use PIL and I saw there is ImageGrab...however it only
works on Windows. Is there a platform-independent ability to work
around this?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
rest2web 0.4.0 alpha is now available.
http://www.voidspace.org.uk/python/rest2web/
What's New ?
==
See
http://www.voidspace.org.uk/python/rest2web/reference/changelog.html#version-0-4-0-alpha-2005-11-11
Lots of bugfixes and new features since the 0.3.0 release.
Includes a new gallery
Ben Finney a écrit :
> Michael <[EMAIL PROTECTED]> wrote:
>
>>Ben Finney wrote:
>>
>>>I've yet to see a convincing argument against simply assigning
>>>values to names, then using those names.
>>
>>If you have a name, you can redefine a name, therefore the value a
>>name refers to is mutable.
>
>
David Pratt wrote:
> Hi Fredrik. Many thanks for your reply and for the tuple tip. The
> cursor.fetchall returns a list of lists in this instance with each list
> in the main list containing the field values. With the tip, I
> simplified my code to:
>
> vlist_dict = {}
> record_count = 0
> for rec
I am running the following program:
def print Multiples (n, high):
i = 1
while i <= high:
print n*i, ' \t' ,
i = i + 1
print
def printMultTable (high):
i = 1
while i <= high:
print Multiples (i, high)
i = i + 1
printMultiples(8,8)
printMul
Hello
I would like to create an API for a piece of Python
code. The API is for use by non Python code.
It should support interaction in both directions,
both accessing functions on the API and the ability for the API to raise events
on its clients.
What is the best way to do that?
I though o
Webware 0.9 has been released.
Webware for Python is a suite of Python packages and tools for
developing object-oriented, web-based applications. The suite uses well
known design patterns and includes a fast Application Server, Servlets,
Python Server Pages (PSP), Object-Relational Mapping, Tas
Bengt Richter wrote:
> You may be interested in reviewing
>
>
> http://groups.google.com/group/comp.lang.python/browse_thread/thread/f96b496b6ef14e2/32d3539e928986b3
>
> before continuing this topic ;-)
Interesting indeed, I mean the argument of why python does it this way.
I see the equiva
"john boy" <[EMAIL PROTECTED]> wrote:
> I am running the following program:
>
> def print Multiples (n, high):
> i = 1
> while i <= high:
> print n*i, ' \t' ,
> i = i + 1
> print
> def printMultTable (high):
> i = 1
> while i <= high:
> print Multip
Hi,
Is there a python based tool to cut mp3 and wav file at a start and end
time? I'm looking for a python script that can output a new wav or mp3
file based on star and endpoint.
Thank you
--
http://mail.python.org/mailman/listinfo/python-list
David Rasmussen wrote:
> What is the best book for Python newbies (seasoned programmer in other
> languages)?
I think most of the best books have been mentioned, but I thought
that I'd add some comments. After all, different people have different
ways of learning, and like different book styles.
I'm getting an error in a Python script I'm writing: "not enough
arguments for format string." The error comes at the end of the
os.system command, referenced below. Any ideas?
---
import EasyDialogs
import os
import sys
password = EasyDialogs.AskPassword("To launch Ethereal, please enter
yo
Hey Kevin,
I think I see your issue. So from http://docs.python.org/lib/typesseq-strings.html:
If format requires a single argument, values may be a
single non-tuple object. Otherwise, values must be a tuple with
exactly the number of items specified by the format string, or a
single mapping
Missing a comma there :)
On 14/11/05, johnnie pittman <[EMAIL PROTECTED]> wrote:
> So the line above should be:
>
> os.system('open -a X11.app; cd ~/; printenv; DISPLAY=:0.0; export
> DISPLAY; echo %s | sudo -S %s; sudo -k' % (password binpath))
>
> try that.
os.system('open -a X11.app; cd
Kevin Walzer a écrit :
> I'm getting an error in a Python script I'm writing: "not enough
> arguments for format string." The error comes at the end of the
> os.system command, referenced below. Any ideas?
>
> ---
>
> import EasyDialogs
> import os
> import sys
>
>
> password = EasyDialogs.AskP
I have a comma delimited text file that has multiple instances of
multiple commas. Each file will contain approximatley 300 lines. For
example:
one, two, threefour,fivesix
one, two, three,four,,eighteen, and so on.
There is one time when multiple commas are allowed. Just prio
I am trying to write a GUI with tkinter that displays the stdout from a
regular C/C++ program in a text widget.
The idea i was trying to use was as follows:
1) use "popen" to execute the C/C++ program
2) then use "tkinter.createfilehandler" to create a callback that would
be called when the C/C++
Dear all,
The source code is available in the download section: www.snakecard.com
Regards,
Philippe
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
"MackS" <[EMAIL PROTECTED]> wrote:
> Hello everyone
>
> I am faced with the following problem. For the first time I've asked
> myself "might this actually be easier to code in C rather than in
> python?", and I am not looking at device drivers. : )
>
> This progr
yb wrote:
> Hi,
>
> Is there a python based tool to cut mp3 and wav file at a start and end
> time? I'm looking for a python script that can output a new wav or mp3
> file based on star and endpoint.
>
> Thank you
>
there is a wave module
>>> import wave
>>> dir(wave)
['Chunk', 'Error', 'WA
On Mon, 14 Nov 2005 09:53:34 -0500, Mike Meyer <[EMAIL PROTECTED]> wrote:
>Antoon Pardon <[EMAIL PROTECTED]> writes:
>> Op 2005-11-10, Mike Meyer schreef <[EMAIL PROTECTED]>:
>>> [Context recovered from top posting.]
>>> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
Daniel Crespo wrote:
>>>
On Nov 14, striker wrote:
> I have a comma delimited text file that has multiple instances of
> multiple commas. Each file will contain approximatley 300 lines.
> For example:
>
> one, two, threefour,fivesix
> one, two, three,four,,eighteen, and so on.
>
> There is one time whe
striker wrote:
> I have a comma delimited text file that has multiple instances of
> multiple commas. Each file will contain approximatley 300 lines. For
> example:
>
> one, two, threefour,fivesix
> one, two, three,four,,eighteen, and so on.
>
> There is one time when multiple
Jeffrey Schwab wrote:
> [EMAIL PROTECTED] wrote:
...
>> def genpage(arg1,arg2):
>>print ''' BLAH BLAH.%s %s
>> ''' % (arg1, arg2)
...
>> i wish to print all these into a HTML output file so that
>> when i click on it, it shows me the html page. How can i do that?
> ...
> Why
Thanks Fredrik for your help. Really short and efficient - very nice!
Regards,
David
On Monday, November 14, 2005, at 12:12 PM, Fredrik Lundh wrote:
> I meant to write
>
> d = {}
> for index, record in enumerate(cursor.fetchall()):
> d[index+1] = tuple(record)
>
> which can be sh
Pierre Barbier de Reuille wrote:
> Please, note that I am entirely open for every points on this proposal
> (which I do not dare yet to call PEP).
I still don't see why you can't just use strings. The only two issues I
see you might have with them are a) two identical strings might not be
identi
using the following program:
fruit = "banana"
index = 0
while index < len (fruit):
letter = fruit[index-1]
print letter
index= index -1
this program is supposed to spell "banana" backwards and in a vertical patern...it does thisbut after spelling "banana" it gives an error me
I use urllib2 to do some simple HTTP communication with a web server. In
one "session", I do maybe 10-15 requests. It seems that urllib2 opens op
a connection every time I do a request. Can I somehow make it use _one_
persistent connection where I can do multiple GET->"receive data" passes
befo
I've been developing a piece of software using Tix. In particular, I'm
using the HList widget. I was attempting to use the info_bbox() mentod of
that class to get the bounding box of a list entry. I'm using the release
version Python 2.4.2. When I look in Tix.py I see that info_bbox() is not
john boy wrote:
> using the following program:
>
> fruit = "banana"
> index = 0
> while index < len (fruit):
> letter = fruit[index-1]
> print letter
> index= index -1
>
> this program is supposed to spell "banana" backwards and in a vertical
> patern...it does thisbut after
"john boy" <[EMAIL PROTECTED]> wrote:
> using the following program:
>
> fruit = "banana"
> index = 0
> while index < len (fruit):
> letter = fruit[index-1]
> print letter
> index= index -1
> after spelling "banana" it gives an error message:
> refering to line 4: letter = fruit[in
> Note, however, that there are more pythonic ways to perform this task.
> You might try:
>
> for index in range(len(fruit)):
>letter = fruit[-index-1]
>print letter
Or, if you're *really* just trying to reverse the string, then the
following might read more easily (although it's probably
"Ben Sizer" <[EMAIL PROTECTED]> writes:
>> It is? Is the Python disassembler so much advanced over the state of
>> the art of binary disassemblers, then? Or maybe it's the Python
>> decompilers that are so advanced?
> Decompyle (http://www.crazy-compilers.com/decompyle/ ) claims to be
> pretty adva
Steve Holden wrote:
> Note, however, that there are more pythonic ways to perform this task.
> You might try:
>
> for index in range(len(fruit)):
> letter = fruit[-index-1]
> print letter
>
> as one example. I'm sure other readers will have their own ways to do
> this, many of them more elegan
Thanks for sharing it. I am interested in the GINA part.
Philippe C. Martin wrote:
> Dear all,
>
> The source code is available in the download section: www.snakecard.com
>
> Regards,
>
> Philippe
--
http://mail.python.org/mailman/listinfo/python-list
I have not tested it with longhorn yet, but it works fine with XP-pro and
2000.
Regards,
Philippe
Kris wrote:
> Thanks for sharing it. I am interested in the GINA part.
>
>
> Philippe C. Martin wrote:
>> Dear all,
>>
>> The source code is available in the download section: www.snakecard.com
Compared to your program, I
* Made sure that the slave program actually flushed its stdout buffers
* didn't call read(), which will by default continue reading until
it reaches EOF, not merely read the available data
#!/usr/bin/env python
import sys, time, Tkinter, itertools, _tkinter, os
if
Since this is a bug in Python (Tix.py), it should be submitted to the Python
Patch tracker at sf.net/projects/python
You need a free "sourceforge" account to submit an item to the bug or patch
tracker.
Jeff
pgp1zmMFcYHrz.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo
Hi,
Can anyone please recommend a widget library for text console, that works
not only on *nix systems but windows /as well/?
I'm looking for something a bit higher-level than pure curses, preferably
with a gui-like set of widgets, event loop, handler methods etc.
Thanks in advance for your reco
On 2005-11-14, aum <[EMAIL PROTECTED]> wrote:
> Can anyone please recommend a widget library for text console,
> that works not only on *nix systems but windows /as well/?
>
> I'm looking for something a bit higher-level than pure curses,
> preferably with a gui-like set of widgets, event loop, ha
Rocco Moretti wrote:
> Pierre Barbier de Reuille wrote:
>> Please, note that I am entirely open for every points on this proposal
>> (which I do not dare yet to call PEP).
>
> I still don't see why you can't just use strings.
As does Guido.
Reinhold
--
http://mail.python.org/mailman/listinfo/py
In article <[EMAIL PROTECTED]>,
Jo Schambach <[EMAIL PROTECTED]> wrote:
>I am trying to write a GUI with tkinter that displays the stdout from a
>regular C/C++ program in a text widget.
>The idea i was trying to use was as follows:
>
>1) use "popen" to execute the C/C++ program
>2) then use "tkint
Pierre Barbier de Reuille <[EMAIL PROTECTED]> wrote:
> The problem is not about having something constant !
> The main point with symbols is to get human-readable values.
> Let say you have a symbol "opened" and a symbol "closed". The state
> of a file may be one of the two.
from some_enum_mod
Thanks, that seems to work.
maybe one more question on this subject:
how can i use the callback function to the "createfilehandler" call from
within a class?
in other words, what would be the signature of the callback function, if
I made it a member of a class?
The documentation says that the cal
David Rasmussen wrote:
> I use urllib2 to do some simple HTTP communication with a web server. In
> one "session", I do maybe 10-15 requests. It seems that urllib2 opens op
> a connection every time I do a request. Can I somehow make it use _one_
> persistent connection where I can do multiple G
Diez B. Roggisch wrote:
> David Rasmussen wrote:
>> I use urllib2 to do some simple HTTP communication with a web server. In
>> one "session", I do maybe 10-15 requests. It seems that urllib2 opens op
>> a connection every time I do a request. Can I somehow make it use _one_
>> persistent connecti
I was wondering how i could parse the contents of a file into an array.
the file would look something like this:
gif:image/gif
html:text/html
jpg:image/jpeg
...
As you can see, it contains the mime type and the file extension
seperated by commas, 1 per line. I was wondering if it was possible t
Craig Marshall wrote:
> Or, if you're *really* just trying to reverse the string, then the
> following might read more easily (although it's probably longer):
> fruit = list(fruit)
> fruit.reverse()
> fruit = ''.join(fruit)
same thing, on one line:
fruit = "".join(reversed(fruit))
same thi
On Mon, 14 Nov 2005 17:15:04 +0100, Pierre Barbier de Reuille wrote:
> The problem is not about having something constant !
> The main point with symbols is to get human-readable values.
> Let say you have a symbol "opened" and a symbol "closed". The state of a
> file may be one of the two.
>
> I
> I was wondering how i could parse the contents of a file into an array.
> the file would look something like this:
>
> gif:image/gif
> html:text/html
> jpg:image/jpeg
Try something like this:
d = {}
for line in open("input.txt").readlines():
ext, mime = line.strip().split(":")
d[ext] = mim
On 2005-11-14, Rocco Moretti <[EMAIL PROTECTED]> wrote:
>
>> Please, note that I am entirely open for every points on this proposal
>> (which I do not dare yet to call PEP).
>
> I still don't see why you can't just use strings.
Same here. In the situations described, I always use strings
and have
1 - 100 of 147 matches
Mail list logo