kumar s wrote:
I have Question:
How can I substitute an object as a pattern in making
a pattern.
x = 30
pattern = re.compile(x)
Kumar,
You can use string interpolation to insert x into a string, which can
then be compiled into a pattern:
x = 30
pat = re.compile('%s'%x)
I really doubt regular
Hello,
Mohamed Lrhazi wrote:
>def addvirt():
> pass
>def remvirt():
> pass
>
>PROVISION_ACTIONS=[('addvirt','Add Virt'),('remvirt','Remove Virt'),]
>formhandlers={}
>
># this works
>formhandlers["addvirt"]=addvirt
>formhandlers["remvirt"]=remvirt
>
># this does not work:
>for verb,ver
Hello, KTPR
I've read your code. May the main problem locates at "cmd". Assume
that foo.py and listen.py are at the same directory. It should look like:
cmd='python listen.py'
or if you included '#!/usr/bin/python' (Linux) or
'#!/usr/local/bin/python' (FreeBSD) as the first line in liste
I finally found a C mailing list. But it seems to have a verl low traffic.
The email address is [EMAIL PROTECTED]
You can sign up somewhere on:
Www.snippets.org
Here is some text from there site:
As a lightly moderated conference, the C conference has some rules. You can
read these at http://c.s
30, Married, will soon be a dad., Live in Baltimore,
U.S.A. and I am a Ph.D. student
I lived in Denmark and Israel in the past as a part
of my research life.
Will finish my Ph.D., in Bioinformatics.
Got introduced to computers at the age of 25 :-(
and more happy it is not 52 :-)
Programming l
Hi Group:
I have Question:
How can I substitute an object as a pattern in making
a pattern.
>>> x = 30
>>> pattern = re.compile(x)
My situation:
I have a list of numbers that I have to match in
another list and write them to a new file:
List 1: range_cors
>>> range_cors[1:5]
['161:378',
Rumor has it that Bob Gailer may have mentioned these words:
[snip]
Programmed in more languages than I care to recall. The more
interesting/arcane include
Motorola 8080? Assembler and Machine language
Yup - that sure is arcane -- It's either an Intel 8080 or a Motorola 6800.
;-)
Me:
37, married
> root = Tk()
> cv = Canvas(root, width=400, height=300, bg="blue")
> cv.pack()
>
cv.create_rectangle(50,30,320,290,outline="yellow",fill="red",width=10
)
>
> mainloop()
>
> any way what i would like to do is create a programme that would run
my text
> programme from this graphical box
You need to
This has been asked before, please try searching the archives
on ActiveState web site.
The short answer is that you probably are better off finding
a good OCR program than trying to do it yourself, coz it's hard!
Once you get the text out of the image it's not so hard to put
it into Word, either
> I am trying to use a least squares method (the one written by Konrad
Hinsen),
> but I do not want the method to be able to generate negative values.
Is there
> a way to stop least squares programs from doing so?
def _leastSquare():
# do the thing that might generate negatives
def leastSquar
Thanks. I've bounced off tkinter several times and have been looking for a
new approach. I'll check it out as soon as I can.
John Purser
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Ron Alvarado
Sent: Wednesday, December 29, 2004 13:52
To: tutor@pyt
I've had problems getting started with tkinter, but since reading these
lessons everything is beginning to make sense. If anyone is interested this
is the link.
http://bembry.org/tech/python/index.php
Ron A
___
Tutor maillist - Tutor@python.org
http:/
> [Jeff]
> > Also, even though this is intended to be a quick shell script, it's
> > not a bad idea to make everything except function defs into a little
> > main() function, and call it in a script-only section.
>
>
> [Luis]
>
> > The only thing I'm not clear about is how 'trashcan' can be a
>
hello to everybody,,
mu name is george and I am from Moldova, for those who dont know, a small
country placed between Romania and Ukraine.
in order to respect the subject of this mail list I wannt to say that I just
discovered the python and I can not say to much about it, but i just wait to
Thanks alot Jeff. This worked for me:
formhandlers={}
for verb,verb_desc in PROVISION_ACTIONS:
try:
formhandlers[verb]=globals()[verb]
except KeyError:
pass
On Wed, 2004-12-29 at 14:37, Jeff Shannon wrote:
> If you can't make that change to PROVIS
Mohamed Lrhazi wrote:
def addvirt():
pass
def remvirt():
pass
PROVISION_ACTIONS=[('addvirt','Add Virt'),('remvirt','Remove Virt'),]
formhandlers={}
# this works
formhandlers["addvirt"]=addvirt
formhandlers["remvirt"]=remvirt
# this does not work:
for verb,verb_desc in PROVISION_ACTI
Hello Alan and Bob,
wow, two interested people! This gave me the necessary motivation to
work today on getting the thing published ;-)
First look here for a more complete example:
http://lsaffre.dyndns.org/~luc/timwebs/lino/26.htm
The textprinter package is a part of "Lino", and I'm afraid you wi
mdcooper wrote:
Hello all,
I am trying to use a least squares method (the one written by Konrad Hinsen),
but I do not want the method to be able to generate negative values. Is there
a way to stop least squares programs from doing so?
I have probably not included enough information but I am not
def addvirt():
pass
def remvirt():
pass
PROVISION_ACTIONS=[('addvirt','Add Virt'),('remvirt','Remove Virt'),]
formhandlers={}
# this works
formhandlers["addvirt"]=addvirt
formhandlers["remvirt"]=remvirt
# this does not work:
for verb,verb_desc in PROVISION_ACTIONS:
if cal
I'd like to get some example code showing how to move
widgets around in drag-and-drop fashion. I've tried
looking at tkDND.py (I think that's what it's called)
but that was a little involved - what I want to know
is the barest of bare bones. Any help would be majorly
fabulous. Merci beaucoup.
STM
Hi all,
I am trying to supply input to another program using
pipes. I can read from it just fine, but writing to
its stdin doesn't seem to be working.
foo.py (gets pipe to listen.py)
---
from popen2 import popen2
cmd = "listen.py"
#stdout, stdin
r, w = popen2(cmd)
w.write("Message sent")
w.c
Hi, everybody.
I've just subscribed to the list, and am armed with O'Reilly's "Learning Python" book. I don't have any programming experience, but have been knocking around with linux for about 6 years. After much consideration, I inally decided Python looked like the best place to start.
I loo
Hello all,
I am trying to use a least squares method (the one written by Konrad Hinsen),
but I do not want the method to be able to generate negative values. Is there
a way to stop least squares programs from doing so?
I have probably not included enough information but I am not sure what peopl
Hello i want to put an interactive text programme in to a graphical box
this is a small section of my text programme
s = raw_input ("Hello whats your name? ")
if s=='melvyn':
print "your my boss's Dad the one they call in indian language DEEP
THOUGHT LITTLE HORSE"
if s=='carol':
p
awesome. thanks for the advice!
>> how do I change global variables within a function:
>>
>
> by declaring them as global.
> See my tutorial topic: "Whats in a Name?" for a discussion of this.
>
>> ##
>> VAR = "TEST"
>>
>> def m():
>> VAR="no test"
>
> creates a
Hi Ara,
I'd go something like this:
filep = open("myfile")
in_data = False
output_files = ["file1.txt", "file2.txt" . ]
for i in output_files:
while True:
dataline = filep.readline()
if not dataline:
break
if not in
Maybe you can accomplish this using the stat function in the os module.
say:
import os
filename = "foo.txt"
mystat = os.stat(filename)
#Stat has a number of attributes, such as
mystat.st_atime #time of most recent access
atime = time.ctime(mystat.st_atime)
print atime
'Wed Nov 17 23:51:11 2004'
The
I'm 36, unmarried, male, and live in Seattle, Washington (USA). I've
dabbled with computers and programming on and off since junior high
(around 1980), but have only gotten serious about it in the last 10
years or so (almost entirely self-taught), and have only been employed
in the field for a
Age 49, two children, getting divorced :-(
Live in New Hampshire (US) with one daughter.
In love with computers and programming since forever (well, maybe only since 1968 or so...)
Working as a professional programmer mostly since 1977. Languages I have actually been paid to
program in include
Ass
> interested in computer science because (to me) writing programs
> feels a lot like writing short stories or poetry.
Hmm, given that several of the programs I've worked on have
had more words in them than the bible, I'm not so sure about
*short* stories.
But I think I know what you mean...
54 years old -- father of 3, grandfather of 4 (and counting.)
I started Pythoning because I work for a governmental agency that does
Civil Engineering. To support mapping, I needed a wrapper for ESRI products
(Python, AML, VBA), to support drafting, I needed a wrapper for AutoDesk
products
27, married, have a 6-month-old boy.
After an MA in literature, I went back to school for a CS degree (about
halfway finished now). Java and XSLT/XML pay the bills, but I would use
python if I could. I enjoy Faulkner, Bach, algorithms, and swimming. I got
interested in computer science because (t
I'm a father of two girls, living in Massachusetts.
Professionally, I've been a VMS/Unix Systems Admin for the last 17 years.
This includes designing high availability, fault tolerant configurations and
management of disparate fiber storage area networking solutions.
As an admin, I do a good
Jacob S. wrote:
I hate to sound weird...
But who are you all, what are you're ages, what do you do, marriage status,
etc?
You obviously don't have to answer, I'm just curious who I'm boldly sending
emails to.
Jacob Schmidt
P.S.
I'm a student. 14 years. Play the piano better than I write scripts. Si
joining in this ASL thread.
i'm my kids dad, father of 2, an expat workin in saudi arabia. a newbie trying
to learn python to see how far i could go... know a bit of shell scripting,
tried Perl but never went far.
i like Python's clear syntax, so close to basic english. but of course there'
I'm 31, male, living in the Netherlands, with the love of my life (not
married tho).
I work as a web developer for a small web agency, doing mostly Flash
ActionScript, ColdFusion, PHP, MySQL and (X)HTML. Also involved as a
moderator on several Flash communities and heavily intrigued by
mathematics,
No longer required.
- Original Message -
From: <[EMAIL PROTECTED]>
To:
Sent: Wednesday, December 29, 2004 6:00 AM
Subject: Tutor Digest, Vol 10, Issue 105
Send Tutor mailing list submissions to
tutor@python.org
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.python.
37 matches
Mail list logo