> This isn't exactly how things work. The server *sends* you bytes. It can
> send you a lot at once. To some extent you can control how much it sends
> before it waits for you to catch up, but you don't have anywhere near
> byte-level control (you might have something like 32kb or 64kb level
> c
Hi,
I am trying to convert Matlab script to python script using OMPC.(
http://ompc.juricap.com/ )
My matlab code is (.m file)
Npts=100;
R=0.5;
X=[0:1/Npts:1]';
Y=[0:0.01:1]';
for i=1:Npts+1
if(X(i) <= .5)
Ytop(i)=1.0;
Ybot(i)=0.0;
else
On Tue, 17 Mar 2009 02:41:23 -, MRAB
wrote:
Rhodri James wrote:
On Tue, 17 Mar 2009 01:47:32 -, MRAB
wrote:
I'm not against putting a comma in the format to indicate that grouping
should be used just as a dot indicates that a decimal point should be
used. The locale would say wh
thomas.han...@gmail.com wrote:
...
So any ideas on how to get a function called on an object just after
__init__ is done executing?
--
http://mail.python.org/mailman/listinfo/python-list
Yes, you *can* use metaclasses - you need to override the type.__call__ method,
which is what normally ca
On Mon, 16 Mar 2009 20:11:18 -0700, thomas.han...@gmail.com wrote:
> Hi all,
>
> We've been breaking our heads over a good way of accomplishing an
> "on_load" event in our multitouch GUI frameowork PyMT. We think we'd
> like to trigger an "on_load" event after a class is fully instantiated
...
>
class MyClass(object):
def __init__(self, really_init=True):
self.a = 3
self.b = 4
# other initialization
if really_init: on_load()
def on_load(self):
print 'hello!'
class B(MyClass):
def __init__(self):
super(B, self).__init__(False)
s
__del__
I use it to close a mysql connection
-Alex Goretoy
http://www.goretoy.com
E. B. White - "Be obscure clearly."
On Mon, Mar 16, 2009 at 10:11 PM, thomas.han...@gmail.com <
thomas.han...@gmail.com> wrote:
> Hi all,
>
> We've been breaking our heads over a good way of accomplishing an
> "
I though this was cool so I'd post about it, its one of the recipes
class peanutsdict(dict):
def __init__(self,default=None):
dict.__init__(self)
self.default = default
def __getitem__(self,key):
if key in self:
return dict.__getitem__(self,key)
On Mar 16, 9:59 pm, Chris Rebert wrote:
> On Mon, Mar 16, 2009 at 7:48 PM, Aaron Garrett
>
>
>
> wrote:
> > I have spent quite a bit of time trying to find the answer on this
> > group, but I've been unsuccessful. Here is what I'd like to be able to
> > do:
>
> > def A(**kwargs):
> > kwargs['e
Hi all,
We've been breaking our heads over a good way of accomplishing an
"on_load" event in our multitouch GUI frameowork PyMT. We think we'd
like to trigger an "on_load" event after a class is fully instantiated
(or just a function call for simplicity, so you dont need to worry
about our specif
I think you may need to do something like this in your code, this is what I
will be doing here shortly too
class peanutsdict(dict):
__slots__ = ['defaultZZz']
def __init__(self,default=None):
dict.__init(self)
self.default = default
def __getitem__(self,key):
i
On Mon, Mar 16, 2009 at 7:48 PM, Aaron Garrett
wrote:
> I have spent quite a bit of time trying to find the answer on this
> group, but I've been unsuccessful. Here is what I'd like to be able to
> do:
>
> def A(**kwargs):
> kwargs['eggs'] = 1
>
> def B(**kwargs):
> print(kwargs)
>
> def C(*
I have spent quite a bit of time trying to find the answer on this
group, but I've been unsuccessful. Here is what I'd like to be able to
do:
def A(**kwargs):
kwargs['eggs'] = 1
def B(**kwargs):
print(kwargs)
def C(**kwargs):
A(**kwargs)
B(**kwargs)
I'd like to be able to make a
"cgoldberg" wrote in message
news:6047c263-c6cb-4357-ad9b-96b61ec7e...@j8g2000yql.googlegroups.com...
Release 213 is out already:
Tim, Mark,
this is great news.. thanks for tracking 3.x so closely. I big
barrier for me to eventually adopt 3.x is the ability to use pywin32.
thanks!
-Corey
Rhodri James wrote:
On Tue, 17 Mar 2009 01:47:32 -, MRAB
wrote:
I'm not against putting a comma in the format to indicate that grouping
should be used just as a dot indicates that a decimal point should be
used. The locale would say what characters would be used for them.
I would prefer
Ian Mallett wrote:
Hi,
I'd like to make a program that automatically runs on startup (right
after login). How should I do that?
Put it in the folder:
C:\Documents and Settings\\Start Menu\Programs\Startup
The exact path depends on your login/username and I'm assuming that
Windows is insta
On Tue, 17 Mar 2009 01:47:32 -, MRAB
wrote:
I'm not against putting a comma in the format to indicate that grouping
should be used just as a dot indicates that a decimal point should be
used. The locale would say what characters would be used for them.
I would prefer the format to have a
Hi,
I'd like to make a program that automatically runs on startup (right after
login). How should I do that?
Thanks,
Ian
--
http://mail.python.org/mailman/listinfo/python-list
Rhodri James wrote:
On Mon, 16 Mar 2009 23:04:58 -, MRAB
wrote:
It should probably(?) be:
financial = Locale(group_sep=",", grouping=[3])
print("my number is {0:10n:fin}".format(1234567, fin=financial))
The format "10n" says whether to use separators or a decimal point; the
lo
On Mon, 16 Mar 2009 15:20:18 -0700, Falcolas wrote:
> FWIW, I've rarely seen a \r by itself, even in Windows (where it's
> usually \r\n). Unix generally just outputs the \n, so my guess is that
> some other process which created the output removed newline characters,
> but didn't account for the c
On Mon, 16 Mar 2009 23:04:58 -, MRAB
wrote:
It should probably(?) be:
financial = Locale(group_sep=",", grouping=[3])
print("my number is {0:10n:fin}".format(1234567, fin=financial))
The format "10n" says whether to use separators or a decimal point; the
locale "fin" says what
Hello, everyone.
python can be debugged with pdb, but if there anyway to get a quick
view of the python execution.
Just like sh -x of bash command.
I didn't find that there is an option of python that can do it.
besh wishes,
robert
--
http://mail.python.org/mailman/listinfo/python-list
bearophileh...@lycos.com wrote:
> JanC:
>> In most "modern" Pascal dialects the overflow checks can be (locally)
>> enabled or disabled with compiler directives in the source code,
>
> I think that was possible in somewhat older versions of Pascal-like
> languages too (like old Delphi versions, an
On Mar 16, 5:19 pm, Aaron Brady wrote:
> It's not one of the guarantees that Python
> makes. Operations aren't atomic by default, such as unless stated
> otherwise.
Well, in the documentation for RawArray:
"Note that setting and getting an element is potentially non-atomic –
use Array() instea
Hi JBW.
code.interact() does what I wanted. Great !!!
Thanks
N
JBW wrote:
On Mon, 16 Mar 2009 23:49:34 +0100, nntpman68 wrote:
I'd like, that a python script can be started by just calling it
(clicking on it),
but that the script can decide to enter interactive mode if certain
conditio
On Mar 16, 5:49 pm, nntpman68 wrote:
> Hi
>
> I know about two ways to enter python interactive mode
>
> 1.) just start python
>
> 2.) run python -i pythonscript.py
>
> What I am looking for is slightly different:
>
> I'd like, that a python script can be started by just calling it
> (clicking on
On Mon, 16 Mar 2009 09:31:59 -, Aaron Brady
wrote:
[snippety snip]
Otherwise, either /1, every instance has its own entries for class
functions, and subsequent changes to the class don't affect existing
instances, or /2, every method call is of the form x.__class__.foo
( ). They're both b
On Mon, 16 Mar 2009 23:49:34 +0100, nntpman68 wrote:
> I'd like, that a python script can be started by just calling it
> (clicking on it),
>
> but that the script can decide to enter interactive mode if certain
> conditions occur.
>
> Is this possible?
Don't know about the clicky-clicky part,
Rhodri James wrote:
On Mon, 16 Mar 2009 02:36:43 -, MRAB
wrote:
The field name can be an integer or an identifier, so the locale could
be too, provided that you know where to look it up!
financial = Locale(group_sep=",", grouping=[3])
print("my number is {0:10n:{fin}}".format(1
Hi
I know about two ways to enter python interactive mode
1.) just start python
2.) run python -i pythonscript.py
What I am looking for is slightly different:
I'd like, that a python script can be started by just calling it
(clicking on it),
but that the script can decide to enter interac
On Mar 17, 9:29 am, "R. David Murray" wrote:
> walle...@gmail.com wrote:
> > On Mar 16, 4:10 pm, Benjamin Peterson wrote:
> > > gmail.com> writes:
>
> > > > self.out.write(b'BM') worked beautifully. Now I also have a similar
> > > > issue, for instance:
> > > > self.out.write("%c" % y) is also
R. David Murray wrote:
...
Here is some example code that works:
out=open('temp', "wb")
out.write(b"BM")
def write_int(out, n):
bytesout=bytes(([n&255), (n>>8)&255, (n>>16)&255, (n>>24)&255])
out.write(bytesout)
write_int(out, 125)
or even:
import struct
On Mon, 16 Mar 2009 02:36:43 -, MRAB
wrote:
The field name can be an integer or an identifier, so the locale could
be too, provided that you know where to look it up!
financial = Locale(group_sep=",", grouping=[3])
print("my number is {0:10n:{fin}}".format(1234567, fin=financia
ANNOUNCING
eGenix.com pyOpenSSL Distribution
Version 0.8.1-0.9.8j-1
An easy to install and use repackaged distribution
of the pyOpenSSL Python interfa
> >> I am interested in writing an application that functions like a Unix
> >> or Linux top in the way it displays data.
> >> It should be command-line based but dynamically refreshing.
also check out the source for "dstat". It is written in python and
displays top-like information and more. It
walle...@gmail.com wrote:
> On Mar 16, 4:10 pm, Benjamin Peterson wrote:
> > gmail.com> writes:
> >
> >
> >
> > > self.out.write(b'BM') worked beautifully. Now I also have a similar
> > > issue, for instance:
> > > self.out.write("%c" % y) is also giving me the same error as the other
> > > sta
On Mar 15, 6:25 pm, Gilles Ganault wrote:
> address = re_address.search(response)
> if address:
> address = address.group(1).strip()
>
> #Important!
> for item in ["\t","\r"," "]:
> address = address.replace(item,"")
>
As you found, your script works just f
On Mar 13, 8:37 pm, Christian Heimes wrote:
> Chris Rebert wrote:
> > Haven't used it, butPythonfor .NET sounds like it might be what you
> > want:http://pythonnet.sourceforge.net/
>
> I've done some development for and with PythonDotNET. It's definitely
> the right thing. It works with .NET, Mono
Python wrote:
On 16 mrt 2009, at 22:10, Lou Pecora wrote:
why don't you just execute the script directly form the terminal?
then you will be able to read all error messages...
and you can delete all the files you want
just my 2c
Arno
Because the shell process in the Terminal window would
walle...@gmail.com wrote:
Thanks for the assist. One more question, please.
self.out.write(b'BM') worked beautifully. Now I also have a similar
issue, for instance:
self.out.write("%c" % y) is also giving me the same error as the other
statement did.
I tried
self.out.write(bytes("%c" %y),
On Mar 16, 4:10 pm, Benjamin Peterson wrote:
> gmail.com> writes:
>
>
>
> > self.out.write(b'BM') worked beautifully. Now I also have a similar
> > issue, for instance:
> > self.out.write("%c" % y) is also giving me the same error as the other
> > statement did.
> > I tried self.out.write(bytes
In article ,
Python wrote:
> > --
> why don't you just execute the script directly form the terminal?
> then you will be able to read all error messages...
> and you can delete all the files you want
>
> just my 2c
>
> Arno
Because the shell process in the Terminal window would exit right aft
On 16 mrt 2009, at 22:10, Lou Pecora wrote:
why don't you just execute the script directly form the terminal?
then you will be able to read all error messages...
and you can delete all the files you want
just my 2c
Arno
Because the shell process in the Terminal window would exit right
a
gmail.com> writes:
>
> self.out.write(b'BM') worked beautifully. Now I also have a similar
> issue, for instance:
> self.out.write("%c" % y) is also giving me the same error as the other
> statement did.
> I tried self.out.write(bytes("%c" %y),encoding=utf-8) in an attempt to
> convert to bytes
So, I see nobody has seen fit to make the obvious joke.
I will demonstrate my lack of restraint, by answering:
The way to add months to a date is to begin by
asking about your date's early childhood.
--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/p
On 16 mrt 2009, at 18:21, Lou Pecora wrote:
Since this happened with a Python script and some people here use OS X
and Terminal to run scripts I thought this might be helpful.
I recently ran into this problem using Terminal and found the
solution.
I thought those who use the Terminal in OS
thanks Aaron, Paul and Vlastimil,
sorry I phrased my question wrong,
I was looking for parsing an expression of an element of a nested list
the code below seems to do what I'm looking for.
cheers,
Stef
Aaron Brady wrote:
On Mar 15, 6:44 pm, Stef Mientki wrote:
hello,
I need to parse a ne
Andrew,
I'm on a lot of Python (and Python related) mailing lists and haven't
received a message like you described.
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 16, 11:05 am, "R. David Murray" wrote:
> walle...@gmail.com wrote:
> > I am working with a bit of code that works ok in Python 2.x (tested
> > fine in 2.5.4 and 2.6.1) but fails in 3.0.1.
> > The code opens a file for binary output to witht the objective to
> > produce a .bmp graphics file.
Has anyone else received spam (unsolicited email) about PyCon 2009?
I've just got an email from "Roy Hyunjin Han" <@columbia.edu> and as
far as I can tell it's not associated with any list I've subscribed to.
If it is spam I'm guessing the from address is fake (why would someone I
don't know
On Mar 16, 1:40 pm, Peter Otten <__pete...@web.de> wrote:
> mattia wrote:
> > I have 2 lists, like:
> > l1 = [1,2,3]
> > l2 = [4,5]
> > now I want to obtain a this new list:
> > l = [(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)]
> > Then I'll have to transform the values found in the new list.
> > Now, some
bdb112 wrote:
... the difference between ...
print(" %d, %d, buckle my shoe" % (1,2))
... and ...
print(" %d, " + " %d, buckle my shoe" % (1,2))
# a bug or a feature?
A feature. a + b % c is a + (b % c)
But do note that string constant concatentation is higher priority
than the other ope
On Groklaw, there is the motion filed by Harvard's Charles Nelson
argues that "statutory damages for noncommercial defendants under
copyright law are unconstitutional, unreasonable, and way out of
proportion to any alleged injury to the plaintiffs."
http://www.groklaw.net/article.php?story=200903
Peter Otten <__pete...@web.de> wrote:
>assert s.startswith("[")
>assert s.endswith("]")
>s = s[1:-1]
s.strip('[]')
(I suppose it all depends on how much you can trust the consistency
of the input.)
--
\S
under construction
--
http://mail.python.org/mailman/listinfo/python-list
mattia wrote:
> I have 2 lists, like:
> l1 = [1,2,3]
> l2 = [4,5]
> now I want to obtain a this new list:
> l = [(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)]
> Then I'll have to transform the values found in the new list.
> Now, some ideas (apart from the double loop to aggregate each element of
> l1 with
Dennis Lee Bieber wrote:
Teletypes, OTOH, really did use one character to advance the platen
by a line, and a second to move the print-head to the left. (and may
have needed "rub-out" characters to act as timing delays while the
print-head moved)
I remember writing a printer driver for a
mattia:
> Now, some ideas (apart from the double loop to aggregate each element of
> l1 with each element of l2):
>>> from itertools import product
>>> list(product([1,2,3], [4,5]))
[(1, 4), (1, 5), (2, 4), (2, 5), (3, 4), (3, 5)]
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-
On Monday 16 March 2009 15:07:06 mattia wrote:
> I have 2 lists, like:
> l1 = [1,2,3]
> l2 = [4,5]
> now I want to obtain a this new list:
> l = [(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)]
> Then I'll have to transform the values found in the new list.
> Now, some ideas (apart from the double loop to agg
I have 2 lists, like:
l1 = [1,2,3]
l2 = [4,5]
now I want to obtain a this new list:
l = [(1,4),(1,5),(2,4),(2,5),(3,4),(3,5)]
Then I'll have to transform the values found in the new list.
Now, some ideas (apart from the double loop to aggregate each element of
l1 with each element of l2):
- I want
On Mar 15, 1:28 pm, tinn...@isbd.co.uk wrote:
> I have a date in the form of a datetime object and I want to add (for
> example) three months to it. At the moment I can't see any very
> obvious way of doing this. I need something like:-
>
> myDate = datetime.date.today()
> inc = datetime.
Since this happened with a Python script and some people here use OS X
and Terminal to run scripts I thought this might be helpful.
I recently ran into this problem using Terminal and found the solution.
I thought those who use the Terminal in OS X might be interested.
The problem appeared sud
walle...@gmail.com wrote:
> I am working with a bit of code that works ok in Python 2.x (tested
> fine in 2.5.4 and 2.6.1) but fails in 3.0.1.
> The code opens a file for binary output to witht the objective to
> produce a .bmp graphics file. The code below illustrates the first of
> several like
I am working with a bit of code that works ok in Python 2.x (tested
fine in 2.5.4 and 2.6.1) but fails in 3.0.1.
The code opens a file for binary output to witht the objective to
produce a .bmp graphics file. The code below illustrates the first of
several like errors when a str object is attempte
On Mon, 16 Mar 2009 13:02:07 +0530, Saurabh wrote:
I want to download content from the net - in chunks of x bytes or characters
at a time - so that it doesnt pull the entire content in one shot.
This isn't exactly how things work. The server *sends* you bytes. It can
send you a lot at once.
On 2009-03-13, Johannes Bauer wrote:
> Peter Otten schrieb:
>
>> encoding = sys.stdout.encoding or "ascii"
>> for row in rows:
>> id, address = row[:2]
>> print id, address.encode(encoding, "replace")
>>
>> Example:
>>
> u"ähnlich lölich üblich".encode("ascii", "replace")
>> '?hnlich
-
Please consider contributing to and/or forwarding to the appropriate groups and
peers the following call for papers.
(please excuse us if you received this call more than once)
-
You are receiving this email because of your research activities on the
conference topic.
T
venutaurus...@gmail.com wrote:
hi all,
Is there any way to identify the File system type of a drive
in python in Windows? Some thing like:
C:\ -- NTFS
D:\ -- FAT32..
import win32api
import win32file
def file_system (drive_letter):
return win32api.GetVolumeInformation (
win32fil
On Sun, 15 Mar 2009 16:27:01 -0400, Roy Smith wrote:
> In article ,
> Chris Rebert wrote:
>
>> Besides your behavior, one could equally well argue that a 31st repeat
>> on months without a 31st should just be dropped, or that it should
>> carry over onto the 1st of the next month (ignoring the c
On Feb 27, 6:08 pm, ntwrkd wrote:
> I am interested in writing an application that functions like a Unix
> or Linux top in the way it displays data.
> It should be command-line based but dynamically refreshing.
>
> I'm not sure what I should take into account or how I might go about
> implementing
On Mar 16, 4:29 am, Vlastimil Brom wrote:
> 2009/3/16 Vlastimil Brom :
>
>
>
> > 2009/3/16 Stef Mientki :
> >> hello,
>
> >> I need to parse a nested list, given as a string, like this
>
> >> line = " A [ B [ C+2 ] + 3 ] "
>
> > ...
>
> >> thanks,
> >> Stef
>
> > there is a "nestedExpr" (and pr
Sean DiZazzo wrote:
> Why is it that you can setattr() on an instance of a class that
> inherits from "object", but you can't on an instance of "object"
> itself?
>
> >>> o = object()
> >>> setattr(o, "x", 1000)
> Traceback (most recent call last):
> File "", line 1, in
> AttributeError: 'obje
On Mar 13, 4:41 pm, Jasiu wrote:
> Hey,
>
> I work at a company where I'm lucky enough to write web apps using
> Python and WSGI :). We develop more and more stuff in Python and it's
> becoming a mess of dependencies, so we thought we would create a
> guideline for developers that describes the wh
> On Mar 16, 5:00 pm, bdb112 wrote:
> > # is the difference between
> > print(" %d, %d, buckle my shoe" % (1,2))
> > # and
> > print(" %d, " + " %d, buckle my shoe" % (1,2))
> > # a bug or a feature?
It is correct behavior. On the other hand, it is one of the, well,
bugs, that is avoided by
> Release 213 is out already:
Tim, Mark,
this is great news.. thanks for tracking 3.x so closely. I big
barrier for me to eventually adopt 3.x is the ability to use pywin32.
thanks!
-Corey
--
http://mail.python.org/mailman/listinfo/python-list
hi all,
Is there any way to identify the File system type of a drive
in python in Windows? Some thing like:
C:\ -- NTFS
D:\ -- FAT32..
so on..
Thank you,
Venu Madhav.
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
John Machin wrote:
>On Mar 16, 3:08=A0pm, a...@pythoncraft.com (Aahz) wrote:
>> In article ,
>> Roy Smith =A0 wrote:
Besides your behavior, one could equally well argue that a 31st repeat
on months without a 31st should just be dropped, or that it should
carry ove
In article ,
Jorgen Grahn wrote:
>
>\begin{whine}
>
>Why is Python a "Framework" under "Libraries"? In any other Unix, a
>third-party Python installation would have been placed in /usr/local/
>or /opt/. Also, editing a user's dotfiles while installing software
>seems cruel and unusual -- to tha
Ned Deily wrote:
> In article <49bd42ac$0$512$bed64...@news.gradwell.net>,
> tinn...@isbd.co.uk wrote:
> > I was just hoping there was some calendar object in Python which could
> > do all that for me (I need the handling of 31st and February etc.)
>
> Whatever your requirement, chances are date
Anyone got any idea of how to create a 256 byte/block filesystem using
FUSE in python ? How to implement block level reads/writes instead of
byte level reads/writes in fuse-python ?
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 16, 8:08 am, Dennis Lee Bieber wrote:
> On Sun, 15 Mar 2009 23:18:54 -0500, alex goretoy
> Many of your posts are actually exceeding the 500-line limit I've
> set in my client for down-load -- yet have nothing worthy of 500 lines!
Could this be the reason why I cannot see his messa
On Fri, 13 Mar 2009 14:24:52 +0100, Peter Otten <__pete...@web.de>
wrote:
>It seems the database gives you the strings as unicode. When a unicode
>string is printed python tries to encode it using sys.stdout.encoding
>before writing it to stdout. As you run your script on the windows commmand
>line
On Mar 15, 9:54 pm, "Rhodri James"
wrote:
> On Sun, 15 Mar 2009 23:26:04 -, Aaron Brady
> wrote:
>
>
>
>
>
> > On Mar 15, 1:50 pm, "Rhodri James"
> > wrote:
> >> On Sun, 15 Mar 2009 17:55:25 -, Aaron Brady
> >> wrote:
>
> >> > On Mar 15, 12:39 pm, John Posner wrote:
> >> >> (My apo
2009/3/16 Vlastimil Brom :
> 2009/3/16 Stef Mientki :
>> hello,
>>
>> I need to parse a nested list, given as a string, like this
>>
>> line = " A [ B [ C+2 ] + 3 ] "
>>
> ...
>>
>> thanks,
>> Stef
>>
>
> there is a "nestedExpr" (and probably other options, I'm not aware of ...:-)
> ...
> regard
>
> print(10 + 20 % 7)
> a bug or a feature?
It is a feature
print ((10+20) % 7)
-Alex Goretoy
http://www.goretoy.com
--
http://mail.python.org/mailman/listinfo/python-list
Ahmad Syukri b wrote:
> On Mar 16, 1:21 pm, Sean DiZazzo wrote:
>> Why is it that you can setattr() on an instance of a class that
>> inherits from "object", but you can't on an instance of "object"
>> itself?
>>
>> >>> o = object()
>> >>> setattr(o, "x", 1000)
>>
>> Traceback (most recent call
Everything starts out small. I am sure that things will grow if there is a
demand for it...
On Mon, Mar 16, 2009 at 5:55 AM, JanC wrote:
> andrew cooke wrote:
>
> > Fuzzyman wrote:
> >> On Mar 15, 3:46 pm, Gerhard Häring wrote:
> > [...]
> >>> Me too. I doubt it, though. From an outside view, t
The issue seems to be with your windows installation. Try getting another
copy etc... There shouldn't be any issues I have tried and used both
seamlessly
On Mon, Mar 16, 2009 at 7:55 AM, dash dot <""wernermerkl\"@fujitsu(dash)
siemens.com"> wrote:
> Joshua Kugler schrieb:
>
>> dot wrote:
>>
>>> h
On Mar 15, 6:44 pm, Stef Mientki wrote:
> hello,
>
> I need to parse a nested list, given as a string, like this
>
> line = " A [ B [ C+2 ] + 3 ] "
>
> ( I probably can do it with find, but I guess that's not the most
> elegant way, besides recusrion is not my strongest point)
>
> which should
On Mar 16, 7:00 pm, bdb112 wrote:
> # is the difference between
> print(" %d, %d, buckle my shoe" % (1,2))
> # and
> print(" %d, " + " %d, buckle my shoe" % (1,2))
> # a bug or a feature?
Here's a question for you:
Is the difference between
print(30 % 7)
and
print(10 + 20 % 7)
a bug or
On Mar 15, 11:42 pm, Ahmad Syukri b wrote:
> On Mar 15, 6:19 am, Aaron Brady wrote:
>
>
>
> > Your code hung on my machine. The call to 'main()' should be in an
> > 'if __name__' block:
>
> > if __name__== '__main__':
> > main()
>
> > Is it possible you are just seeing the effects of the non
2009/3/16 Stef Mientki :
> hello,
>
> I need to parse a nested list, given as a string, like this
>
> line = " A [ B [ C+2 ] + 3 ] "
>
...
>
> thanks,
> Stef
>
Hi,
I guess, you can use e.g. pyparsing;
there is a "nestedExpr" (and probably other options, I'm not aware of ...:-)
Check the example
#whoops, the first output is actually
1, 2, buckle my shoe
# in case it wasn't obvious
On Mar 16, 5:00 pm, bdb112 wrote:
> # is the difference between
> print(" %d, %d, buckle my shoe" % (1,2))
> # and
> print(" %d, " + " %d, buckle my shoe" % (1,2))
> # a bug or a feature?
>
> First ou
# is the difference between
print(" %d, %d, buckle my shoe" % (1,2))
# and
print(" %d, " + " %d, buckle my shoe" % (1,2))
# a bug or a feature?
First output
... print(" %d " + " %d, buckle my shoe" % (1,2))
Second output
TypeError: not all arguments converted during string formatting
Versio
Peter Billam wrote:
>> Peter Billam wrote:
>> window = MainWindow(application)
>> if (len(sys.argv) > 1) and os.path.exists(sys.argv[1]):
>> window.loadFile(sys.argv[1])
>> application.mainloop()
>> File "./midimix", line 465, in loadFile
>> space0.grid(row=grid_row,
>> pady=
Peter Billam wrote:
>> They're multiplied up from
>> canvas_height = self.canvas.winfo_height()
>> so I guess mainloop already think it's idle, while grid is still
>> taking 10ms to work out what goes where.
On 2009-03-15, John McMonagle wrote:
> You need to query the requested width and heigh
I want to download content from the net - in chunks of x bytes or characters
at a time - so that it doesnt pull the entire content in one shot.
import urllib2
url = "http://python.org/";
handler = urllib2.urlopen(url)
data = handler.read(100)
print """Content :\n%s \n%s \n%s""" % ('=' * 100, data
sorry, I'll try to keep it cool
-Alex Goretoy
http://www.goretoy.com
On Mon, Mar 16, 2009 at 2:08 AM, Dennis Lee Bieber wrote:
> On Sun, 15 Mar 2009 23:18:54 -0500, alex goretoy
> declaimed the following in
> gmane.comp.python.general:
>
> > what is I just set
> > "colors": self.opt['arg_opts_
Hi,
I'm writing a file system under fuse-python. The main problem I'm
facing now is that the flags which are provided by the fuse module
when r/w are called, are screwing up the situation.
I wrote a file class for fuse as shown below.
class FlusterFile(object):
def __init__(self,
98 matches
Mail list logo