> I think most of the evolution has been in the surrounding tools,
> although stuff like the new Debian Python policy could be complicating
> factors. But I don't think the dependency stuff has changed that much
> over the years.
It might be, yet one thing is for sure: there have been various time
Joel Hedlund wrote:
>> test-driven development merely means that you take that test case and
>> *keep it* in your unit test. Then, once you're assured that you will
>> find the bug again any time it reappears, go ahead and fix it.
>
> My presumption has been that in order to do proper test-driven
> Agreed, but until we reach the ideal situation where everybody is using
> the same package dependency system what's your practical solution?
> "Self-contained" has the merit that nobody else's changes are going to
> bugger about with my application on a customer's system. The extra disk
> space i
Henrik Lied wrote:
> On Sep 27, 11:56 am, Bruno Desthuilliers [EMAIL PROTECTED]> wrote:
>> Henrik Lied a écrit :
>>
>> > Hi there!
>>
>> > I'm using a recipe found on ASPN [1] to upload some data to an
>> > external server.
>>
>> > The request fails, and all I get in response is "No backend serve
[EMAIL PROTECTED] wrote:
> Why are the following different?
>
> def AddRow(self, rowName, tableRow=TableRow(ReleaseDate(""),
> ExpiryDate(""))):
> # check to see if the row already exists, if not add it to the
> container
>
> if not self.dict.has_key(rowName):
> self.dict[rowName] = tableRow
>
[EMAIL PROTECTED] wrote:
> Hello,
>
> I want to implement file downloads inside an authenticated web page,
> such that when a user clicks a link, the server side python code
> connects to a ftp server, downloads a relevant file and then streams
> the file to the browser for the user to open it w
TheFlyingDutchman schrieb:
>> - Abstract Base Classes
>> http://www.python.org/dev/peps/pep-3119/>
>>
>
> I like how someone here characterized decorators - those silly @
> things. They remind me of Perl. Not adding keywords for abstract and
> static is like Perl not adding a keyword for cla
> You said it was a most basic language feature. I still haven't heard
> anything that leads me to believe that statement is correct. What
> languages implemented decorators as a most basic language feature?
I was talking about Python, the programming language that is discussed in
this NG.
> Pyt
TheFlyingDutchman wrote:
>
>>
>> The fact that you compare and criticise the simple annotations like
>> static or abstract with the much more powerful decorator concept shows
>> that, despite being the maintainer of a
>> soon-to-be-ruling-the-python-world Python 3 fork, lack understanding of
>> e
Paul Rubin wrote:
> "Diez B. Roggisch" <[EMAIL PROTECTED]> writes:
>> All serious languages are turing-complete. So can we put away with this
>> non-sense argument right away, please?
>
> Actually the so called "total" languages aren't Turi
TheFlyingDutchman wrote:
> On Sep 28, 11:16 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>> On Fri, 28 Sep 2007 11:04:39 -0700, TheFlyingDutchman <[EMAIL PROTECTED]>
>> wrote:
>> > [snip]
>>
>> >In this case I asked it as part of the original question and it was
>> >ignored. I have programme
gamename wrote:
> Hi,
>
> Can anyone recommend a good method of using python to generate c
> source code? I have tables of test cases to use as input to a
> process which would generate the test's source code. The Cheetah tool
> looks interesting. Has anyone used it? Any other suggestions?
H
TheFlyingDutchman wrote:
>
>>
>> Or bind resources of these pocket protectors that otherwise would lead to
>> answers for people that do seek enlightment...
>
> I don't think it would be correct to characterize my posts as not
> seeking enlightenment. I do also happen to voice my opinion which
>
[EMAIL PROTECTED] wrote:
> Hi!
>
> I was surprised when I did a google-groups search for python,
> (
> http://groups.google.com/groups/search?q=python&qt_s=Search+Groups
> )
> it shows these groups:
> comp.lang.python with about 11000 users,
> and second,
> Django users
> Discussion group for D
Abandoned wrote:
> Also if i need a list id what can i do ?
>
> aia.execute("SELECT id, w from list")
> links=aia.fetchall()
>
> I want to..
>
> idlist=[1, 2, 3] ( I don't want to use FOR and APPEND because the
> query have 2 million result and i want to speed)
It will always return a list of
> Maybe a better question is, how has Tk managed to keep beating up the
> newer, more modern, more featureful, better documented toolkits
> encroaching on his territory? What's Tk's secret weapon?
There is no secret weapon. It's a question about dependencies, maintenance,
stability and supported p
x >>= 1
> return s
>
> My thought was this will act like a Long, and so should act like an
> array of bits with arbitrary precision, supporting the standard
> bitwise operations, along with others I may add.
>
>>>> import bits
>>>>
>
> Wow ! I have a question though.
>
> If you really make $38600 a month, how come you even bother to spam
> us?
Please, don't reply - and especially, don't reply quoting the spammer's
site, so his page-rank inncreases...
diez
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] schrieb:
> Hello all,
>
> in python2.4, i read lines from a file with
>
> for lineNum, line in enumerate(f): ...
>
> However, lineNum soon overflows and starts counting backwards. How do
> i force enumerate to return long integer?
Most probably you can't, because it is a C-wri
Bruno Desthuilliers schrieb:
> [EMAIL PROTECTED] a écrit :
>> I have found an excellent resource on Object Oriented Programming.
>>
>>
> (url snipped to protect the innocents)
>
> Let's see:
>
> "An object has methods, properties and events."
>
> Hem...
>
> "oriented programming probably existe
he dictionary is unnecessary but I may be wrong.
anyhow, I keep getting "SyntaxError: Non-ASCII character '\xc2'..." on line 5.
anyone know what this is? I couldn't run the script but from looking at it,
it appears you're making some pointless keys when indexes may b
[EMAIL PROTECTED] wrote:
> Hi there
>
> I currently have a Python program outputing to the command line,
> durations of 'completed Steps' and 'data items' in relation to time
> i.e.
>
>
> --jfh
> -kl//kl started after jfh finished
> % D
On Friday 05 October 2007 3:33:43 am Peter Otten wrote:
> Victor B. Gonzalez wrote:
> > anyhow, I keep getting "SyntaxError: Non-ASCII character '\xc2'..." on
> > line 5. anyone know what this is?
>
> I too had that problem with KNode. Leading space consist
[EMAIL PROTECTED] schrieb:
> hii my friends
> ı want to a filter for porn picture
> if you know , please help me :S:S
> how do ı separate porn form not porn
> I don't want my web site porn;)
> (my english bad I hope understant it. very very thans )
If anybody know how to do that, he or she would
>
> The real goal is to start the gui in a different thread, and have the
> main thread regain control. That seems like a feasible thing to be
> able to do, though I have been unsuccessful ... if anyone would like
> to suggest something without being covertly insulting, I'm all ears.
AFAIK some t
Colin J. Williams schrieb:
> Greg Ewing wrote:
>> Pyrex 0.9.6 is now available:
>>
>>http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
>>
>> There is a *lot* of new stuff in this version, too much
>> to fit into this announcement. Read all about it here:
>>
>>
>> http://www.cosc.canterbu
Kay Schluehr schrieb:
> On Oct 7, 4:48 pm, Dekker <[EMAIL PROTECTED]> wrote:
>> On 7 Okt., 16:19, Steven D'Aprano <[EMAIL PROTECTED]
>>
>> cybersource.com.au> wrote:
>>> On Sun, 07 Oct 2007 13:52:15 +, Dekker wrote:
Is it possible to override 'and' and/or 'or'?
>>> Not without hacking the
Sanjay wrote:
> Hi All,
>
> I am using pytz.common_timezones to populate the timezone combo box of
> some user registration form. But as it has so many timezones (around
> 400), it is a bit confusing to the users. Is there a smaller and more
> practical set? If not, some suggestions on how to han
[EMAIL PROTECTED] wrote:
> On Oct 7, 8:17 pm, Michal Bozon <[EMAIL PROTECTED]> wrote:
>> On Sun, 07 Oct 2007 09:02:09 -0700, Abandoned wrote:
>> > On Oct 7, 4:47 pm, Michal Bozon <[EMAIL PROTECTED]> wrote:
>> >> On Sun, 07 Oct 2007 06:03:06 -0700, Abandoned wrote:
>> >> > Hi..
>> >> > I find the p
Steven D'Aprano wrote:
> On Sun, 07 Oct 2007 21:27:31 -0700, Aahz wrote:
>
>> In article <[EMAIL PROTECTED]>, Steven
>> Bethard <[EMAIL PROTECTED]> wrote:
>>>
>>>You can use __slots__ [...]
>>
>> Aaaugh! Don't use __slots__!
>>
>> Seriously, __slots__ are for wizards writing applications wit
Steven D'Aprano wrote:
> On Mon, 08 Oct 2007 15:15:36 +0200, Diez B. Roggisch wrote:
>
>>> Well, I've read the thread, and I've read the thread it links to, and
>>> for the life of me I'm still no clearer as to why __slots__ shouldn't
>&
[EMAIL PROTECTED] wrote:
> Ok, I'm relatively new to Python (coming from C, C++ and Java). I'm
> working on a program that outputs text that may be arbitrarily long,
> but should still line up, so I want to split the output on a specific
> column boundary. Since I might want to change the lengt
Zentrader wrote:
> You can use Python's decimal class if floating point arithmetic is not
> exact enough
This is a misleading statement. While it's true that decimal can be more
precise in the sense that smaller fractions are representable, the
underlying problem of certain values not being repre
Tor Erik Sønvisen schrieb:
> Hi,
>
> I've tried locating some code that can recreate an object from it's
> string representation...
> The object in question is really a dictionary containing other
> dictionaries, lists, unicode strings, floats, ints, None, and
> booleans.
>
> I don't want to use
Stefan Arentz wrote:
>
> At http://docs.python.org/dist/node12.html it is described how to add
> package data to a module. This was pretty easy to do, but now how do I
> access this data from my module? Is there an API to load a 'package
> resource' ala Java's classloader?
You can always use os.
[EMAIL PROTECTED] wrote:
> Hi i am a newbie to python and PIL. can anyone tell me how to get
> rgbdata from a jpeg image using PIL
> as a double[] . is there an equiv method to java's
> BufferedImage.getRGB(0,0,width,height,rgbdata,0,width) ?
The docs of PIL are quite good. And there you find th
Tim Bradshaw wrote:
> On Oct 9, 7:34 am, [EMAIL PROTECTED] wrote:
>
>> which lambda paper ?
>
> Are you Ilias? I think you probably are.
He certainly isn't, but you are right that he smells like he's been living
under a bridge for quite a time...
Diez
--
http://mail.python.org/mailman/listin
[EMAIL PROTECTED] wrote:
> Hi,
>
> I'm working with Python2.5 and pythonWin.
>
> I'd like to start working with and learning more with UML. Can anyone
> suggest any freeware design software that I might use to do this? I
> also have
> Visio installed on my computer if thats of any use...
ArgoU
[EMAIL PROTECTED] wrote:
> On 9 Okt, 12:15, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>> > Hi,
>>
>> > I'm working with Python2.5 and pythonWin.
>>
>> > I'd like to start working wi
[EMAIL PROTECTED] wrote:
> On Oct 8, 1:03 pm, Carsten Haese <[EMAIL PROTECTED]> wrote:
>> On Mon, 2007-10-08 at 10:41 -0700, [EMAIL PROTECTED] wrote:
>> > For example, Windows has seperate listings for
>>
>> > Central America
>> > Central Time (US & Canada)
>> > Guadalahara, Mexico City, Monterry
lgwe wrote:
> I have a python-script: myscript, used to start a program on another
> computer and I use OptionParser in optpars.
> I use it like this: myscript -H host arg1 -x -y zzz
> I would like OptionParser to ignore all arguments after arg1, because
> these are options that should be used by
Stefan Arentz wrote:
>
> Is there an easy way to implement a specific method of a Python class
> in C? Like a native method in Java? I would really like to do the
> majority of my class code in Python and just do one or two methods
> in C.
ctypes or subclassing C-implemented classes.
Diez
--
h
return "__add__"
def __iadd__(self, o):
return "__iadd__"
a = Foo()
a += 1
print a
a = Foo()
b = Foo()
c = a + b
print c
So you see, the first += overrides a with the returned value of __iadd__.
The reason for the difference though is most probably wh
Steven D'Aprano schrieb:
> On Tue, 09 Oct 2007 19:23:37 +0200, Diez B. Roggisch wrote:
>
>> Your believes aside, this is simply wrong. The statement
>>
>> a += x
>>
>> always leads to a rebinding of a to the result of the operation +.
>
>
>> who says that timezones have to be separated by one hour each?
>
> The Earth says. It takes 24 hours to revolve.
Wrong
>> Why aren't they separated by 30minutes, or 20, or 10? Or 2 hours?
>
> Why isn't an hour defined to be 30 minutes?
>
>> Or why don't we have a global time?
>
> Like UTC?
>> who says that timezones have to be separated by one hour each?
>
> The Earth says. It takes 24 hours to revolve.
Your kidding me, aren't you? Beside the fact that the earth does not
revolve in 24h (leap seconds, if you like to google), even the 24 hours
of a day are as arbitrary as you prefe
Just Another Victim of the Ambient Morality schrieb:
> HTMLParser is behaving in, what I find to be, strange ways and I would
> like to better understand what it is doing and why.
>
> First, it doesn't appear to translate HTML escape characters. I don't
> know the actual terminology but
Just Another Victim of the Ambient Morality schrieb:
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Just Another Victim of the Ambient Morality schrieb:
>>> HTMLParser is behaving in, what I find to be, strange
to the
> result of the operation +". The + operator for lists creates a new list.
> += for lists does an in-place modification:
It still is true.
a += b
rebinds a. Period. Which is the _essential_ thing in my post, because
this rebinding semantics are what confused the OP.
>>&
Diez B. Roggisch schrieb:
>>> Yes, it is.
>>
>> I'm afraid not.
>>
>> As I admitted in my reply to Marc, I overstated my case by saying that
>> L isn't rebound at all. Of course it is rebound, but to itself.
>>
>> However, it is not tru
lgwe wrote:
> On 9 Okt, 17:18, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> lgwe wrote:
>> > I have a python-script: myscript, used to start a program on another
>> > computer and I use OptionParser in optpars.
>> > I use it like thi
Steven D'Aprano wrote:
> On Wed, 10 Oct 2007 06:57:15 -0700, Carl Banks wrote:
>
>> On Oct 10, 9:39 am, Steven D'Aprano <[EMAIL PROTECTED]
>> cybersource.com.au> wrote:
>>> On Wed, 10 Oct 2007 09:36:56 +, pythoncurious wrote:
>>> > So how do people solve this? Is there an obvious way that I m
On Wed, 10 Oct 2007 14:35:35 +, kyosohma wrote:
> I am trying to figure out how to build binaries for Python packages and
> I've done it with MinGW.
Apparently, you still can: http://tinyurl.com/yb4bps
--
http://mail.python.org/mailman/listinfo/python-list
Sells, Fred schrieb:
> I need a simple client/server architecture with clients on linux and servers
> on windows. There is no UI in this part, just business rules and access
> control.
>
> Pyro seems pretty cool for this due to it's simplicity. I'm just starting
> with it and have not been ab
mhearne808[insert-at-sign-here]gmail[insert-dot-here]com schrieb:
> I'm missing something major here. I'm trying to add a directory to my
> python path using the PYTHONPATH environment variable, and it's being
> ignored by the Python interactive shell.
>
> Below is a capture of what I did. Note
Matt Mackal schrieb:
> I have an application that occassionally is called upon to process
> strings that are a substantial portion of the size of memory. For
> various reasons, the resultant strings must fit completely in RAM.
> Occassionally, I need to join some large strings to build some even
>
Licheng Fang wrote:
> On Apr 14 2003, 10:30 pm, Alex Martelli <[EMAIL PROTECTED]> wrote:
>> Sebastian Wilhelmi wrote:
>> > Hi,
>>
>> > I would like to do the following:
>>
>> > ---8<---8<---8<---8<---
>> > def test ():
>> > count = 0
>> > def inc_count ():
>> >
Sells, Fred wrote:
> Diez B. Roggisch wrote
> . Why do you want that (hot deploy)
>> anyway? Does startuptime of a script really bother you?
>> shouldn't take
>> more than a few seconds.
>
> My primary need is development/debug. I'm a Pyro newbie and I
jeremito wrote:
> My Python script makes a bunch of images that I want to use as frames
> in a movie. I've tried searching for a module that will take these
> images and put them together in a Quicktime or mpeg movie, but haven't
> found anything. My images are currently pdfs, but I could make t
brad wrote:
> [EMAIL PROTECTED] wrote:
>> On Oct 11, 5:22 pm, brad <[EMAIL PROTECTED]> wrote:
>>> Crazy question, but has anyone attempted this or seen Python code that
>>> does? For example, if a text file contained 'Guido' and or 'Robert' and
>>> or 'Susan', then we should return True, otherwise
Irmen de Jong schrieb:
> Diez B. Roggisch wrote:
>
>> Go install cygwin (but not it's included python-interpreter, or at least
>> make sure you have your python path properly under control) and then
>> simply
>> start the script from the command-line. And
Florian Lindner wrote:
> Hello,
> can I determine somehow if the iteration on a list of values is the last
> iteration?
>
> Example:
>
> for i in [1, 2, 3]:
>if last_iteration:
> print i*i
>else:
> print i
>
> that would print
>
> 1
> 2
> 9
>
>
> Can this be acomplished s
Florian Lindner wrote:
> Carsten Haese wrote:
>
>> On Thu, 2007-10-11 at 15:14 +0200, Florian Lindner wrote:
>>> Hello,
>>> I have a function that executes a SQL statement with MySQLdb:
>>>
>>> def executeSQL(sql, *args):
>>> print sql % args
>>> cursor = conn.cursor()
>>> cursor.ex
>- The Mac version of Python includes wrappers for a number of Carbon
> APIs, including QuickTime. One for brave souls only; QT's C APIs are
> notoriously complex,
AMEN. I tried to work with that stuff, and it was close to a totally
failure & desaster...
Diez
--
http://mail.python.org/mailman/
stef mientki schrieb:
> hello,
>
> I've a program where users can make modules,
> by just dumping them in a certain directory,
> then they will dynamically link into the program if needed.
>
> One of the communication channels I use,
> is a general global file, which should be imported by all use
rodmc schrieb:
> Hi,
>
> I am writing a threaded application, part of which relies on sending
> messages to users. However I cannot get the smtplib and some other
> email related libraries to work inside threads (they work ok when not
> in threads). Is there a problem with using threads and email?
David Tremouilles schrieb:
> No issue with pygtk on mac!
> Actually I develop on this platform everyday. Macport take care of the
> installation for me http://www.macports.org/ (Fink should do the work
> too).
> Of course native GTK on OSX could be nice but definitely not needed at
> this point in
Dan Stromberg schrieb:
> On Thu, 11 Oct 2007 18:42:16 +, Marc 'BlackJack' Rintsch wrote:
>
>
>>> The "baggage" of possibly fixing (AKA "generalizing") how your attributes
>>> are accessed is something you lug around while your deadline looms.
>> Sorry I don't get it. If I want to customize t
rodrigo schrieb:
> I am trying to retrieve a password protected page using:
>
> get = urllib.urlopen('http://password.protected.url";').read()
>
> While doing this interactively, I'm asked for the username, then the
> password at the terminal.
> Is there any way to do this non-interactively? To
Peter Otten schrieb:
> Diez B. Roggisch wrote:
>
>> Florian Lindner wrote:
>
>>> can I determine somehow if the iteration on a list of values is the
>>> last iteration?
>
>> def last_iter(iterable):
>> it = iter(iterable
gt; Thank you for replay, but I'm still not sure what to think about it...
> Marc 'BlackJack' Rintsch in his replay to my post says that it would be to
> complicated for IDE to keep track of all objects... isn't he right?
He is right. What would you expect from this piece
be wrong but from a quick glance you'll need to end it for sure when
dealing with recursion.
maybe also trying to reverse using the iterator function reversed() or this
shortcut may help e.g, 'abc'[::-1] -> 'cba'.
good luck!
--
Best Regards
Victor B. Gonzalez
--
http://mail.python.org/mailman/listinfo/python-list
looping wrote:
> On Oct 15, 9:46 am, looping <[EMAIL PROTECTED]> wrote:
>> l = [ct1, ct2, ct3]
>> for c in l:
>> d.addCallback(lambda result: c.compile())
>>
>> reactor.callLater(20, reactor.stop)
>> reactor.run()
>>
>> Output:
>>
>> Compile : *OBJECT 1*
>> <__main__.CompilerThread object at 0
David Tremouilles wrote:
> "crappy", "waaay better"
> I will not feed the troll...
> Pygtk on mac just do the work for me on a more than satisfying way.
I should have worded more carefully, it wasn't intended as trolling. Sorry
for that.
But the point I wanted to make still stands - the native
xkenneth wrote:
> Hi,
>
> I'm working on developing an XML-RPC interface from LabVIEW to
> python and I would really like to see how python is forming it's XML-
> RPC requests/responses. Is there any way I can force these to a log or
> print them to the screen? Thanks.
I've utilized the apac
goldtech wrote:
> Using Python and OBDC in MS-Access DBs. So, I'm able to run SQL
> statements from Python on an Access DB.
>
> Is there an SQL statement that will give me column information? For a
> table I want to know the data type and of course colum/Attribute name
> for each column.
>
> So
Just found this:
http://feeds.feedburner.com/~r/boingboing/iBag/~3/170523979/french-lady-finds-py.html
I do believe that Python should be somewhat more upfront to brandish it's
merits - but then, sneaky ways are ok with me to...
Diez
--
http://mail.python.org/mailman/listinfo/python-list
krishnakant Mane wrote:
> hello,
> thanks all of you for providing valuable help.
> right now I am confused about the delta object.
> how can I extract the difference between two dates in terms of day
> using the delta object?
> I tried reading the python docs but did not understand the concept of
Paul Miller schrieb:
> I'm looking at doing some currency calculations in some Python code
> integrated with a C++ application. I want to be able to come up with the
> same values I get in an Excel spreadsheet.
>
> I've been poking around for a couple of days and haven't come across a
> definit
between a version and an other, there isn't
> always a very good backward compatibility (I know, it's very ugly, but
> it's like that...).
>
> Moreover some library use the version 1.1 and some the version 1.2 of
> lib A and version 2.1 and version 2.0 of lib B ... yo
Abandoned wrote:
> Hi..
> I have a dictionary like these:
> a={'a': '1000', 'b': '18000', 'c':'40', 'd': '600'} .. 100.000
> element
> I want to sort this by value and i want to first 100 eleme
Diez B. Roggisch wrote:
> Abandoned wrote:
>
>> Hi..
>> I have a dictionary like these:
>> a={'a': '1000', 'b': '18000', 'c':'40', 'd': '600'} .. 100.000
>> element
>> I want
Alexandre Badez wrote:
> On Oct 17, 3:33 pm, Rafa Zawadzki <[EMAIL PROTECTED]> wrote:
>> Hello.
>>
>> As I saw in logging source - there is no lock per file during making
>> emit() (only lock per thread).
>>
>> So, my question is - is it safe to log into one file using many
>> processess uses log
>> Diez
>
> Well, I would like to be able to use "setuptools", but the problem is
> that I can't.
> Cause the administrator do not want us to be able to add lib in python
> dir.
> So we have to create our own library directory...
That doesn't matter, setuptools is capable of installing anywhere -
George Sakkis wrote:
> On Oct 17, 10:06 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> Diez B. Roggisch wrote:
>> > Abandoned wrote:
>>
>> >> Hi..
>> >> I have a dictionary like these:
>> >> a={'a':
rc wrote:
> How to insert NULL values in to int field using params.
>
> I'm trying to use pymssql.execute, passing the operation and list of
> params. One of the values in the params is a NULL value going to int
> field. The pymssql._quote() puts ' around the NULL which causes an
> exception to
stef mientki schrieb:
> hello,
>
> I've written a convenience wrapper around ConfigObj (which is a imporved
> ConfigParser).
>
> Now if I use an instance of the base class, I can easily test is the
> instance exists by " if ini:",
> like in this example
>
>ini = None
>if ini:
>
Ben Finney wrote:
> "Diez B. Roggisch" <[EMAIL PROTECTED]> writes:
>
>> stef mientki schrieb:
>> > What should I do to the same simple test for existance ?
>>
>> Use isinstance(obj, type).
>
> No, that's *far* more specific than &qu
Abandoned wrote:
> I want to convert a string to command..
> For example i have a string:
> a="['1']"
> I want to do this list..
> How can i do ?
The correct wording here would be expression. To evaluate expressions, there
is the function eval:
a = eval("['1']")
But beware: if the expression co
Abandoned wrote:
> Thanks you all answer..
> But "eval" is very slow at very big dictionary {2:3,4:5,6:19}
> (100.000 elements)
> Is there any easy alternative ?
How big? How slow? For me, a 1-element list takes 0.04 seconds to be
parsed. Which I find fast.
Diez
--
http://mail.python.o
rc wrote:
> On Oct 17, 11:07 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> rc wrote:
>> > How to insert NULL values in to int field using params.
>>
>> > I'm trying to use pymssql.execute, passing the operation and list of
>> >
Abandoned wrote:
> On Oct 18, 6:14 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> Abandoned wrote:
>> > Thanks you all answer..
>> > But "eval" is very slow at very big dictionary {2:3,4:5,6:19}
>> > (100.000 elements)
>&g
Abandoned wrote:
> On Oct 18, 6:35 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> Abandoned wrote:
>> > On Oct 18, 6:14 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>> >> Abandoned wrote:
>> >> > Thanks you a
[EMAIL PROTECTED] wrote:
> On 19 Oct, 11:45, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] napisa³(a):
>>
>> > Is there any way (other then eval) to invoke a method by passing
>> > method name in a string.
>> > It's very simple in php:
>> > $oFoo = new Foo();
>> > $dynamiMethod = "b
Sushant wrote:
> Python will not allow string to be used a function pointer. It is type
> unsafe. Best way is to convert string into function pointers manually.
>
> if dynamicMethod == 'bar':
> method = oFoo->bar
> else:
> method = oFoo->default
> method()
Sorry to say so, but that answe
Nils wrote:
> On Oct 19, 12:39 pm, [EMAIL PROTECTED] wrote:
>> Hello,
>>
>> Is there any way (other then eval) to invoke a method by passing
>> method name in a string.
>> It's very simple in php:
>> $oFoo = new Foo();
>> $dynamiMethod = "bar";
>> $oFoo->$dynamiMethod();
>>
>> Unfortunately I can'
Sean DiZazzo schrieb:
> Hi all,
>
> I am just beginning with TurboGears and have run into a problem with
> SQLObject.
>
> I'm trying to connect to an established mysql DB, and use TurboGears
> to display results from the DB only. The problem is that the DB
> already has an 'id' field that is a s
Abandoned schrieb:
> Hi..
> I have some dictionary as {2:3, 4:6, 5:7.}
> I want to pickle to these dictionary and save to database but i
> couldn't..
>
> My code for adding..
> a=eval(dict)
> a=pickle.dumps(a, -1)
> cursor2.execute("INSERT INTO cache VALUES ('%s', %s)", (x[0],a))
> conn2.c
>No, no, that's wrong. MySQL and the Python interface to it understand
> Unicode. You don't want to convert data to UTF-8 before putting it in a
> database; the database indexing won't work.
I doubt that indexing has anything to do with it whatsoever.
>Here's how to do it right.
>
>
MRAB schrieb:
> On Oct 19, 4:11 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>> En Thu, 18 Oct 2007 23:44:27 -0300, Ixiaus <[EMAIL PROTECTED]>
>> escribió:
>>
>>> I have just come across a site that discusses Python's 'for' and
>>> 'while' loops as having an (optional) 'else' structure.
>>>
1901 - 2000 of 4468 matches
Mail list logo