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,
I'd like to announce the first release of PySizer, a memory usage
profiler for Python code.
PySizer was written as part of Google's Summer of Code.
The source, documentation and so on are at http://pysizer.8325.org.
The current release is at
http://pysizer.8325.org/dist/sizer-0.1.tar.gz.
The code
Dear all,
I have decided to focus my activities on development and support.
I have released SnakeCard's produt line source code under the GPL licence
www.snakecard.com)
It includes:
SCF: SnakeCard Framework (software=Python)
SCFB: SnaleCard Framework Bundle (software=Python, applets BasicCard
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 string
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 confusing.
Only if
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-list
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
Someone once asked about this an got no answer:
http://groups.google.dk/group/comp.lang.python/browse_frm/thread/c3cc0b8d7e9cbc2/ff11efce3b1776cf?lnk=stq=python+http+%22keep+alive%22rnum=84hl=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?
I would
[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 ''' div align=rightfont size=-1BLAH BLAH.%s %s
''' % (arg1, arg2)
print ''' table blah blah... %s %s
/table''' % (arg1,arg2)'
The func is something like that, alot of open''' and
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 simple multiplication
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
[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
[...]
So the
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
Op 2005-11-14, Paul Rubin schreef http:
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 I have to do, in case
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 already returns
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):
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
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
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
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 the
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.__init__() should
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 thinking
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 some
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 they
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
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
here.
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
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 does
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
--
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 mutable/immutable object
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 are
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 http:
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
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 not
[EMAIL PROTECTED] wrote:
hi
i have fucntion that generates a HTML page
def genpage(arg1,arg2):
print ''' div align=rightfont size=-1BLAH BLAH.%s %s
''' % (arg1, arg2)
print ''' table blah blah... %s %s
/table''' % (arg1,arg2)'
The func is something
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: 'module'
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 meant to
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.
Since there are
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 record in
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)
printMultTable(8)
Basically this program prints the
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
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,
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 equivalent
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 Multiples (i, high)
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
your
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.AskPassword(To
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
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 program is meant to
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',
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:
Well, I hope that
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 when
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 commas
Jeffrey Schwab wrote:
[EMAIL PROTECTED] wrote:
...
def genpage(arg1,arg2):
print ''' div align=rightfont size=-1BLAH 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
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 shorted
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
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 message:
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
before
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
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 spelling
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[index-1]
states
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 advanced. I
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 elegant.
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
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
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
--
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
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, handler
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
--
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
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_module
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
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
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 connection where 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
...
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
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 thing, in
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.
If you
1 - 100 of 164 matches
Mail list logo