On Sun, 03 Feb 2008 21:31:44 -0800, 7stud wrote:
> On Feb 3, 10:28 pm, 7stud <[EMAIL PROTECTED]> wrote:
>> From the docs:
>>
>> issubclass(class, classinfo)
>> Return true if class is a subclass (direct or indirect) of classinfo.
>
>
> print issubclass(Dog, object) #True
So Dog is a subclass o
2008/2/13, Juha S. <[EMAIL PROTECTED]>:
>
> Hi,
>
> I'm trying to use the Python profilers to test my code, but I get the
> following output for cProfile.run() at the interpreter:
>
> Traceback (most recent call last):
> File "", line 1, in
> Fi
On Mon, 11 Feb 2008 14:07:49 -0800, Erik Max Francis wrote:
> experience. The notion of impetus -- where an object throw moves in a
> straight line until it runs out of impetus, then falls straight down --
> is clearly contrary to everyday experience of watching two people throw
> a ball back and
On Fri, 29 Feb 2008 08:18:54 -0800, baku wrote:
> return s == s.upper()
A couple of people in this thread have used this to test for an upper
case string. Is there a reason to prefer it to s.isupper() ?
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 09 Mar 2008 01:57:38 -0800, Vince wrote:
> Well, that suits me. The most unnatural thing about Python was adapting
> to the idea of just letting unreleased resources go jogging off
> wherever. :)
Yes, that's a bad habit that garbage collection can encourage. GC is good
for managing memory
I have a python/django webapp running with apache2. It executes system
commands for getting a pdf generated by pdflatex from a .tex file and
a couple of image files which it also generates.
The permssions from ls-l for all the created files is:-
-rw-r--r-- 1 www-data www-data
The files are being
for the help though
On Nov 25, 2:30 pm, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
> I-T <[EMAIL PROTECTED]> wrote:
> > I have a python/django webapp running with apache2. It executes system
> > commands for getting a pdf generated by pdflatex from a .tex file and
&
On Sat, 06 Dec 2008 16:34:56 -0800, Erik Max Francis wrote:
> `$` as a shortcut for self, on the other hand, gives absolutely no
> mnemonic indication what it stands for, and users would be simply left
> guessing.
However, $ is sometimes used as an alternative way of writing S̸ (I've
attempted to
On Mon, 08 Dec 2008 13:42:00 -0500, r0g wrote:
> Robocop wrote:
>> However i'm having several problems. I know that playskool regular
>> expression i wrote above will only parse every 50 characters, and will
>> blindly cut words in half if the parsed string doesn't
On Sun, 14 Dec 2008 21:08:33 -0800, James Stroud wrote:
> Yes. I think it was the British who decided that the apostrophe rule for
> "it" would be reversed from normal usage relative to just about every
> other noun. I'm not sure the purpose--maybe it was to give compulsive
ere written long ago and submitted to the
book's on line material website (available soon). The Python programs with
the basic equations modelled and the results in figures were now uploaded on
a special wiki page of DeductiveThinking.com.
Since, the programs are heavily using numpy, scipy and matp
2008/10/25 Alan G Isaac <[EMAIL PROTECTED]>
> On 10/25/2008 4:14 PM I. Soumpasis apparently wrote:
> > http://blog.deductivethinking.com/?p=29
>
> This is cool.
> But I do not see a license.
> May I hope this is released under the new BSD license,
> like the p
Hello James,
Thanks for your response.
But I cannot use a third party software, I need to use the exisiting API's
within python.
As I am new to python, I suspected that I should go by a simpler approach
and so
scrapped off the below code and wrote a very simple UDP server code as
fo
On Thu, Nov 6, 2008 at 10:27 AM, James Mills
<[EMAIL PROTECTED]>wrote:
> On Fri, Nov 7, 2008 at 12:57 AM, I D <[EMAIL PROTECTED]> wrote:
> > Thanks for your response.
> > But I cannot use a third party software, I need to use the exisiting
> API's
> > wit
On Wed, 18 Mar 2009 21:30:59 -0700, gaeasiankom wrote:
> What actually I'm try to do is :
>
> I'm having a Login page which developed in HTML. When I click on the
> "Login" button I want the page to validate (at datastore of google app)
> using python and red
On Fri, 20 Mar 2009 07:03:35 -0700, Sreejith K wrote:
> I'm using the above codes in a pthon-fuse's file class's read function.
> The offset and length are 0 and 4096 respectively for my test inputs.
> When I open a file and read the 4096 bytes from offset, only a few line
On Thu, 23 Apr 2009 02:16:07 +, Steven D'Aprano wrote:
> I'm leaning towards this being a bug in the json module. Unless somebody
> can point me at a credible source that sessionstore.js isn't JSON, I
> will report this as a bug.
I'm just another random guy on
allable({}.get) and callable(dict.get) are both
true, although I don't know if that's guaranteed (I'm wondering if
methods could be implemented with an object such that
method_object.__get__ returned a callable, but where method_object itself
wasn't callable).
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 12 May 2008 16:39:25 -0700, Dave Parker 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 at http://www.flamingthunder.com/ , which has proven
> easy enough for even el
On Wed, 14 May 2008 00:38:44 +0200, Christian Heimes wrote:
> Eric Anderson schrieb:
>> Seems like unnecessary code but obviously I know nothing about Python.
>
> Correct, the truth example isn't a good example. "if argv" is better.
I hadn't heard of operato
gt; [Scroll down to attributes].
>
> > On May 16, 1:44 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> >> Casey <[EMAIL PROTECTED]> writes:
> >> > Hi,
>
> >> > I have some classes that print variable outputs depending on their
> >>
Open the file inside your script in append mode.
open('filename', 'wa')
On May 16, 11:41 pm, globalrev <[EMAIL PROTECTED]> wrote:
> i ahve a program that takes certain textsnippets out of one file and
> inserts them into another.
>
> problem is it jsu
at one point, but this made it unusable.)
Really? The FAQ says it uses operating system threads, which I would have
thought would mean it runs on multiple processors (modulo, I suppose, the
issues with the GIL).
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 23 May 2008 00:12:35 -0700, Marc Oldenhof wrote:
> It seems that Python calls numpy's "all" instead of the standard one, is
> that right? If so, how can I call the standard "all" after the numpy
> import? ["import numpy" is not a desirable o
On Sun, 25 May 2008 13:43:15 +0200, Martin Manns wrote:
> I try to get a set of lambda functions that allows me executing each
> function code exactly once. Therefore, I would like to modify the set
> function to compare the func_code properties (or the lambda functions to
> use this
On Sun, 25 May 2008 13:05:31 -0300, Gabriel Genellina wrote:
> Use a list, and the bisect module to keep it sorted:
That's worth doing if you need the data to be sorted after each insert.
If the OP just needs the data to be sorted at the end, using a data
structure with fast inserts (like a set)
On Sun, 25 May 2008 15:49:16 -0700, notnorwegian wrote:
> i meant like set[pos], not iterate but access a specific position in the
> set.
If you need to access arbitrary elements, use a list instead of a set
(but you'll get slower inserts). OTOH, if you just need to be able to get
th
On Sun, 25 May 2008 18:42:06 -0700, notnorwegian wrote:
> def scrapeSites(startAddress):
> site = startAddress
> sites = set()
> iterator = iter(sites)
> pos = 0
> while pos < 10:#len(sites):
> newsites = scrapeSite(site)
> joinSets(sites, newsites)
You change t
On Sun, 25 May 2008 21:41:09 -0400, Jerry Stuckle wrote:
> The the good programmers are able to adapt to the language and make the
> most of whatever language they're using. The result is good code. OTOH,
> poor programmers I have known have found all kinds of excuses - from the
>
On Fri, 13 Jun 2008 22:10:51 +0100, Ognjen Bezanov wrote:
> I am building an application using WxWidgets, and its job is to manage
> HTML data in a database. Now I need essentially a HTML editor that I can
> embed into my program, that will parse the HTML and allow the user to
> e
On Thu, 17 Jul 2008 15:08:17 -0700, castironpi wrote:
> The Python disassembly is baffling though.
>
y= 3
dis.dis('x=y+1')
You can't disassemble strings of python source (well, you can, but, as
you've seen, the results are not meaningful). You need to compile the
source first:
>>> co
On Thu, 17 Apr 2008 19:30:33 -0700, erikcw wrote:
> use some sort of data-structure (maybe
> nested dictionaries or a custom class) and store the pickled
> data-structure in a single row in the database (then unpickle the data
> and query in memory).
Why would you want to do this?
John Salerno wrote:
> How does the __init__ file help if you are still individually importing
> class1 and class2 in each other module of your program?
Felipe's example is a little confusing because he uses the same name
for the module and the class. Here's another example:
--- package/class1.py
Release Name: vizann-2.0
This freeware program may be downloaded from
http://sourceforge.net/projects/annevolve.
*Notes:*
This is a program to graphically demonstrate the operational
details of two types of ANN (Artificial Neural Network) when
used to implement the XOR function.
The program is 1
dongdong wrote:
> using web browser can get page's content formally, but when use
> urllib2.open("http://tech.163.com/2004w11/12732/2004w11_1100059465339.html";).read()
>
> the result is
>
> CONTENT="0;URL=http://tech.163.com/04/1110/12/14QUR2BR0009159H.html";>
This line here instructs the browse
to go back to the last page they have
> seen, rather than the redirection page with a "Location: url" head and
> blank content.)?
I guess this may vary from browser to browser, but on Mozilla at least,
if your CGI script returns one of the 300 status codes, then the
redirect page do
I can't get this to work:
# commer.py - to test communication with other process
from popen2 import popen2
(child_stdout, child_stdin) = popen2("commer.exe")
print "Got here 1"
line = child_stdout.readline()
print "Got here 2"
child_stdin.write(line)
child_
Rene Pijlman wrote:
> I. Myself:
>
>> I can't get this to work
>>
>
> With what versions of what software on what platform?
>
I'm glad you asked. really!
Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
Windows
Dennis Lee Bieber wrote:
> On Tue, 28 Mar 2006 18:02:46 GMT, "I. Myself" <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>
>> The compile C program, commer.exe, writes a line of text to its stdout.
>> The python program does not
Bror Johansson wrote:
> Is there a good and general way to test an instance-object obj for having a
> class belonging to a certain "sub-tree" of the hierarchy with a common
> parent class C?
If I understand you correctly, isinstance ought to do the job:
class A(object):
Sullivan WxPyQtKinter wrote:
> As you said, There is no solution? I mean, tracing a real session
> without using tricks like hidden field and cookies in CGI script?
As people have said, this isn't a limitation of python, it's a feature
of HTTP. You might want to consider whet
[EMAIL PROTECTED] wrote:
> Hi,
>
> I am a python newbie and have used it for about a month. I want to make
> a simple GUI app in Python ( I take input form user and do processing
> and show results).
>
> Which gui package is good for me. I need to do it quick and I would not
&
John Salerno wrote:
> The printable value of node1 is 1, node2 is 2 and node 3 is 3.
>
> node1.next is node2, node2.next is node3 and node3.next is None.
>
> This might be painfully obvious, but I don't understand when the print
> statement is getting called. If you call p
SailChallenge was originally a program in C. It simulates a sailboat
being navigated by an ANN (Artificial Neural Network). Now a Python
"front end" has been created which invokes the compiled C program, and
then captures the real time text output, converting it into an
animation. A screen s
Kun wrote:
> This works fine but instead of typing in a 'body', i would like the
> initial python program to just send a string as the body of the email.
> now normally i'd just set the msg in the mail.py file equal to the
> string, however, i do not know how to link a
Kun wrote:
> mail currently gets the body from an input box.
>
> this is where mail.py gets invoked:
OK, I'm a bit confused. Where is the "initial python program" in all
this? You seem to have an one python program (mail.py) and an HTML
form. As it stands, I don't see
On Sat, 17 Oct 2009 18:54:10 +0200, Diez B. Roggisch wrote:
> This is wierd. I looked at the site in FireFox - and it was displayed
> correctly, including umlauts. Bringing up the info-dialog claims the
> page is UTF-8, the XML itself says so as well (implicit, through the
> missing
On Sat, 17 Oct 2009 21:24:59 +0330, Arian Kuschki wrote:
> I just checked and I see the following in the headers: Content-Type
> text/xml; charset=UTF-8
>
> Where does it say ISO-8859-1?
In the headers returned via urllib (and via wget). But checking in
Firefox, it does indeed spec
at all in the computer's memory?
>
> If it doesn't, then it has no effect whatsoever.
>
> But since it does have an effect, a memory change has been effected.
I don't think your disagreeing with Steven here - by talking about "the
computers memory," it's clea
On Sat, 20 Feb 2010 08:12:01 -0800, lallous wrote:
> How can I do something similar to pure virtual functions in C++ ?
>From what you want, it seems like you want cb() to not be called if it
isn't implemented in the derived class; this isn't really what pure
virtual functions
On Thu, 25 Mar 2010 15:00:35 -0700, Michel wrote:
> I'm trying to dynamically create a class. What I need is to define a
> class, add methods to it and later instantiate this class. Methods need
> to be bound to the instance though, and that's my problem. Here is what
> I
On Fri, 26 Mar 2010 08:54:11 -0700, Michel wrote:
> I want to add a method to a class such that it can be invoked on
> specifics instances.
> You solution works (as well as Patrick's one), thanks ! I still have a
> question though. If I print the type of the self object I get wh
>
>> Should isinstance(Float('1.1'), float) and isinstance(Float('1.1'),
>> Decimal) also both be true, or would only one of those be true? (And
>> by the way, what value would Float('1.1') have? float('1.1') and
>> Decimal('
On Fri, 12 Jun 2009 22:02:53 -0700, Andrew Savige wrote:
> Notice that this code uses Perl's lexical scope to hide the
> %private_hash variable, but not the public_fn() function.
You might try:
def public_fn(param):
private_hash = publicfn.private_hash
return private_hash[param]
On Mon, 15 Jun 2009 15:29:34 +0200, Tobias Weber wrote:
> Despite the confusion all those are useable, but I ran into the problem
> that I can't register a @classmethod because weakref doesn't like them.
What do you mean by weakref not liking class methods? This seems to work
On Fri, 10 Jul 2009 16:27:12 -0400, Terry Reedy wrote:
> a bug, bug a limitation due to using limited-range numbers. If one uses
> residue classes instead of integers, and makes no adjustment, I consider
> it wrong to blame Bentley.
But it was Bentley himself who used the C int type, so
On Mon, 20 Jul 2009 21:53:59 -0400, Esmail wrote:
> In general I would agree with you, but in my specific case I want so
> store some additional meta-data with each function, such as the valid
> range for input values, where the max or minimum are located, the
> name/source for the fun
On Thu, 30 Jul 2009 17:57:48 -0400, Luis Zarrabeitia wrote:
> As I understood the question, it was "was wrong in 'for var in
> container' in comparison with ruby's container.each?"
>
> What's the (semantic) difference between
>
>
/p/feedparser/issues/list
But if the project _is_ dead, one would be unlikely to get a response on
the bug tracker; as seems, in fact, to have happened already:
http://code.google.com/p/feedparser/issues/detail?id=160&start=100
I take it that the lack of response to this issue means the ans
On Mon, 07 Sep 2009 19:22:17 -0700, ganesh wrote:
> My application is a TCP server having multiple client connectons. C++
> PTHREADS are for each connected socket and the message received on the
> socket is evaluated by python functions. If I use only one process level
Do you have to us
vegetax wrote :
I was a java developer one year ago ,before i moved to python i realy liked
it at the beggining, but i got very disapointed lately since my
previus two python proyects where relatively big,and python didnt feel
well suited for the task.
The reasons are mainly due to the
Tim Churches a écrit :
Provided other countries don't recognise software and business method
patents, the litigation will be confined within US borders, where
resources can be productivelt spent making television dramas about
attractive young patent attorneys and plodding, tram-riding patent
cl
Any idea which of the following is faster?
'a/b/c/'[:-1]
or
'a/b/c/'.rstrip('/')
Thanks in advance.
P.S. I could time it but I thought of trying my luck here first, in
case someone knows already, and of course the reason.
--
http://mail.python.org/mailman/listinfo/python-list
Yes, I could do the timing myself. Sorry if this was impolite -- it was
not in my intentions. The main reason I asked was about the reason.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Hello.
Under Gentoo Linux, I issue:
$ python timeit.py
python: can't open file 'timeit.py'
$ ls -al /usr/lib/python2.3/timeit.py
-rw-r--r-- 1 root root 9833 Oct 19 02:17 /usr/lib/python2.3/timeit.py
But if I specify the full path, it works:
$ python /usr/lib/python2.3/timeit.p
OK, the symbolic link solved the "problem". I thought that there was
something wrong with my Python configuration; that's why I asked in the
first place.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
Hello.
In a program, I want to ensure that a socket closes (so I use try ...
finally), but I also want to catch/handle a socket exception. This is
what I have done:
try:
try:
s = ... # socket opens
# various code ...
except socket.error, x:
# exception handling
finally:
s.close() # socket
(I don't know why, but indentation was not preserved once I posted.)
--
http://mail.python.org/mailman/listinfo/python-list
Thanks. This should now be OK:
#try:
#try:
#s = ... # socket opens
#
## various code ...
#except socket.error, x:
## exception handling
#finally:
#s.close() # socket closes
--
http://mail.python.org/mailman/listinfo/python-list
I need it because the "various code" may raise other exceptions (not
related to sockets). In such case, the "except socket.error, x:" won't
catch it, but thanks to the "finally:", it is sure that the socket will
close.
--
http://mail.python.org/mailman/listinfo/python-list
Good point, but with your way, if "s = ... # socket opens" fails, then
nothing will catch it. What I usually do is what I wrote above (place
it below the 2nd try), and when attempting to close it, first use an if
like: "if locals().has_key('s'):".
--
http://ma
Coming from C, I think that it's generally a good programming practice
to make sure everything you create, closes; whether it's about a socket
or a file. This may not be the case with Python though. To be honest,
leaving this task to the garbage collector doesn't sound like a
A mi si me ha dado problemas. No tengo forma de decirle que se ejecute como
usuario www-data y cuando lo intento deja de funcionar abruptamente. Saludos.
--
https://mail.python.org/mailman/listinfo/python-list
You can go to Options menu, then klik Mail menu. Under Management tab, klik Mail Adresses Then edit your account there.. regards, faino --- >> hey...
d to subscribe to the RSS feed (my reader doesn't support Atom)
but although I'm following the link labeled as RSS, I'm still getting an
Atom feed via FeedBurner. May this be a problem with FeedBurner
configuration, or I'd better use another subscription mechanism?
Thank
En/na Enigma Curry ha escrit::
> I need to store a large number of files in an archive. From Python, I
> need to be able to create an archive, put files into it, modify files
> that are already in it, and delete files already in it.
>[...]
> Is there any archive format that can
Hello,
I need to implement timeout for execute method in Mysql queries. I am using
MySQLdb.
I have tried it:
signal.signal(signal.SIGALRM,handler)
signal.alarm(1)
cursor.execute(sql)
signal.alarm(0)
But handler is never executed. In other example (changing cursor.execute by
Hi,
On Apr/20/2007, Gabriel Genellina wrote:
> En Fri, 20 Apr 2007 17:06:51 -0300, rohit <[EMAIL PROTECTED]>
> escribió:
>
> > i am designing a desktop search engine using python.
> > i am having a query , is there a package available that contains
> > functio
> I am surprised at the number of un-informed, ill-informed sheeple on
> earth as well as politically correct hypocrites.
>
> Several polls have consistently shown that about 84% of the American
> people believe that 911 was an inside job.
I dont know where you got that statistic
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> See the video with your own EYEBALLS, that is if you have some courage
> and shame left:
>
> http://video.google.com/videoplay?docid=1822764959599063248
OK - I watched the video and I think it is a ridiculous po
Henri Sivonen a écrit :
I am trying to set up the Red Robin Jython Development Tools for
Eclipse. It finds the Python libraries of Jython and my own jars. It
does not find the JDK classes. If I try to add classes.jar from the JDK
to the "Jython Class Path" of the project, the plug-in
Simon John a écrit :
jython just had a new
and (thus) secret afaik
release
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
To be, this 'patent' is so absurd that I initially had difficulty believing
to to be real and not a joke.
So did I - a trojan horse like Sokal's in 1996, but substituting
Social Texts --> Patent Office
Social Scientists --> Patent Lawyers
Physicists -
Esmail Bonakdarian wrote:
do you (or anyone else) have a recommendation for 2D type
graphics?
A possible approach is jython that gives you access to Java2D. Makes it easy
to deploy your animated or interactive graphics as a java-compatible applet.
--
http://mail.python.org/mailman/listinfo/python
Adam DePrince wrote:
Given the hardware constraints of the early 1980s, which
language do you think should have been used instead of BASIC?
Lisp
Forth
Exactly my pick
--
http://mail.python.org/mailman/listinfo/python-list
Mike Meyer wrote:
"not [quite] more i squared" <[EMAIL PROTECTED]> writes:
Adam DePrince wrote:
Given the hardware constraints of the early 1980s, which
language do you think should have been used instead of BASIC?
Lisp
Forth
Exactly my pick
Logo (my pick) has been called &
Martijn Faassen wrote:
Imagine, for instance, what if he wants to egosurf, google for his own
name and finds nothing because everybody was saying Djikstra all the
time? That'd be terrible!
Fortunately, not in our time stream :
Dijkstra - 892 000 hits
Djikstra - 5 500 hits
"Edsger Dijkstra" - 25
Hello
Can somebody tell me how I can test BockHosts? I want to see if an IP address
gets blocked or not, as I have to provide evidence of testing for a
presentation.
Any help will be greatly appreciated, thank you
--
https://mail.python.org/mailman/listinfo/python-list
ed PNG files are not supported in the PIL
documentation. I'm using PIL 1.1.6-2 on Arch Linux..
I can check all images with:
from PIL import Image
im = Image.open('image.png')
im.info
which returns a dictionary about the image. If the dict has
'interlace' key with the value
Hey There,
I'm a django developer and working on a project right now.. Last week
I just discovered a new problem in Python.. Here's what I do..
[01:00] ([EMAIL PROTECTED] ~)$ date
Sal May 20 01:00:10 EEST 2008
[01:00] ([EMAIL PROTECTED] ~)$ python
Python 2.5.2 (r252:60911, Feb 23 2008
Sent from [1]Mail for Windows
References
Visible links
1. https://go.microsoft.com/fwlink/?LinkId=550986
--
https://mail.python.org/mailman/listinfo/python-list
Sharon Stone - Anna Kournikova Lindsay lohan
search engines +
cams
www.alphasearch.gr
www.alphasearch.ru--
http://mail.python.org/mailman/listinfo/python-list
Sent from Mail for Windows 10
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, 07 Jan 2010 01:37:05 +0100, Zabin wrote:
Hey!
I am new PyQT programmer. I am trying to create a table in which cells
only take in numeric data. I am unable to use setValidator on table
cells. Looking around i found some material on the editor attribute
but I dont know how to apply
keys now do not work.
eg pressing left-arrow yields ^[[D
right-arrow ^[[C
Home ^[OH
Del ^[[3~
up-arrow^[[A
Frustrating as I use all these
101 - 195 of 195 matches
Mail list logo