On 2015-07-08, zljubi...@gmail.com wrote:
> Why I can't get the size of this particular file?
> On other servers, the same procedure would return file size in
> bytes, but not for this file?
>
> Does it depend on server itself, or there is a way to get remote
> file size before downloading?
Yes,
On 2015-07-10, beliav...@aol.com wrote:
> On Friday, July 10, 2015 at 2:58:18 PM UTC-4, Chris Angelico wrote:
>> On Fri, Jul 10, 2015 at 10:01 PM, beliavsky--- via Python-list
>> wrote:
>> > On Friday, July 10, 2015 at 7:21:14 AM UTC-4, M.-A. Lemburg wrote:
>> >> With Mandy Waite we have announce
On 2015-07-20, Jason H wrote:
> I have a server process that looks (watches via inotify) for files
> to be moved (renamed) into a particular directory from elsewhere on
> the same filesystem. We do this because it is an atomic operation,
> and our server process can see the modify events of the f
On 2015-07-25, Jussi Piitulainen wrote:
> Just in case anyone cares, Gnus shows me those indentations as octal
> codes, \302\240\302\240 (followed by one ASCII space). I guess a
> \302\240 is a NO-BREAK SPACE in UTF-8, and I guess Gnus does not know
> this because there is no charset specification
On 2015-09-17, Joseph L. Casale wrote:
> I need to write a module to abstract the RabbitMQ HTTP REST api.
> Before I do this, I would like to see how other projects have done
> similar in the hopes I make something consistent and generic etc.
>
> Does anyone regularly work with a library that abst
On 2015-09-17, Joseph L. Casale wrote:
>> There is https://pypi.python.org/pypi/librabbitmq ?
>
> Hi Jon,
> That is the AMQP client that utilizes the c extensions, I am writing a
> module to interact with a plugin that exposes a REST API.
>
> So I am not really after anyt
On 2015-09-19, Mark Lawrence wrote:
> On 19/09/2015 07:13, shiva upreti wrote:
>> try:
>> r=requests.post(url, data=query_args)
>> except:
>> print "Connection error"
>
> Never use a bare except in Python, always handle the bare m
On 2015-09-20, Mark Lawrence wrote:
> On 20/09/2015 13:45, Jon Ribbens wrote:
>> On 2015-09-19, Mark Lawrence wrote:
>>> On 19/09/2015 07:13, shiva upreti wrote:
>>>>try:
>>>>r=requests.post(ur
On 2015-09-20, Chris Angelico wrote:
> On Sun, Sep 20, 2015 at 10:45 PM, Jon Ribbens
> wrote:
>> On 2015-09-19, Mark Lawrence wrote:
>>> On 19/09/2015 07:13, shiva upreti wrote:
>>>> try:
>>>> r=requests.post(u
On 2015-10-16, Steven D'Aprano wrote:
> If you have written crypto code that needs random numbers as described
> below, I am looking for your feedback.
>
> Python-Dev is arguing about which of the following three functions should be
> included:
>
> randbelow(end):
> return a random integer in
On 2015-11-18, Steven D'Aprano wrote:
> On Wed, 18 Nov 2015 11:40 pm, Chris Angelico wrote:
>> so I would say the choices are: Set
>> literal if available, else tuple. Forget the performance.
>
> It seems rather strange to argue that we should ignore performance when the
> whole reason for using
On 2015-11-21, Cai Gengyang wrote:
> Comparators, interesting ...
>
booltwo = (10 + 18) == 3**17
booltwo
> False
What's interesting about that?
--
https://mail.python.org/mailman/listinfo/python-list
Flask suggests the following file layout:
runflaskapp.py
flaskapp/
__init__.py
runflaskapp.py contains:
from flaskapp import app
app.run(debug=True)
flaskapp/__init__.py contains:
from flask import Flask
app = Flask(__name__)
Running this with 'python3 runflask
On 2014-08-26, Terry Reedy wrote:
> On 8/26/2014 12:03 PM, Jon Ribbens wrote:
>> Flask suggests the following file layout:
>>
>> runflaskapp.py
>> flaskapp/
>> __init__.py
>>
>> runflaskapp.py contains:
>>
>>
On 2014-09-23, Juan Christian wrote:
> if __name__ == '__main__':
> app.run(port = 8000)
app.run(port=8000, debug=True) might've made the problem easier to find.
--
https://mail.python.org/mailman/listinfo/python-list
make 2012 another successful event.
Jon Jagger
Conference Chair
--
http://mail.python.org/mailman/listinfo/python-list
but have a look! (I'd be willing to invest sometime with
you, if you agree that's where something like this should be going...)
Cheers,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
Anyway, Robert Kern correctly interpreted me. I was not suggesting to
the OP that he move to SAS (heaven forbid), I was indeed suggesting
that he look into what similar systems have (that I have experience
with and appreciate), and he acknowledges that is not present in
Python, and ummm, take
On Sep 30, 5:40 pm, John Ladasky wrote:
> Hi folks,
>
> I have 500 x 500 arrays of floats, representing 2D "grayscale" images,
> that I need to resample at a lower spatial resolution, say, 120 x 120
> (details to follow, if you feel they are relevant).
>
> I've got the numpy, and scipy, and matplo
is the usefulness of the "not in" operator ? Recall what Zen of
> Python tells
>
> There should be one-- and preferably only one --obvious way to do it.
You would seriously prefer the later?
Guess I'll have to start writing stuff like:
10 - 5 as 10 + -5 (as obviously the - is redundant as an operation),
and 10 / 2 as int(10 * .5) or something, who needs a divide!?
Jokely yours,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
f l in self.curframe.f_locals:
return '!'+l
if l.startswith('@'): return l[1:]
return l
import pdb
pdb.Pdb.precmd = precmd
What this does is
q ->variable q if it exists else quit command
@q ->always quit
!q ->always variable
HTH
Jon
--
http://mail.python.org/mailman/listinfo/python-list
'
> drawing[1][1] = '1'
> drawing[1][2] = '45'
> drawing[1][3] = '23'
> drawing[1][4] = '27'
> drawing[2] = '27'
>
> Sort drawing[1] from low to high
> drawing[1][0] = '1'
> drawing[1][1] = '5'
On Oct 14, 3:19 am, Roy Smith wrote:
> I've got to write some tests in python which simulate getting a page of
> HTML from an http server, finding a link, clicking on it, and then
> examining the HTML on the next page to make sure it has certain features.
>
> I can use urllib to do the basic fetch
On Oct 14, 3:19 am, Roy Smith wrote:
> I've got to write some tests in python which simulate getting a page of
> HTML from an http server, finding a link, clicking on it, and then
> examining the HTML on the next page to make sure it has certain features.
>
> I can use urllib to do the basic fetch
On Oct 16, 12:53 am, PoD wrote:
> On Sat, 15 Oct 2011 11:00:17 -0700, Gnarlodious wrote:
> > What is the best way (Python 3) to loop through dict keys, examine the
> > string, change them if needed, and save the changes to the same dict?
>
> > So for input like this:
> > {'Mobile': 'string', 'cont
the same as DaveA's.
This gives you the format it was *written* in.
(Saved a blank OO document as 95/97/XP Word DOC under Linux)
jon@forseti:~/filetest$ file *
saved-by-OO.doc: CDF V2 Document, Little Endian, Os: Windows, Version
1.0, Code page: -535, Author: jon , Revision Number: 0, Create
h a column for filename)...
it will either work or fail, then if it succeeds, start overwriting
the originals - just a "select * from some_table" will do, using
itertools.groupby on the filename column, changing the open() request
etc...
just my 2p mind you,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 11, 1:31 pm, macm wrote:
> Hi Folks
>
> I pass a nested dictionary to a function.
>
> def Dicty( dict[k1][k2] ):
> print k1
> print k2
>
> There is a fast way (trick) to get k1 and k2 as string.
>
> Whithout loop all dict. Just it!
>
> Regards
>
> macm
I've tried to underst
these programs to give you the SQL that constructs tables, or makes
queries etc...
That'd be enough to keep you going for a couple of weeks I guess.
Also, some things make more sense in a NoSQL database, so have a look
at something like MongoDB or CouchDB and how their design works
: is it possible to compile Python for not using libc fopen(),
> but the Posix open()?
>
> Thanks anyway for this hint!
Have you tried/or is it possible to get your 100 or whatever files
first, before your sockets?
hth
Jon
--
http://mail.python.org/mailman/listinfo/python-list
yield total/count' and removing the initialization and return of num.
>
> --
> Terry Jan Reedy
Not directing this at you Terry, and you and Tim have made fine points
-- this just appears to me to be the best point at which to respond to
a thread.
To the OP - you have great answers, and, please note this just happens
to be the way I would do this.
I would separate the parsing of the data, and the calculation code
out. I've whipped this up rather quickly, so it might have a few flaws
but...
from itertools import groupby
def partition(iterable, sep=lambda L: L == 'end', factory=float):
for key, vals in groupby(iterable, sep):
if not key: yield map(factory, vals)
# And a pure cheat, but useful if more complex calculations are
required etc... (Plus covers NaN)
import numpy as np
print map(np.mean, partition(bin))
What you've got will work though, so wouldn't worry too much and this
is just my 2p,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
Hey there, so I'm trying to create automated regression for PDFs that will use
Selenium RC for the generation and Python for the comparison of PDFs. I will be
using pyPdf to rename the files according to their content, ImageMagick to
convert the PDFs to images and PIL to actually compare the PDF
Update: Found out with the Picture Manager by Windows I could view an image
100%, use a tool that measures the windows and get a probably not accurate but
still serviceable coordinate to use. I compared with the coordinates I
currently have and tried to get it by the above method and the coordin
So I have a dictionary and the key is a number. The values are either a single
tuple or a tuple of tuples. Is there a better way to go about accessing the
values of the dictionary? All the tuples contain four elements.
So say:
col = {"1": (0,1,2,3): "2": ((0,1,2,3),(2,3,4,5))}
Then to access th
Wow, why didn't I think of that. Thanks! I'll try it now. By the way I think I
don't need to wrap the single tuples in runtime because I'm declaring that
dictionary anyway beforehand and I could just do it right there. I won't be
adding elements to the tuple.
--
http://mail.python.org/mailman/l
Sorry if I didn't check the code before I posted it, I just mocked it up in
Google's editor. That's what Mitya suggested too, yep, I guess I just need to
make it uniform to get rid of the extra checking. Thanks man!
--
http://mail.python.org/mailman/listinfo/python-list
Hi Mark. Well, doesn't iteritems() work the same? or am I missing something? By
the way I'm sure I read the dictionaries part of Python but I'm unsure if it
would take int's as a key for dictionaries. I've been weaned on Java where the
keys of hashmaps are always Strings.
PS: Just checked, wow
Thanks Dave and Mitya for enlightening me about dictionaries. I'm still
confused about this though:
" so that if two
key objects are equal, they stay equal, and if they differ, they stay
different. "
What does this mean? I won't be comparing key objects with one another. Also,
when I had two
Oh, I see, thanks! I was thinking I'll study 2.7 and once I'm comfortable with
Python as a language I'll move to 3. Heck, I don't even know how to create a
simple main method.
--
http://mail.python.org/mailman/listinfo/python-list
I have two images generated from ImageMagick that I need to compare through PIL
but when I compare them it says that the two images aren't identical. I tried
viewing the supposed "difference" but all I see is a black image which means
the two image are identical. ImageChops even returns the regi
Wow, what the heck, I just learned that using beyond compare if I compare the
two images then I'll see a different section under tolerance mode. Anyone an
expert on images? The two images have whites on that same image but they're
different according to BeyondCompare. What's more, if I do a bina
>>> This is a fake line to confuse the stupid top-posting filter at gmane
We have a rather complicated class that, under certain circumstances, knows
that it cannot perform various arithmetic operations, and so returns
NotImplemented. As a trivial example:
>>> class my:
... def __mul
Steven D'Aprano REMOVETHIScyber.com.au> writes:
>
> On Fri, 30 Dec 2005 03:47:30 +, Jon Guyer wrote:
>
> > We have a rather complicated class that, under certain circumstances, knows
> > that it cannot perform various arithmetic operations, and so returns
>
Joe wrote:
> Is Python going to support s syntax the does not use it's infamous
> whitespace rules? I recall reading that Python might include such a
> feature. Or, maybe just a brace-to-indentation preprocessor would be
> sufficient.
Nope never.
Because that would destroy one of the most importa
Ilias Lazaridis wrote:
>>>Is Python going to support s syntax the does not use it's infamous
>>>whitespace rules?
>
>
> Of course.
>
> I estimate it will take around 1 to 2 years from now, until this
> whitespace-concept will become optionally.
>
> Backwards-compatibility will be kept, thus
thakadu wrote:
> While I have no doubt that there are lousy browsers out there, the
> problem is not only with browsers, but also I agree with you its not
> Python's fault. The issue is that the code I am pasting may have used a
> DIFFERENT indentation scheme, so lets say I used four spaces and th
Joe wrote:
> As for me, I'm not suggesting that braces are better than indentation.
> In fact, requiring indentation is a good idea, and I agree that braces
> can be quite ugly. It is the lack of visible block closing when there's
> more than one level that I dislike.
> ... I'm talking about doub
Hi everyone,
Is there a doc comparing different json implementation (example:
python-json, simplejson)? Does anyone have a strong recommendation
to make? Any problem/issue for a particular implementation?
Thanks.
- jon
_
Is your
class S:
def __init__(self, **k): self.data = k
class E(S):
def __init__(self, **k):
S.__init__(self, **k)
x = E(a=1)
print x.data
{'a': 1}
From: [EMAIL PROTECTED]
To: python-list@python.org
Subject: extender method
Date: 26 Jul 2006 09:21:10 -070
Hi listers,
I wrote this script in Zope some time ago and it worked for a while, but now
I'm getting the following error:
TypeError: coercing to Unicode: need string or buffer, NoneType found
Here's my script:
results = context.module_retriever().tuples() # call to ZSQLMethod
converted = []
for
keep polling it every
'n' whatever for new messages, or should I be looking to the smtpd
module and get mail via that? (or any other way?)
I think I'm basically after the best way to implement:
Email in --> Python process --> Email out
Cheers,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
Ahh, that did it, thanks very much.
Jon
- Original Message -
From: <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Thursday, July 27, 2006 11:19 AM
Subject: Re: coercing to Unicode: need string or buffer, NoneType found
>
> Jon Bowlas wrote:
>
>
Ahh yes there are a couple of dodgy records that seem to have been added.
many thanks.
Jon
- Original Message -
From: "Peter Otten" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Thursday, July 27, 2006 11:22 AM
Subject: Re: coercing to Unicode: need
It says line 8 in the traceback so I guess its
result[i] = unicode(result[i], 'latin-1')
Jon
- Original Message -
From: "Sybren Stuvel" <[EMAIL PROTECTED]>
Newsgroups: comp.lang.python
To:
Sent: Thursday, July 27, 2006 11:06 AM
Subject: Re: coercing to Unic
> not of the derived class.
> class CountedClass3 : public CountedClass {};
>
Hint: where's the template parameter gone as per the previous two
statements...
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
I was simply pointing out that your statement declaring that it didn't
work, wasn't accurate, because the code you'd used was incorrect.
Jon
--
http://mail.python.org/mailman/listinfo/python-list
ss it with zlib and
finally write it to disk.
The 10GB of data is Mozilla CVS when fully expanded.
Thanks for any tips on how to do this.
Jon Smirl
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
arrays instead of lists.
I'll code this up and give it try. Hopefully it can run though the 10GB of
data in a few hours and not take days.
Jon Smirl
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Is there some way to tell a dictionary object that I am going to load 1M
objects into it and have it pre-allocate enought slots to hold all of the
entries? Thus avoiding many thousand memory allocations.
Jon Smirl
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 06 Aug 2006 15:33:30 -0700, John Machin wrote:
> Jon Smirl wrote:
>> Is there some way to tell a dictionary object that I am going to load 1M
>> objects into it and have it pre-allocate enought slots to hold all of
>> the entries?
>
> Not according to the ma
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
> import heading1
> import heading2
> While True:
> heading = get_next_heading(file_ptr) # This func will return
> "heading1", then "heading2"(on next call)
> if heading = "":
> break
> getattr(heading, "process")(file_ptr
On Mon, 07 Aug 2006 00:33:33 -0400, Tim Peters wrote:
> ...
>
> [Jon Smirl]
>> I know in advance how many items will be added to the dictionary. Most
>> dictionary implementations I have previously worked with are more
>> efficient if they know ahead of time h
sorry ... i replied to sender instead of all ... so here we go again ...
>>>t = [('a', 1.0), ('b',2.0),('c',3.0)]
>>>t = [s[::-1] for s in t]
>>>print t
[(1.0, 'a'), (2.0, 'b'), (3.0, 'c')]
>>>
>From: "Paul McGuire" <[EMAIL PROTECTED]>
>To: python-list@python.org
>Subject: Re: How to reverse t
In article <[EMAIL PROTECTED]>, Lad wrote:
> I have a website written in Python and I would like to login every
> visitor's IP address.
> In other words, if a visitor come to my Python application, this
> application will record his IP.
Depending on what CGI framework you're using, something like:
you change the above to:
class subproject:
def __init__(self):
configuration = { }
build_steps = [ ]
That'll probably be what you expect...
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
Jon Clements wrote:
> if you change the above to:
>
> class subproject:
> def __init__(self):
> configuration = { }
> build_steps = [ ]
Of course, I actually meant to write self.configuration and
self.build_steps; d0h!
--
http://mail.python.org/mailman/listinfo/python-list
r s2 in some_array:
if s1 == s2: break
Same thing, but nicer.
for si in range(100 + 1):
if si in some_array:
# Do something here.
Cheers,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
method you end up calling is the
toString for that temporary (not your static one). This would
especially make sense if there's a version of toString which takes an
object, and returns its toString result...
I'm basing this purely on the fact PrintHello.toMyString() works... so
take with a pinch of salt.
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
;
>>> stripped = ''.join(c for c in filename if c in valid)
>>> stripped
'lasfjalsfjdlasfjasfdsomethingelse.dat'
If you want to replace them with something, be careful of the regex
string being built (ie a space character).
import re
>>> re.sub(r'[^%s]' % valid,' ',filename)
' lasfjalsfjdlasfjasfd somethingelse.dat'
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
m looking for.
If you import itertools and have your DB query return in order of
service_id (or sort the list after retrieving result), then...
[ [dict(service_id=key),[dict(value=n['value']) for n in value]] for
key,value in itertools.groupby(result,lambda x: x['service_id']) ]
... is more or less what you want.
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
cting like:
>
> for x in t:
> for y,z in x:
> #then it does it correctly
>
> But if so, why is this? It doesn't seem like very intuitive behavior.
It makes perfect sense: in fact, you have kind of explained it
yourself!
Think of the for statement as returning the next element of some
sequence; in this case it's a tuple. Then on the left side, the
unpacking occurs. Using "for x in t", means that effectively no
unpackig occurs, so you get the tuple. However, since the in is
returning a tuple, using "for x,y in t", the tuple returned gets
unpacked.
Hope that helps.
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
(the one after the
WHERE) as a string literal: so your query string is effectively "select
from where 'somestring' like '%%'".
I would try re-writing it like:
c.execute("select from where %s like ?" % aColumn,
"%" + sys.argv[1] + "%")
I don't use mx.ODBC, and definately don't use Access (gagging sounds...
but if you're stuck with it, so be it)...
hth,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
BartlebyScrivener wrote:
> Thanks, Jon.
>
> I'm moving from Access to MySQL. I can query all I want using Python,
> but so far haven't found a nifty set of forms (ala Access) for easying
> entering of data into MySQL. My Python is still amateur level and I'm
&
BartlebyScrivener wrote:
> Jon Clements wrote:
>
> > if your load on the data-entry/browsing side isn't too heavy, you can
> > use the 'development server' instead of installing a full-blown server
> > such as Apache (I'm not sure if IIS is supported)
7;ve noted, this is binary data so
you can't assume anything about it. Doing it this way is a Bad Idea
(tm).
If you want to do something like this, why not use templated HTML, or
possibly templated PDFs? Or heaven forbid, Word's mail-merge facility?
(I think MS Office documents are effectively self-contained file
systems, so there is probably some module out there which can
read/write them).
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
them. I'm guessing it's worked before because you've
been lucky.
Works fine!:
>>> 'C:\winnt\system32\smtpctrs.dll'
'C:\\winnt\\system32\\smtpctrs.dll'
Uh oh, escaped:
>>> 'C:\winnt\system32\arapi51.dll'
'C:\\winnt\\system32\x07rapi51.dll'
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
roperly.
For instance, it looks like FCas exists somewhere as it's barfing on
trying to find C. Where is XDS defined etc...?
I can't see updateDS1v() ever completing: any Fxas passed in not equal
to 0 will repeat indefinately.
I'm guessing unless C is meant to be a variable, you me
Alistair King wrote:
> Jon Clements wrote:
>
> > > Alistair King wrote:
> > >
> > >
> >
> >> >> Hi,
> >> >>
> >> >> ive been trying to update a dictionary containing a molecular formula,
> >> &
the code and tried googling this error message but am
> having difficulty finding the source of the problem.
>
> Many thanks
>
> Jon
>
> class myList:
> def __init__ (self,value=[]):
> self.wrapped=[]
> for x in value :
> sel
her):
return self.wrapped, other
#
def __add__(self,other):
return self + other
hth
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
est the best method would be string_name[1:-1] and that you don't
need a regex.
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
eld then
row[3] = password
out_csv.writerow(row)
All the best,
Jon.
k.i.n.g. wrote:
> Hi ALL,
>
> I am sorry for not mentioning that I am new to python and scripting.
> How can I add the above script to handle csv file. I want the script to
> generate passwords in the passwords
be corrected though); to stop the implicit newline use
something like
print 'testing',
>>> 'testing'
(but - with the leading comma, the newline is suppressed)
I personally find that print is convenient for sentences (or writing
'lines').
Thought it worth point
I meant 'trailing': not leading.
mea culpa.
Jon.
Jon Clements wrote:
> Didn't know of the >> syntax: lovely to know about it Bruno - thank
> you.
>
> To the OP - I find the print statement useful for something like:
> print 'this','is',
Are you asking the question, "Which pairs of strings have one character
different in each?", or "Which pairs of strings have a substring of
len(string) - 1 in common?".
Jon.
Girish Sahani wrote:
> I have a list of strings all of length k. For every pair of k length
&
In article <[EMAIL PROTECTED]>, Steve Holden wrote:
> Of course, if the client forces the TCP PSH flag true then the receiver
> is guaranteed to debuffer the stream up to that point - this is how FTP
> clients work, for example.
I don't think that's right. You are confusing the PSH flag (which i
In article <[EMAIL PROTECTED]>, Steve Holden wrote:
>> I don't think that's right. You are confusing the PSH flag (which is
>> basically unused in Unix networking I think) and the URG flag (which
>> is extremely rarely used, but is indeed used by FTP to get abort
>> requests to 'jump the queue' as
mportant
May not be applicable in your case, but has stung me a few times...
All the best,
Jon.
Frank Millman wrote:
> Paul McGuire wrote:
> > >
> > > reader = csv.reader(open('trans.csv', 'rb'))
> > > rows = []
> > > for row in reader:
>
doing what you're doing, but something about builtin types,
and there's a UserString module...
Hope that helps a bit anyway,
Jon.
JH wrote:
> Hi
>
> Can anyone explain to me why the following codes do not work? I want to
> try out using __cmp__ method to change the sorting
each function in term (which in most cases - I
would imagine fits on the stack), so although it's doing effectively
the same thing, it's doing so with less memory.
I probably haven't explained too well, and I may not even be right. So
take with a pinch of salt.
All the best,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
gt; Sudden Disruption
> --
> Sudden View...
> the radical option for editing text
> http://www.sudden.net/
> http://suddendisruption.blogspot.com
Just my little rant,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
/ASPN/Cookbook/Python/Recipe/496691
>
> Regards,
> Kay
Interesting.
Thanks Kay.
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>, Pekka Karjalainen wrote:
from sys import stdout
help (stdout.closed)
>
> If I do this, it gives me help on the bool object.
stdout.closed is a bool. What were you expecting it to show you?
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>, Hari Sekhon wrote:
> I want to wrap a whole script in try ... except. What is the best way of
> doing this?
You could do this maybe:
import sys
def excepthook(exc_type, exc_value, tb):
import modules_needed_to_notify_exception
...
sys.excepthook =
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
>> So basically, instead of typing in on the command line argument I want
>> to have it in a python program and let it do the action.
>
> Try exec() and execfile() from the standard library (IIRC)
Ths os.spawn...() functions are likely to b
ctly what you need when
writing a quick script for expert use.)
If the readline module was loaded, then input() will use it to provide
elaborate line editing and history features.
Consider using the raw_input() function for general input from users.
""""
So you want be using raw_input() for starters...
Cheers,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
tly called, or do I need to call str's __init__ in
mystr's (I seem to remember seeing some code which did this, as well as
calling super()).
Any critiscm is appreciated.
Many thanks,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
nction, so you dont need one. If you have multiple
> inheritance, however, you must include an __init__ which calls the
> __init__ on every parent, otherwise only the first parent's gets
> called.
Thanks for your post: it's most appreciated.
Cheers,
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
the physical representation and not the
external appearance, how would I do this? Or, would self, always return
internal representation, (if so, how would I get external appearance?).
Or I could be talking complete _beep_ - in which case I apologise.
Jon.
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>, Rony Steelandt wrote:
> Yes, this is on windows using winzip
> It says the zip file is not a valid zipfile
Works fine for me on Windows. Try deleting the file you downloaded,
clearing your browser cache, and trying again.
On the other hand, when you run it it immed
401 - 500 of 1223 matches
Mail list logo