I tend to use the re module like so :
import re
my_string = re.sub('[\-,./]','',my_string)
> I wish to replace several characters in my string to only one.
> Example, "-", "." and "/" to nothing ""
> I did like that:
> my_string = my_string.replace("-", "").replace(".", "").replace("/",
> "").rep
On Aug 13, 7:30 pm, Christian Heimes <[EMAIL PROTECTED]> wrote:
> eliben wrote:
> > Ruby's 'Scruct' class (http://ruby-doc.org/core/classes/Struct.html)
> > does this. I suppose it can be done with 'exec', but is there a more
> > Pythonic way ?
>
> Try named tuplehttp://code.activestate.com/recipes
Python as a language almost fit for Inquisitive computing:
http://www.americanscientist.org/issues/pub/2008/5/calculemus
(I think Python is one of the best ones for such purpose).
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Aug 13, 2008 at 1:26 PM, tmallen <[EMAIL PROTECTED]> wrote:
> I'm working on a little FTP project to get comfortable with ftplib.
> It's all terminal-based right now, and one issue I'm having is hiding
> password input text. I'd like one of two things to happen with this:
> Either don't sho
tmallen a écrit :
I'm working on a little FTP project to get comfortable with ftplib.
It's all terminal-based right now, and one issue I'm having is hiding
password input text. I'd like one of two things to happen with this:
Either don't show any characters while I'm typing (like $ su), or
better
On Aug 13, 12:31 pm, David <[EMAIL PROTECTED]> wrote:
> I am collecting informations about win32 services for Python but, except for
> few basic examples about Mark Hammond's win32serviceutil, I found nothing
> useful.
>
> Any link is welcome.
>
> Thank you.
> David
This doesn't have one yet, but
eliben <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to be able to do something like this:
>
> Employee = Struct(name, salary)
>
> And then:
>
> john = Employee('john doe', 34000)
> print john.salary
>
> Basically, Employee = Struct(name, salary) should be equivalent to:
>
> class Employee(o
frankrentef a écrit :
Newbie here
I'm writing a Python program that has "def" functionality
functions
growing in
leaps and bounds. I'm a newbie to Python so be detailed. Is there a
way to create a py file with all the "def's" listed and just call them
from the "program" py file?
yes.
Il Wed, 13 Aug 2008 10:58:20 -0700 (PDT), Mike Driscoll ha scritto:
> On Aug 13, 12:31 pm, David <[EMAIL PROTECTED]> wrote:
>> I am collecting informations about win32 services for Python but, except for
>> few basic examples about Mark Hammond's win32serviceutil, I found nothing
>> useful.
>>
>>
tmallen wrote:
I'm working on a little FTP project to get comfortable with ftplib.
It's all terminal-based right now, and one issue I'm having is hiding
password input text. I'd like one of two things to happen with this:
Either don't show any characters while I'm typing (like $ su), or
better,
2008/8/13 Cyprian Kumwaka <[EMAIL PROTECTED]>:
> No, it doesn't! I have even tried uninstalling and installing it but still
> it doesn't not work. Any more ideas!
What error message do you get when you try it? "Doesn't work" isn't
anything like enough to go on.
And please keep the conversation on
I'm trying to build a non-framework python on MacOS X 10.5 using a
custom tcl/tk that lives in an arbitrary directory. (For complicated
reasons we don't want the system tcl/tk). It is easy to build an X11
tcl/tk this way (and we are content with X11) so I did that.
Unfortunately I can't seem to
Hello,
I'm trying to script some sysadmin stuff, that requires rpm
manipulation (querying installed packages, removing packages,
installing packages).
Rather than manually parsing rpm's output, I noticed that someone had
written python-bindings for the rpmlib library (called rpm-python).
This see
Dnia Tue, 12 Aug 2008 23:38:56 -0700 (PDT), Asun Friere napisa�(a):
> I note 3.0 runs os.popen without complaint (and had thought to mention
> that in my previous). Right now I'm wondering whether I should
> install the beta 2.6 to see whether Wotjek is pulling our leg or
> not. :)
:) Checked it
On Aug 13, 11:13 am, "Cousson, Benoit" <[EMAIL PROTECTED]> wrote:
> > There is no point of nested classes because nested classes _are not_
> > supported by python. They are simply an artifact of not actively
> > denying the syntax non-globally. I would fully support a change to the
> > language to
> Howdy,
>
> I have not found a routine to extract usable
> date/time information from the 60 bit uuid1 timestamp.
>
> Is there not a standard solution?
I submitted an ASPN recipe to do it.
http://code.activestate.com/recipes/576420/
--
http://mail.python.org/mailman/listinfo/python-list
Kent Tenney wrote:
Howdy,
I have not found a routine to extract usable
date/time information from the 60 bit uuid1 timestamp.
Is there not a standard solution?
I submitted an ASPN recipe to do it.
http://code.activestate.com/recipes/576420/
I'm interested in the use case for this.
Why wo
Here's the code:
http://pastebin.com/m21dfcc19
What could be improved? The script feels clumsy, and I have no
experience refactoring Python code. This will eventually be a GUI FTP
client. I'm mainly looking for design advice...
--
http://mail.python.org/mailman/listinfo/python-list
I'm debugging an xmlrpc client/server application. Often when an
exception occurs in the server, I receive only a very short error
message on the client. For example:
xmlrpclib.Fault: :">
Presumably this is because xmlrpclib on the server is catching the
exception, and only sending the except
> Yeah. It's so easy and obvious that you are going to bang your head
> against the wall. :) The single star does not only collect all arguments
> in a function definition. It also expands a sequence as arguments.
Thanks Christian, that worked perfectly!
Scott
--
http://mail.python.org/mailman/l
-Original Message-
From: tmallen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2008 12:26 PM
To: python-list@python.org
Subject: Hide raw_input text?
I'm working on a little FTP project to get comfortable with ftplib.
It's all terminal-based right now, and one issue I'm having is
Scott wrote:
I'm debugging an xmlrpc client/server application. Often when an
exception occurs in the server, I receive only a very short error
message on the client. For example:
xmlrpclib.Fault: :">
Presumably this is because xmlrpclib on the server is catching the
exception, and only se
On Aug 13, 3:27 pm, tmallen <[EMAIL PROTECTED]> wrote:
> Here's the code:http://pastebin.com/m21dfcc19
>
> What could be improved? The script feels clumsy, and I have no
> experience refactoring Python code. This will eventually be a GUI FTP
> client. I'm mainly looking for design advice...
Note t
On Aug 13, 1:38 am, Asun Friere <[EMAIL PROTECTED]> wrote:
> On Aug 13, 8:58 am, Steven D'Aprano <[EMAIL PROTECTED]
>
> cybersource.com.au> wrote:
> > On Mon, 11 Aug 2008 19:28:13 -0700, Asun Friere wrote:
>
> > > but if I was in a hurry to find out who I was I would be tempted still
> > > to use t
Mike Driscoll wrote:
I note 3.0 runs os.popen without complaint (and had thought to mention
that in my previous). Right now I'm wondering whether I should
install the beta 2.6 to see whether Wotjek is pulling our leg or
not. :)
That was the wording I was referring to. Now that I re-read it, I
Hi all,
I am trying to figure out a way to read colors with xlrd, but I did
not understand the formatting.py module. Basically, I want to sort
rows that are red or green. My initial attempt discovered that
>>>print cell
text:u'test1.txt' (XF:22)
text:u'test2.txt' (XF:15)
text:u'test3.txt' (XF:15
frankrentef wrote:
Newbie here
I'm writing a Python program that has "def" functionality growing in
leaps and bounds. I'm a newbie to Python so be detailed. Is there a
way to create a py file with all the "def's" listed and just call them
from the "program" py file? How would I do this?
I have come across this code and I tried to figure out what does it do
First, I do not understand the sign @... above the class method, what does
it do?
Second, about the object in AnyWrapper(object), why do they declare "object"
as the superclass?
sometimes I saw (type) what the differences betwee
On Aug 13, 3:31 pm, Scott <[EMAIL PROTECTED]> wrote:
> What I would like is the full stack trace of what went wrong on the
> server (i.e. the junk python usually dumps to the console when an
> exception occurs). I don't care which side I see the dump on (client
> or server), but I need to see the
On Aug 13, 3:03 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Mike Driscoll wrote:
> >> I note 3.0 runs os.popen without complaint (and had thought to mention
> >> that in my previous). Right now I'm wondering whether I should
> >> install the beta 2.6 to see whether Wotjek is pulling our leg or
On 12 Aug., 12:54, Kay Schluehr <[EMAIL PROTECTED]> wrote:
> On 12 Aug., 10:50, Uwe Grauer <[EMAIL PROTECTED]> wrote:
>
>
>
> > Kay Schluehr wrote:
> > > P4D = E4X style embedded DSL for Python but without E and X.
>
> > > The main feature of P4D 1.2 are *Bytelets*. While the primary purpose
> > >
In article
<[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Python as a language almost fit for Inquisitive computing:
Heh - language problem. At first I read "almost fit for" as
"almost satisfactory for". Looking at the link and your next
comment I think you meant "is almost a perfect fit for".
does anyone know a nice implementation of callbacks in python? i have
issues mixing named & unamed parameters. i want build a callback over
a function such that some parameters are passed when callback is
created and the rest are passed when the function is called.
example:
callback = Callback(fun
Howdy,
I was just bit by
from image import annotate
ImportError: cannot import name annotate
I found the problem via
import image
print image.__file__
which made it clear that the wrong image module had been found.
It would be nice if ImportError announced this up front.
cannot import name
I tried:
import sys
import pymssql
db = 'Gcare4UI-B6_3_dev'
conn = pymssql.connect (host = "localhost",
user = "myname",
password = "mypassword",
database = db)
And this returns an error saying
Could not locate entry i
Alexandru Mosoi wrote:
does anyone know a nice implementation of callbacks in python? i have
issues mixing named & unamed parameters. i want build a callback over
a function such that some parameters are passed when callback is
created and the rest are passed when the function is called.
exampl
AON LAZIO wrote:
I have come across this code and I tried to figure out what does it do
First, I do not understand the sign @... above the class method, what
does it do?
Second, about the object in AnyWrapper(object), why do they declare
"object" as the superclass?
sometimes I saw (type) wha
In article <[EMAIL PROTECTED]>,
Ken Starks <[EMAIL PROTECTED]> wrote:
> Hussein B wrote:
>[...]
>
> And now it looks as if I shall wish to learn another little language, at
> least to 'dabble-in' level: Lua, because it is going to srcipt a new
> variation in the TeX world.
That sounded interest
Dnia Wed, 13 Aug 2008 09:39:53 -0700 (PDT), gjhames napisa�(a):
> I wish to replace several characters in my string to only one.
> Example, "-", "." and "/" to nothing ""
> I did like that:
> my_string = my_string.replace("-", "").replace(".", "").replace("/",
> "").replace(")", "").replace("(", ""
David wrote:
I am collecting informations about win32 services for Python but, except for
few basic examples about Mark Hammond's win32serviceutil, I found nothing
useful.
Any link is welcome.
Thank you.
David
Actually those examples in Python for Win32 book are quite good and basically
all
> I'm interested in the use case for this.
> Why would you want to extract the exact timestamp from the uuid?
Because I can :-]
At this point it's primarily academic, but I'll be creating lots of
files and naming them with uuid's. I like the capability of determining creation
date solely from t
Alexandru Mosoi wrote:
does anyone know a nice implementation of callbacks in python? i have
issues mixing named & unamed parameters. i want build a callback over
a function such that some parameters are passed when callback is
created and the rest are passed when the function is called.
example
Hi Guys,
I'm new to Python (mostly) and I'm wanting to use it for a new project
I'm faced with.
I have a machine (PLC) that is dumping its test results into a fixed-
length text file. I need to pull this data into a database (MySQL
most likely) so that I can access it with Crystal Reports to cre
Dnia Wed, 13 Aug 2008 22:03:49 +0200, Fredrik Lundh napisa�(a):
> not talking for the 3.X developers here, but os.popen is a binding to
> the POSIX popen function, so I'm not sure it makes that much sense to
> actually deprecate it.
>
> the os.popen[234], popen2, and commands stuff are different
Hi Guys,
I'm new to Python (mostly) and I'm wanting to use it for a new project
I'm faced with.
I have a machine (PLC) that is dumping its test results into a
fixed-length text file. I need to pull this data into a database
(MySQL most likely) so that I can access it with Crystal Reports to
crea
> Hishaam wrote:
>> How to execute commands in internal zones of solaris using python
>> running from the global zone ?
>>
>> i tried --
>> 1> os.popen("zlogin ")
>> 2> os.popen("zonename")
>>
>> the 2nd command executes back into the global zone and not into the
>> internal zone
>> can anyone hel
On Aug 14, 12:02 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> your use of the word "callback" is a bit unusual, and your example isn't
> valid Python code, but it looks as if functools.partial might be what
> you need:
>
> http://docs.python.org/lib/module-functools.html
my current implemen
David C. Ullrich:
> If you look at the end of the article you see the author
> agrees (I don't quite follow his complaint about not feeling
> at home with the interactive mode, but it's funny to read about
> how he uses Lisp but realizes he's not going to talk people
> into that...)
That well know
Wojtek Walczak wrote:
I wish to replace several characters in my string to only one.
Example, "-", "." and "/" to nothing ""
I did like that:
my_string = my_string.replace("-", "").replace(".", "").replace("/",
"").replace(")", "").replace("(", "")
But I think it's a ugly way.
What's the bette
On Aug 14, 6:03 am, [EMAIL PROTECTED] wrote in
news:comp.lang.python thusly:
> Hi all,
>
> I am trying to figure out a way to read colors with xlrd, but I did
> not understand the formatting.py module.
It is complicated, because it is digging out complicated info which
varies in somewhat arbitrary
[EMAIL PROTECTED] wrote:
Hi!
My problem is that:
The "test.py" is working in every machine that I use except in my home
machine.
Formerly it worked but now not. I don't know what happened, I searching
for some solution.
The errormessage is this (after I tried to start test.py under cmd.exe):
On Wed, 2008-08-13 at 09:39 -0700, gjhames wrote:
> I wish to replace several characters in my string to only one.
> Example, "-", "." and "/" to nothing ""
> I did like that:
> my_string = my_string.replace("-", "").replace(".", "").replace("/",
> "").replace(")", "").replace("(", "")
>
> But I t
Fredrik Lundh:
> suggested exercise: benchmark re.sub with literal replacement, re.sub
> with callback (lambda m: ""), repeated replace, and repeated use of the form
...
> on representative data.
Please, add the translate() solution too I have suggested :-)
Bye,
bearophile
--
http://mail.python.o
Dnia Wed, 13 Aug 2008 20:55:38 + (UTC), Kent Tenney napisa�(a):
> from image import annotate
>
> ImportError: cannot import name annotate
>
> I found the problem via
>
> import image
> print image.__file__
>
> which made it clear that the wrong image module had been found.
>
> It would be nic
Dnia Wed, 13 Aug 2008 23:31:42 +0200, Fredrik Lundh napisa�(a):
>>> I wish to replace several characters in my string to only one.
>>> Example, "-", "." and "/" to nothing ""
>>> I did like that:
>>> my_string = my_string.replace("-", "").replace(".", "").replace("/",
>>> "").replace(")", "").repla
On Aug 13, 4:29 pm, [EMAIL PROTECTED] wrote:
> David C. Ullrich:
>
> > If you look at the end of the article you see the author
> > agrees (I don't quite follow his complaint about not feeling
> > at home with the interactive mode, but it's funny to read about
> > how he uses Lisp but realizes he's
Kent Tenney wrote:
I was just bit by
from image import annotate
ImportError: cannot import name annotate
I found the problem via
import image
print image.__file__
which made it clear that the wrong image module had been found.
that's what "python -v" is all about, of course.
--
http:
I believe there is a bug in Python.. _mssql ...I am not too familiar
with Python yet, but after adding several breakpoints and watching the
variable, the last step of pymssql.py is
# open the connection
con = _mssql.connect(dbhost, dbuser, dbpasswd)
con.select_db(dbbase)
At this
Wojtek Walczak wrote:
suggested exercise: benchmark re.sub with literal replacement, re.sub
with callback (lambda m: ""), repeated replace, and repeated use of the form
if ch in my_string:
my_string = my_string.replace(ch, "")
on representative data.
I don't have to, I can an
Dnia Wed, 13 Aug 2008 22:15:48 + (UTC), Wojtek Walczak napisa�(a):
> Then go for it :-) You can prepare a patch and ask on python-dev
> if the developers are interested.
>
> I was never hacking the import things on C level before,
> but a hint: you have to modify import_from function from
> Py
And.. confirmed.. it has to be a bug in Python _mssql.
#sample.py
import _mssql
dbhost = 'gmed-4-int'
dbuser = 'myuser'
dbpasswd = 'mypassword'
dbbase = 'Gcare4UI-B6_3_dev'
con = _mssql.connect(dbhost, dbuser, dbpasswd)
con.select_db(dbbase)
...
Could not locate entry in sysdatabases for databa
Samuel Morhaim wrote:
I believe there is a bug in Python.. _mssql ...I am not too familiar
with Python yet, but after adding several breakpoints and watching the
variable, the last step of pymssql.py is
# open the connection
con = _mssql.connect(dbhost, dbuser, dbpasswd)
con
Fredrik Lundh wrote:
reading the documentation might help:
http://pymssql.sourceforge.net/troubleshooting.html#dbid
also see the SQL server reference documentation (the section "Rules for
Regular Identifiers" describes the valid syntax):
http://msdn.microsoft.com/en-us/library/ms17
Alexandru Mosoi wrote:
On Aug 14, 12:02 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
your use of the word "callback" is a bit unusual, and your example isn't
valid Python code, but it looks as if functools.partial might be what
you need:
http://docs.python.org/lib/module-functools.html
m
[EMAIL PROTECTED] wrote:
Hi Guys,
I'm new to Python (mostly) and I'm wanting to use it for a new project
I'm faced with.
I have a machine (PLC) that is dumping its test results into a fixed-
length text file. I need to pull this data into a database (MySQL
most likely) so that I can access it
Dnia Thu, 14 Aug 2008 00:31:00 +0200, Fredrik Lundh napisa�(a):
>>> if ch in my_string:
>>> my_string = my_string.replace(ch, "")
>>>
>>> on representative data.
>>
>> I don't have to, I can anticipate the results.
>
> Chances are that you're wrong.
At the moment my average is abo
Le Tuesday 12 August 2008 23:15:23 Calvin Spealman, vous avez écrit :
> The issue has been brought up several times before. There have been
> proposals to make nested classes better supported, but they are always
> shut down. The vote is always against it. Your metaclass example is
> one thing, bu
On Wed, Aug 13, 2008 at 7:41 PM, Maric Michaud <[EMAIL PROTECTED]> wrote:
> I was not aware of any "nested classes are unsupported" before and didn't
> consider nested classes as bad practice till now, even with the pickle
> limitation (not every class are intended to be pickled), more you didn't g
Le Wednesday 13 August 2008 21:04:30 Rhamphoryncus, vous avez écrit :
> class X(object):
> foo = 42
>
> def bar(self):
> print foo
> print self.foo
> X.foo = 7
Yes this is a problem, function could not bind their free vars to the class
namespace without introducing a subtl
Larry Bates wrote:
[EMAIL PROTECTED] wrote:
I have a machine (PLC) that is dumping its test results into a fixed-
length text file. I need to pull this data into a database (MySQL
most likely) so that I can access it with Crystal Reports to create
daily reports for my engineers.
[..]
I need to
Fredrik Lundh wrote:
not talking for the 3.X developers here, but os.popen is a binding to
the POSIX popen function, so I'm not sure it makes that much sense to
actually deprecate it.
the os.popen[234], popen2, and commands stuff are different -- they're a
a series of attempts to provide m
On Aug 14, 8:50 am, Wojtek Walczak
<[EMAIL PROTECTED]> wrote:
> Dnia Thu, 14 Aug 2008 00:31:00 +0200, Fredrik Lundh napisa³(a):
>
> >>> if ch in my_string:
> >>> my_string = my_string.replace(ch, "")
>
> >>> on representative data.
>
> >> I don't have to, I can anticipate the results
if I want to fill zeros to the right, what function can help??
ex:
'1.23'=>'1.2300'
but '1.23'.zfill(6)=>'001.23'
--
http://mail.python.org/mailman/listinfo/python-list
I want to make an RPM (Redhat Package Manager) file to install a Python
program (not a module). How is this done? Does it use Distutils, or
something completely different? Thanks in advance.
-- Ratfink
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 13, 7:48 pm, Johnny <[EMAIL PROTECTED]> wrote:
> if I want to fill zeros to the right, what function can help??
> ex:
> '1.23'=>'1.2300'
> but '1.23'.zfill(6)=>'001.23'
>>> '1.23'.ljust(6, '0')
'1.2300'
Sebastian
--
http://mail.python.org/mailman/listinfo/python-list
Johnny wrote:
if I want to fill zeros to the right, what function can help??
ex:
'1.23'=>'1.2300'
but '1.23'.zfill(6)=>'001.23'
Use string formatting:
>>> "%0.6f" % 1.5
'1.50'
Christian
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am newbie in python. I am working on Telit GM862 GPS/GPRS module
which has python interpreter built in. But it seems this problem is
pretty much related to general python structure.
I need a promt/terminal when the device is connected to PC. If user
enters a command by serial port and press
Calvin Spealman a écrit :
On Wed, Aug 13, 2008 at 7:41 PM, Maric Michaud <[EMAIL PROTECTED]> wrote:
I was not aware of any "nested classes are unsupported" before and didn't
consider nested classes as bad practice till now, even with the pickle
limitation (not every class are intended to be pick
On Aug 5, 5:33 am, Jeff <[EMAIL PROTECTED]> wrote:
> On Aug 4, 11:20 pm, [EMAIL PROTECTED] wrote:
>
> > Hi,
>
> > I would like to copy the contents of the PythonFramework.pkg folder
> > and run python without having to run the installer on the Mac. On
> > windows it's simple to copy the contents of
On Aug 13, 2:27 pm, tmallen <[EMAIL PROTECTED]> wrote:
> Here's the code:http://pastebin.com/m21dfcc19
>
> What could be improved? The script feels clumsy, and I have no
> experience refactoring Python code. This will eventually be a GUI FTP
> client. I'm mainly looking for design advice...
Well o
On Aug 5, 5:33 am, Jeff <[EMAIL PROTECTED]> wrote:
> On Aug 4, 11:20 pm, [EMAIL PROTECTED] wrote:
>
> > Hi,
>
> > I would like to copy the contents of the PythonFramework.pkg folder
> > and run python without having to run the installer on the Mac. On
> > windows it's simple to copy the contents of
> > Then go for it You can prepare a patch and ask on python-dev
> > if the developers are interested.
hehe, I'll get a C level patch accepted right after I
out-swim Mike Phelps.
> >
> > I was never hacking the import things on C level before,
> > but a hint: you have to modify import_from func
In article <[EMAIL PROTECTED]>,
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>
>Ouch. Please use parameters instead of explicit escapes and string
>formatting; Python's not PHP.
How would you recommend upgrading an application that is more than ten
years old and contains something like 100K lines o
On Wed, 13 Aug 2008 22:50:29 +, Wojtek Walczak wrote:
> Dnia Thu, 14 Aug 2008 00:31:00 +0200, Fredrik Lundh napisa³(a):
>
if ch in my_string:
my_string = my_string.replace(ch, "")
on representative data.
>>>
>>> I don't have to, I can anticipate the results
> Well the othe day I was making a program to make a list
> of all the songs in certian directorys but I got a problem,
> only one of the directorys was added to the list.
>
>
Here's some code that illustrates yours
import glob
songs = glob.glob( '/path/to/somewhere/*.mp3'
use songs.extend( asongs ) #append is for single item - where ever it might be.
>>> l1 = range(5)
>>> l2 = range(5,10)
>>> l1
[0, 1, 2, 3, 4]
>>> l2
[5, 6, 7, 8, 9]
>>> l1.extend(l2)
>>> l1
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>>
good luck.
Edwin
-Original Message-
From: [EMAIL PROT
Hi All
I wanted to try WATSUP module and it states that it needs the module
SendKeys.
I cannot get the the URL www.rutherfurd.net/python/sendkeys/.
Does anyone have a copy of the install or what ever that I can install
or tell me where I can find it.
Thanks
Len
--
http://mail.python.org/mailman
> list_songs = glob.glob( "'%s/%s'" % ( base_dir , this_dir )
Missed a closing paren
list_songs = glob.glob( "'%s/%s'" % ( base_dir , this_dir ) )
Still NOT Tested
--
Stanley C. Kitching
Human Being
Phoenix, Arizona
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 13, 11:38 am, "Calvin Spealman" <[EMAIL PROTECTED]> wrote:
> On Wed, Aug 13, 2008 at 11:32 AM, Cousson, Benoit <[EMAIL PROTECTED]> wrote:
> >> Defining it as a nested class saves you one line
> >> of code, but IMHO makes the result just a bit more cluttered, while
> >> reducing the elegance
Hi.
I am writing a program to help determine coumadin regimens
to look at the code: http://sourceforge.net/projects/coumadinregimen/
The issue is that I have a variable that I want the use to select if
they don't like the default.
I have made this as a listbox widget
The rest of the gui is just e
I'd like a class method to fire every n seconds.
I tried this:
class Timed:
def.__init__(self):
self.t = Timer(3, self.dothing)
def.start(self):
self.t.start()
def.dothing(self):
print "Doing Thing"
s = new Timed()
s.start()
And:
class Scheduled:
def._
On Wed, Aug 13, 2008 at 10:49 PM, Carl Banks <[EMAIL PROTECTED]> wrote:
>> There is no point of nested classes because nested classes _are not_
>> supported by python. They are simply an artifact of not actively
>> denying the syntax non-globally. I would fully support a change to the
>> language t
On Thu, 14 Aug 2008 01:54:55 +, Steven D'Aprano wrote:
> In full knowledge that Python is relatively hard to guess what is fast
> compared to what is slow, I'll make my guess of fastest to slowest:
>
> 1. repeated replace
> 2. repeated use of the form
>"if ch in my_string: my_string = my_
ery low level and not very useful for beginners as a lot of the heavy
lifting and management is still left up to you, the programmer.
The module ftputil is a high-level interface to the ftplib module. The
FTPHost objects generated from it allow many operations similar to
those of os and os.path. A
sorry cut off due to original email being sent not to the list due to gmail:
A second for that suggestion--the ftp module in the python standard library is
very low level and not very useful for beginners as a lot of the heavy
lifting and management is still left up to you, the programmer.
2008/8
On 14 Aug 2008, William Battersea wrote:
> Both run once and end. I'm obviously missing something here.
That's how both ('sched' and threading.Timer) of the them work.
Depending on what you're doing, your toolkit/framework (Twisted, GTK,
etc) might have a better solution. Or
http://www.gossamer-t
On Wed, 13 Aug 2008 23:40:50 -0400, Calvin Spealman wrote:
> I know every rule has its exceptions. I put "don't nest classes" in with
> other similar rules I will claim, where I think its safest to say "Never
> do this!", because only then will you know that, should you actually do
> it at some po
Hi Justin,
Does Professor Battersea know you're using his gmail account? *wink*
On Wed, 13 Aug 2008 23:16:12 -0400, Prof. William Battersea wrote:
> I'd like a class method to fire every n seconds.
>
> I tried this:
>
> class Timed:
> def.__init__(self):
> self.t = Timer(3, self.d
Aahz wrote:
In article <[EMAIL PROTECTED]>,
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
Ouch. Please use parameters instead of explicit escapes and string
formatting; Python's not PHP.
How would you recommend upgrading an application that is more than ten
years old and contains somethin
Steven D'Aprano wrote:
> While I'm gratified that my prediction was so close to the results I
> found, I welcome any suggestions to better/faster/more efficient code.
> more things to try:
code tweaks:
- Factor out the creation of the regular expression from the tests:
"escape" and "compile" a
101 - 200 of 203 matches
Mail list logo