Sagari wrote:
Greetings,
Can someone suggest an efficient way of calling method whose name is
passed in a variable?
Given something like:
class X:
#...
def a(self):
# ...
def b(self):
# ...
#...
x = X()
#...
v = 'a'
How do I call the method of x whose name is stored in v?
Use get
I want to strip punctuation from text.
So I am trying,
>>> p = re.compile('[a-zA-Z0-9]+')
>>> p.sub('', 'I love tomatoes!! hell yeah! ... Why?')
' !! ! ... ?'
Which gave me all the chars which I want to replace.
So Next I tried by negating the regex,
>>> p = re.compile('^[a-zA-Z0-9]+')
>>> p
Hi to all
python now has grown to a versatile language that can
accomplish tasks for many different purposes. However,
AFAIK, little is known about its ability of kernel coding.
So I am wondering if python can do some kernel coding that
used to be the private garden of C/C++. For example, can pyt
On May 22, 5:29 pm, "inhahe" <[EMAIL PROTECTED]> wrote:
> "bukzor" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
>
> > This question seems easy but I can't figure it out.
> > Lets say there's a function:
>
> > def f(a, *args):
> > print a
> > for b in args: print b
>
> > and
Greetings,
Can someone suggest an efficient way of calling method whose name is
passed in a variable?
Given something like:
class X:
#...
def a(self):
# ...
def b(self):
# ...
#...
x = X()
#...
v = 'a'
How do I call the method of x whose name is stored in v?
PHP code for this would be:
On May 22, 5:39 pm, "inhahe" <[EMAIL PROTECTED]> wrote:
> >> 1
> >> 2
>
> actually, you don't want it to print 3 also? if not, then you would do
> f(*map(kwargs.get, inspect.getargspec(f)[0])+args[:1])
>
> > import inspect
> > f(*map(kwargs.get, inspect.getargspec(f)[0])+args)
>
>
No, that was a
On 23 Mag, 07:48, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Thu, 22 May 2008 21:55:41 -0700, gianluca wrote:
> > Yes, I know it but when I load a function (a=myDLL.myFUNCT()) I've an
> > exception like this:
>
> > Traceback (most recent call last):
> > File "", line 1, in
> >
On Thu, 22 May 2008 21:55:41 -0700, gianluca wrote:
> Yes, I know it but when I load a function (a=myDLL.myFUNCT()) I've an
> exception like this:
>
> Traceback (most recent call last):
> File "", line 1, in
> myDLL.myFUNCT()
> File "C:\Python25\lib\ctypes\__init__.py", line 353, in __ge
George Maggessy wrote:
Hi Gurus,
I'm a Java developer and I'm trying to shift my mindset to start
programming python. So, my first exercise is to build a website.
However I'm always falling back into MVC pattern. I know it's a
standard, but the implementation language affects the use of design
p
Dan Upton wrote:
On Thu, May 22, 2008 at 2:53 PM, Mensanator <[EMAIL PROTECTED]> wrote:
On May 22, 11:32 am, "Dutton, Sam" <[EMAIL PROTECTED]> wrote:
I've noticed that the value of math.pi -- just entering it at the interactive
prompt -- is returned as 3.1415926535897931, whereas (as every pi-
On Thu, 22 May 2008 23:37:45 -0400, John Salerno wrote:
> I know that it is good programming practice to keep GUI and logic code
> physically separate, by using XRC for example, but I'm wondering if it's
> also good practice (and even possible) to keep them separate from an
> implementation sta
Le Friday 23 May 2008 04:28:22 [EMAIL PROTECTED], vous avez
écrit :
> Hi,
> I would like to create a Decorator metaclass, which automatically
> turns a class which inherits from the "Decorator" type into a
> decorator.
> A decorator in this case, is simply a class which has all of its
> decorator
Mensanator wrote:
On May 22, 11:32 am, "Dutton, Sam" <[EMAIL PROTECTED]> wrote:
I've noticed that the value of math.pi -- just entering it at the interactive
prompt -- is returned as 3.1415926535897931, whereas (as every pi-obsessive
knows) the value is 3.1415926535897932... (Note the 2 at the
[EMAIL PROTECTED] wrote:
> i want to search a document for a particular regexp and then store
> that regexp to a file.
> but search and match only returns matchobjects(what are those anyway?
> i dont get what to do with them, do they contain true/false,
> stringposition etc?)
> how do i do:
> for
cm_gui wrote:
Python is slow.Almost all of the web applications written in
Python are slow. Zope/Plone is slow, sloow, so very slooow. Even
Google Apps is not faster. Neither is Youtube.
Facebook and Wikipedia (Mediawiki), written in PHP, are so much faster
than Python.
Okay, they probab
Peter Otten <[EMAIL PROTECTED]> wrote:
> > A slightly similar problem: If I want to "merge," say, list1=[1,2,3] with
> > list2=[4,5,6] to obtain [1,4,2,5,3,6], is there some clever way with "zip"
> > to do so?
> >>> items = [None] * 6
> >>> items[::2] = 1,2,3
> >>> items[1::2] = 4,5,6
> >>> items
On 23 Mai, 00:51, Larry Bates <[EMAIL PROTECTED]> wrote:
> > I've yet to see a web application written in Python which is really
> > fast.
>
> You are just dead wrong about this.
No, he can demand whatever he wants and we can be stupid enough to
respond.
--
http://mail.python.org/mailman/listinfo
On 23 Mag, 01:14, Larry Bates <[EMAIL PROTECTED]> wrote:
> gianluca wrote:
> > Hy,
> > I need help about use dll with ctypes. I've compiled my dll C library
> > and I copied it in c:\windows\system32. When I load it with
> > "myDLL=cdll.LoadLibrary(find_library("myDLL.dll"))" It seem all OK but
> >
On 13 Mai, 01:39, Dave Parker <[EMAIL PROTECTED]> wrote:
> I've read that one of the design goals of Python was to create an easy-
> to-use English-like language. That's also one of the design goals of
> Flaming Thunder athttp://www.flamingthunder.com/ , which has proven
> easy enough for even ele
I used python to generate php code. But that was before I knew what vast
troves of python web frameworks there were. :)
On Thu, May 22, 2008 at 11:40 PM, inhahe <[EMAIL PROTECTED]> wrote:
>
> > PHP can do that. There are also a number of templating engines
> > available. The nice thing about PH
> PHP can do that. There are also a number of templating engines
> available. The nice thing about PHP is you have a choice.
i just meant that php is sort of invented to combine html and code, so if
you use python instead you should use a templating engine. but i suppose
it's useful for php
Nevermind.
I ended up making a copy of everything within the class since I'm storing
bitmaps anyway. It works.
I'll read up more on the deepcopy() function.
> To: python-list@python.org> From: [EMAIL PROTECTED]> Subject: Re: How do I
> make a copy of my class object?> Date: Thu, 22 May 20
On May 23, 1:37 pm, John Salerno <[EMAIL PROTECTED]> wrote:
> Basically, the question is this: can you write the logic behind a
> program (whether it be a game, an email client, a text editor, etc.)
> without having any idea of how you will implement the GUI?
Hey John,
Are you familiar with the M
John Salerno wrote:
Basically, the question is this: can you write the logic behind a
program (whether it be a game, an email client, a text editor, etc.)
without having any idea of how you will implement the GUI?
Chess already has at least two solutions that are in widespread use:
Winboard
I know that it is good programming practice to keep GUI and logic code
physically separate, by using XRC for example, but I'm wondering if it's
also good practice (and even possible) to keep them separate from an
implementation standpoint as well. Basically what I mean is, should it
be possible
In fact, the Pylons web framework is geared toward the MVC approach.
http://pylonshq.com/
On Thu, May 22, 2008 at 7:48 PM, George Maggessy <[EMAIL PROTECTED]>
wrote:
> Hi Gurus,
>
> I'm a Java developer and I'm trying to shift my mindset to start
> programming python. So, my first exercise is to
inhahe wrote:
I don't like php. I tried it once and I had it sort a list, but the list
was apparently too long for its sorting function because it just sorted the
first so-many elements of it and left the rest in order, and didn't generate
any error. I like a language that's actually determin
On Thu, 22 May 2008 19:35:50 -0700, Charles Hixson wrote:
> Although when comparing Candygram with Erlang it's worth noting that
> Candygram is bound to one processor, where Erlang can operate on
> multiple processors. (I'd been planning on using Candygram for a project
> at one point, but this mad
On Thursday 22 May 2008 13:30:07 Nick Craig-Wood wrote:
> ...
> >From Armstrong's book: The expression Pattern = Expression causes
>
> Expression to be evaluated and the result matched against Pattern. The
> match either succeeds or fails. If the match succeeds any variables
> occurring in Pattern
Hi,
I would like to create a Decorator metaclass, which automatically
turns a class which inherits from the "Decorator" type into a
decorator.
A decorator in this case, is simply a class which has all of its
decorator implementation inside a decorator() method. Every other
attribute access is being
Larry Bates wrote:
If your Python program is
slow, you have almost assuredly approached it with a wrong method or
algorithm.
I agree for most applications. There are however times where Python
just isn't fast enough, and that's usually when people write extension
modules.
I have yet to se
George Maggessy wrote:
Hi Gurus,
I'm a Java developer and I'm trying to shift my mindset to start
programming python. So, my first exercise is to build a website.
However I'm always falling back into MVC pattern. I know it's a
standard, but the implementation language affects the use of design
p
In my experience, python is very pattern agnostic. You can do functional or
object oriented or procedural fairly easily, have deep or light object
trees, or even mix procedural style with some object oriented code if you
like. "There should be one way to do it" tends to not apply as much as some
On May 23, 4:01 am, "inhahe" <[EMAIL PROTECTED]> wrote:
> Might have a stack overflow issue, if it retries too many times?
In which example? Neither of them is looping...
--
http://mail.python.org/mailman/listinfo/python-list
On May 23, 9:10 am, [EMAIL PROTECTED] wrote:
> but search and match only returns matchobjects(what are those anyway?
> i dont get what to do with them, do they contain true/false,
> stringposition etc?)
It's all covered in the docs:
http://docs.python.org/lib/module-re.html
http://docs.python.org
Hi Gurus,
I'm a Java developer and I'm trying to shift my mindset to start
programming python. So, my first exercise is to build a website.
However I'm always falling back into MVC pattern. I know it's a
standard, but the implementation language affects the use of design
patter. So, here goes my q
On May 23, 2:14 am, cm_gui <[EMAIL PROTECTED]> wrote:
> I've yet to see a web application written in Python which is really
> fast.
Then stop looking at your own inept Python code and open your eyes.
--
http://mail.python.org/mailman/listinfo/python-list
>> 1
>> 2
actually, you don't want it to print 3 also? if not, then you would do
f(*map(kwargs.get, inspect.getargspec(f)[0])+args[:1])
> import inspect
> f(*map(kwargs.get, inspect.getargspec(f)[0])+args)
>
--
http://mail.python.org/mailman/listinfo/python-list
On 23 Maj, 02:02, [EMAIL PROTECTED] wrote:
> this program doesnt produce any output, however i know from testing
> that the url-regexp matches urls...
>
> import urllib
> import re
>
> site = urllib.urlopen("http://www.python.org";)
>
> email = re.compile(r'[EMAIL PROTECTED],4}')
> url = re.compile
"bukzor" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This question seems easy but I can't figure it out.
> Lets say there's a function:
>
> def f(a, *args):
>print a
>for b in args: print b
>
> and elsewhere in your program you have a list and a dict like this:
> args =
On May 23, 5:06 am, [EMAIL PROTECTED] wrote:
> Nope, this is my first experience with object oriented programming,
> only been learning python for a few weeks but it seemed simple enough
> to inspire me to be a bit ambitious. If you could hook me up with some
> good docs that would be great. I was
Here is the error:
code 4, error number 0 (Symbol not found: _Py_DebugFlag
Referenced from: /Library/Application
Support/Digidesign/Plug-Ins/Play.dpm/Contents/MacOS/Play
Expected in:
/System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
)
On Thu, May 22, 2008 at 10:13 AM, Patrick
this program doesnt produce any output, however i know from testing
that the url-regexp matches urls...
import urllib
import re
site = urllib.urlopen("http://www.python.org";)
email = re.compile(r'[EMAIL PROTECTED],4}')
url = re.compile("^((ht|f)tp(s?)\:\/\/|~/|/)?([\w]+:\w+@)?([a-zA-Z]{1}
([\w\
> Apparently, args already is a tuple, so this should be:
>
> def __getitem__(self, args):
>
> Is this documented somewhere? I couldn't find it anywhere.
>
Don't know, I just assumed it would take multiple arguments because I knew I
had seen the form d[1,2] before, which incidentally is equival
On May 22, 1:18 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> My mum's fast...
> Arnaud
Was it a good idea to include that bit in a troll response?
If English isn't your first language, it's one of those language
idioms that's not very nice to say about someone's mother (especially
your own
Hello I am trying to port some code and I am running into some issues I
may or may not be able to solve on my own and would appreciate your help
Basically I am trying to open the Tun Driver through openvpn in Ether
(Tap mode).
code is as follows
f = win32file.CreateFile("C:\\WINDOWS\\System3
On May 22, 12:07 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Wed, 21 May 2008 17:56:38 -0700, bukzor wrote:
> > On May 21, 5:37 pm, Nikhil <[EMAIL PROTECTED]> wrote:
>
> >> if os.path.exists('file'):
> >> open('file', 'w').close()
>
> >> Right?
>
> > You only want to blank
[EMAIL PROTECTED] wrote:
> actually i ddin't think about the fact that you're overloading dict, which
> can already take multiple values in getitem
Oh, I didn't know that. I totally misinterpreted the error message.
> so how about
>
> class crazy: pass
>
> and then in your dict class:
>
> d
On May 22, 12:14 pm, cm_gui <[EMAIL PROTECTED]> wrote:
> Python is slow.Almost all of the web applications written in
> Python are slow. Zope/Plone is slow, sloow, so very slooow. Even
> Google Apps is not faster. Neither is Youtube.
> Facebook and Wikipedia (Mediawiki), written in PHP, ar
This question seems easy but I can't figure it out.
Lets say there's a function:
def f(a, *args):
print a
for b in args: print b
and elsewhere in your program you have a list and a dict like this:
args = [2, 3]
kwargs = {'a':1}
I'd like to get f() to print something like the following, b
gianluca wrote:
Hy,
I need help about use dll with ctypes. I've compiled my dll C library
and I copied it in c:\windows\system32. When I load it with
"myDLL=cdll.LoadLibrary(find_library("myDLL.dll"))" It seem all OK but
python don't see the dll function. with dir(myDLL) I've only this:
['_FuncPt
dj wrote:
Hello All,
I am attempting to us os.walk to populate two lists with values from a
directory. The first list contains all the files in the directory and
subdirectories.
The second list contains only the files in the subdirectories.
Here is the code:
import os
# list of matching files
i want to search a document for a particular regexp and then store
that regexp to a file.
but search and match only returns matchobjects(what are those anyway?
i dont get what to do with them, do they contain true/false,
stringposition etc?)
how do i do:
for rows in file:
print regexp.find #
On May 22, 6:14 pm, cm_gui <[EMAIL PROTECTED]> wrote:
> I've yet to see a web application written in Python which is really
> fast.
I bet you have a slow dial-up connection.
--
http://mail.python.org/mailman/listinfo/python-list
actually i ddin't think about the fact that you're overloading dict, which
can already take multiple values in getitem
so how about
class crazy: pass
and then in your dict class:
def __getitem__(*args):
if args[-1] is crazy:
return self.get(args[:-1])*5
else:
return self.get(args)
On May 23, 12:33 am, gianluca <[EMAIL PROTECTED]> wrote:
> Hy,
> I need help about use dll with ctypes. I've compiled my dll C library
> and I copied it in c:\windows\system32. When I load it with
> "myDLL=cdll.LoadLibrary(find_library("myDLL.dll"))" It seem all OK but
> python don't see the dll fu
cm_gui wrote:
Python is slow.Almost all of the web applications written in
Python are slow. Zope/Plone is slow, sloow, so very slooow. Even
Google Apps is not faster. Neither is Youtube.
Facebook and Wikipedia (Mediawiki), written in PHP, are so much faster
than Python.
Okay, they probab
"inhahe" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> crazy = True
> print foo['a',crazy]
>
just to clarify, you could use it like:
crazy = "I'm crazy" #this only has to be done once
print foo['a'] #not crazy
print foo['a',crazy] #crazy
(this may be totally unPythonic
On May 23, 6:56 am, [EMAIL PROTECTED] wrote:
> I'm messing around with trying to write an xml file using
> xml.etree.ElementTree. All the examples on the internet show the use
> of ElementTree.write(), although when I try to use it it's not
> available, gives me ...
>
>ElementTree(sectionEleme
it seems like you can't do it exactly the way you're trying but you could do
this
def __getitem__(*args):
if len(args) > 1 and args[1]: return self.get(args[0]) * 5
return self.get(args[0])
then you would use it like
print foo['a']
print foo['a',True]
or even
print foo['a',"crazy"]
if you
Hy,
I need help about use dll with ctypes. I've compiled my dll C library
and I copied it in c:\windows\system32. When I load it with
"myDLL=cdll.LoadLibrary(find_library("myDLL.dll"))" It seem all OK but
python don't see the dll function. with dir(myDLL) I've only this:
['_FuncPtr', '__class__', '
Dave Parker wrote:
Or just:
If command is "quit" ...
Hmmm. In Flaming Thunder, I'm using "is" (and "is an", "is a", etc)
for assigning and checking types. For example, to read data from a
file and check for errors:
Read data from "input.txt".
If data is an error then go to ...
H
cm_gui wrote:
Python is slow.
It ain't C++, but it ain't a punch card either... somewhere in between.
I find it suitable for lots of stuff. I use C++ when performance really
matters tho... right tool for the job. Learn a good interpreted language
(Pyhton) and a good compiled language (C or C
I don't like php. I tried it once and I had it sort a list, but the list
was apparently too long for its sorting function because it just sorted the
first so-many elements of it and left the rest in order, and didn't generate
any error. I like a language that's actually determined by what you
On May 22, 3:56 pm, TkNeo <[EMAIL PROTECTED]> wrote:
> On May 22, 2:44 pm, Hans Nowak <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > TkNeo wrote:
> > > I am trying to upgrade from python 2.3 to 2.4 but not all machines can
> > > be upgraded. Can you guys tell me if this scenario is possible.
>
> > > 1. Any
The following code doesn't run but I hope you get what I
am trying to do.
class my_dict (dict):
def __getitem__ (self, key, crazy = False):
if crazy == True:
return 5 * self.get(key)
else:
return self.get(key)
foo = my_dict()
foo['a'] = 123
print fo
"Marlin Rowley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a class object which has the usual data members and functions.
> I'm trying to make a copy of this class (which includes wx.Bitmap objects)
> but deepcopy() doesn't seem to work. How would I do this?
Are you try
On May 22, 5:24 pm, dj <[EMAIL PROTECTED]> wrote:
...snip...
> for d in dir:
> if end == d:
dir is the list of subdirs of the current dir, and the current dir
is NOT a subdir of itself so end == dir is never true
Are you trying to get a list per subdir?
cheers
--
http://mail.python.o
Hallöchen!
Matthew Woodcraft writes:
> [...]
>
> At one time, Guido was very keen on the idea of Python as a
> language to introduce non-programmers to (under the 'Computer
> Programming for Everybody' slogan).
>
> I think it's rather a shame that this has more-or-less fallen by
> the wayside. Th
[EMAIL PROTECTED] wrote:
Hi,
Is it worthwhile maintaining a production application setup script in
Python as opposed to shell-script?
I do not think so. Perhaps 'in conjunction with', but not 'opposed
to'... sh is the lowest common denominator of shells. Script for sh and
your script will r
Hello All,
I am attempting to us os.walk to populate two lists with values from a
directory. The first list contains all the files in the directory and
subdirectories.
The second list contains only the files in the subdirectories.
Here is the code:
import os
# list of matching files
allfiles =
<[EMAIL PROTECTED]> wrote:
> So it seems like you're designing a language for non-programmers.
> That's good, I've never heard about anyone so interested in teaching
> programming for kids and non-programmers. But in that case, you
> shouldn't even be comparing it to Python.
At one time, Guido was
All:
I have a class object which has the usual data members and functions. I'm
trying to make a copy of this class (which includes wx.Bitmap objects) but
deepcopy() doesn't seem to work. How would I do this?
-M
_
E-mail for the
Hi Marc,
"Marc Christiansen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm not sure I would recommend it, but try:
> [v for x in range(4) for v in (x, 2 * x)]
That certainly works... and it almost seems like a bit less of a hack (if
perhaps somewhat harder to read) than the
According to http://docs.python.org/lib/ssl-objects.html
17.2.2 SSL Objects
SSL objects have the following methods.
read([n])
If n is provided, read n bytes from the SSL connection,
otherwise read until EOF. The return value is a string of
the bytes read.
The behavior I obs
I'm messing around with trying to write an xml file using
xml.etree.ElementTree. All the examples on the internet show the use
of ElementTree.write(), although when I try to use it it's not
available, gives me ...
ElementTree(sectionElement).write("section.xml")
TypeError: 'module' object is n
"inhahe" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> i figured out a solution
>
> sum([x,2*x] for x in range(4)],[]) #not tested
Nice... thanks; I probably had seen code using 'sum' to flatten but hadn't
actually understood how it worked. After playing around some it's now
cl
"Peter Otten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> A slightly similar problem: If I want to "merge," say, list1=[1,2,3] ...
items = [None] * 6
items[::2] = 1,2,3
items[1::2] = 4,5,6
items
> [1, 4, 2, 5, 3, 6]
Thanks Peter, that's pretty clean -- I lik
Mel <[EMAIL PROTECTED]> wrote:
> Mensanator wrote:
> > On May 22, 10:30??am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
> >> Dave Parker <[EMAIL PROTECTED]> wrote:
> >> > But after getting input from children and teachers, etc, it started
> >> > feeling right.
> >>
> >> > For example, consider the
Joel Koltner <[EMAIL PROTECTED]> wrote:
> Is there an easy way to get a list comprehension to produce a flat
> list of, say, [x,2*x] for each input argument?
>
> E.g., I'd like to do something like:
>
> [ [x,2*x] for x in range(4) ]
>
> ...and receive
>
> [ 0,0,1,2,2,4,3,6]
>
> ...but of cours
On Thu, 22 May 2008 15:29:42 -0400, inhahe wrote:
> "Joel Koltner" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Is there an easy way to get a list comprehension to produce a flat list
>> of, say, [x,2*x] for each input argument?
>>
>> E.g., I'd like to do something like:
>>
>>
Ethan Furman wrote:
Next question: when using struct.pack to store an integer, I get a
deprecation warning if the int is too big... I would rather have an
error. Is there a setting somewhere that controls this?
http://docs.python.org/dev/library/warnings
--
Robert Kern
"I have come to bel
On May 22, 2:44 pm, Hans Nowak <[EMAIL PROTECTED]>
wrote:
> TkNeo wrote:
> > I am trying to upgrade from python 2.3 to 2.4 but not all machines can
> > be upgraded. Can you guys tell me if this scenario is possible.
>
> > 1. Any machine that uses .py files that use libraries that require 2.4
> > wi
Hi,
Is it worthwhile maintaining a production application setup script in
Python as opposed to shell-script? The main goal of this setup script
is to sniff a user's environment and export environment variables to
the calling (parent) process.
Either way, some file would need to be sourced into the
Nikhil wrote:
I am using the MySQLdb python module. I have a table named 'testing'
with few columns, under the 'test' database, what is hosted on a remote
mysql server.
I want to run the following query to get a comma-separated information
from the table
LOCK TABLES foo READ;
SELECT a,b,a+
TkNeo wrote:
I am trying to upgrade from python 2.3 to 2.4 but not all machines can
be upgraded. Can you guys tell me if this scenario is possible.
1. Any machine that uses .py files that use libraries that require 2.4
will have 2.4 on it.
2. rest of the machines will have 2.3
now there is a sh
On 22 mai, 18:56, Mensanator <[EMAIL PROTECTED]> wrote:
> On May 22, 10:30 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>
>
>
> > Dave Parker <[EMAIL PROTECTED]> wrote:
> > > But after getting input from children and teachers, etc, it started
> > > feeling right.
>
> > > For example, consider
On May 22, 11:58 am, Mike Driscoll <[EMAIL PROTECTED]> wrote:
> On May 22, 1:38 pm, Geoldr <[EMAIL PROTECTED]> wrote:
>
>
>
> > On May 22, 10:07 am, Mike Driscoll <[EMAIL PROTECTED]> wrote:
>
> > > On May 22, 10:59 am, Geoldr <[EMAIL PROTECTED]> wrote:
>
> > > > Hello all, I have written a simple p
"Joel Koltner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is there an easy way to get a list comprehension to produce a flat list
> of, say, [x,2*x] for each input argument?
>
> E.g., I'd like to do something like:
>
> [ [x,2*x] for x in range(4) ]
>
> ...and receive
>
> [ 0,0
Joel Koltner wrote:
> Is there an easy way to get a list comprehension to produce a flat list
> of, say, [x,2*x] for each input argument?
>
> E.g., I'd like to do something like:
>
> [ [x,2*x] for x in range(4) ]
>
> ...and receive
>
> [ 0,0,1,2,2,4,3,6]
>
> ...but of course you really get a
I am using the MySQLdb python module. I have a table named 'testing'
with few columns, under the 'test' database, what is hosted on a remote
mysql server.
I want to run the following query to get a comma-seperated information
from the table
LOCK TABLES foo READ;
SELECT a,b,a+b INTO OUTFILE
Joel Koltner wrote:
Is there an easy way to get a list comprehension to produce a flat list of,
say, [x,2*x] for each input argument?
E.g., I'd like to do something like:
[ [x,2*x] for x in range(4) ]
...and receive
[ 0,0,1,2,2,4,3,6]
...but of course you really get a list of lists:
[[0, 0
On May 22, 9:59 am, alex23 <[EMAIL PROTECTED]> wrote:
> On May 22, 6:22 pm, [EMAIL PROTECTED] wrote:
>
> > Still getting very odd errors though, this being the latest:
>
> > Traceback (most recent call last):
> > File "spider.py", line 38, in
> > [...snip...]
> > raise InvalidURL("nonnumeric
On Thu, May 22, 2008 at 2:53 PM, Mensanator <[EMAIL PROTECTED]> wrote:
> On May 22, 11:32 am, "Dutton, Sam" <[EMAIL PROTECTED]> wrote:
>> I've noticed that the value of math.pi -- just entering it at the
>> interactive prompt -- is returned as 3.1415926535897931, whereas (as every
>> pi-obsessive
On May 22, 1:38 pm, Geoldr <[EMAIL PROTECTED]> wrote:
> On May 22, 10:07 am, Mike Driscoll <[EMAIL PROTECTED]> wrote:
>
>
>
> > On May 22, 10:59 am, Geoldr <[EMAIL PROTECTED]> wrote:
>
> > > Hello all, I have written a simple program, and at the end of it,
> > > instead of it closing I would like i
On May 22, 11:32 am, "Dutton, Sam" <[EMAIL PROTECTED]> wrote:
> I've noticed that the value of math.pi -- just entering it at the interactive
> prompt -- is returned as 3.1415926535897931, whereas (as every pi-obsessive
> knows) the value is 3.1415926535897932... (Note the 2 at the end.)
>
> Is t
Mensanator wrote:
> On May 22, 10:30 am, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>> Dave Parker <[EMAIL PROTECTED]> wrote:
>> > But after getting input from children and teachers, etc, it started
>> > feeling right.
>>
>> > For example, consider the two statements:
>>
>> > x = 8
>> > x = 10
>>
On 22 mai, 18:14, cm_gui <[EMAIL PROTECTED]> wrote:
> Python is slow.
Oh, a troll...
> Almost all of the web applications written in
> Python are slow. Zope/Plone is slow, sloow, so very slooow. Even
> Google Apps is not faster. Neither is Youtube.
> Facebook and Wikipedia (Mediawiki), wri
On May 22, 10:07 am, Mike Driscoll <[EMAIL PROTECTED]> wrote:
> On May 22, 10:59 am, Geoldr <[EMAIL PROTECTED]> wrote:
>
> > Hello all, I have written a simple program, and at the end of it,
> > instead of it closing I would like it to restart from the beggining.
> > Is there a way to do this? Put
I am trying to upgrade from python 2.3 to 2.4 but not all machines can
be upgraded. Can you guys tell me if this scenario is possible.
1. Any machine that uses .py files that use libraries that require 2.4
will have 2.4 on it.
2. rest of the machines will have 2.3
now there is a shared drive. let
1 - 100 of 193 matches
Mail list logo