Jason Friedman writes:
> I suppose you already figured out that you can call __delitem__() to
> clear the headers and add them back in whatever order you like.
Well, this would mean saving all headers, deleting all, inserting my
own, and adding the saved original headers again. Seems complicate
Hi,
the EmailMessage class of email.message provides the methods
add_header() and __setitem__() to add a header to a message.
add_header() effectively calls __setitem__(), which does
`self._headers.append(self.policy.header_store_parse(name, val))`. This
inserts the header at the bottom.
It is,
actually terminate. What
happens to it?
My guess is that normal scoping rules apply. Using my example, the generator
is referenced by 'x', so when 'x' goes out of scope, the generator is
garbage collected, even though it never completed.
Is this correct?
Frank Millm
;mailto:enlong@student.kuleuven.be>;
enlong@biotech.tu-dresden.de <mailto:enlong@biotech.tu-dresden.de>
Mobile Phone: +4917666191322
Mailing Address: Zi. 0108R, Budapester Straße 24, 01069, Dresden, Germany
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.de
; class A:
... a = 0
...
>>> a = A()
>>> a.a
0
>>> def h(a1):
... a1.a = 1
...
>>> h(a)
>>> a.a
1
bg,
Johannes
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.de
Tel.: +49.228.42150.xxx
Galileo Press GmbH
Rheinwerk
>>> [print("ok") for it in x if it.strip() !=""]
ok
ok
ok
[None, None, None]
i understand there are three 'ok' in the output,but why i have the
output of [None, None, None]
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.d
hen do the same for the last two columns. I want to do this for every
name.
All I've got is
sum([int(s.strip()) for s in open('file').readlines()])
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.de
Tel.: +49.228.42150.xxx
Galileo Press GmbH
Rhein
I'm using paramiko to access some routers and firewalls from python and
it works very well.
bg,
Johannes
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.de
Tel.: +49.228.42150.xxx
Galileo Press GmbH
Rheinwerkallee 4 - 53227 Bonn - Germany
Tel.: +49.228.42.
thnx guys.
On 24.01.2014 01:10, Terry Reedy wrote:
Johannes Schneider Wrote in
message:
On 22.01.2014 20:18, Ned Batchelder wrote:
On 1/22/14 11:37 AM, Asaf Las wrote:
Chris is right here, too: modules are themselves singletons, no matter
how many times you import them, they are only
lobal namespace. But
the value differs in stuff() and before/after the import statement. So
the instance of the module differs -> it cannot be a singelton.
bg,
Johannes
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.de
Tel.: +49.228.42150.xxx
Galileo Press GmbH
Rheinw
ebraSystem using
python as its base and supporting most (all?) of the python syntax and
moduls
bg,
Johannes
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.de
Tel.: +49.228.42150.xxx
Galileo Press GmbH
Rheinwerkallee 4 - 53227 Bonn - Germany
Tel.: +49.228.42.150.0
ation?
bg,
Johannes
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.de
Tel.: +49.228.42150.xxx
Galileo Press GmbH
Rheinwerkallee 4 - 53227 Bonn - Germany
Tel.: +49.228.42.150.0 (Zentrale) .77 (Fax)
http://www.galileo-press.de/
Geschäftsführer: Tomas Wehren, Ralf Kaulisch, R
On 27.12.2013 07:14, Pierre Quentel wrote:
Hi,
Ever wanted to use Python instead of Javascript for web client programming ?
Take a look at Brython, an implementation of Python 3 in the browser, with an
interface with DOM elements and events
Its use is very simple :
- load the Javascript libra
thank you guys.
On 11.12.2013 10:36, Chris Angelico wrote:
2013/12/11 Johannes Schneider :
can somebody explain me the difference between accessing attributes via
obj.attribute and getattr(obj, "attribute")?
Is there a special reason or advantage when using getattr?
You use getatt
Hi list,
can somebody explain me the difference between accessing attributes via
obj.attribute and getattr(obj, "attribute")?
Is there a special reason or advantage when using getattr?
bg,
Johannes
--
Johannes Schneider
Webentwicklung
johannes.schnei...@galileo-press.de
Tel.: +49.228
On 10/26/2013 01:55 AM, Yaşar Arabacı wrote:
Hi people,
I wrote this decorator: https://gist.github.com/yasar11732/7163528
When this code executes:
@debugging
def myfunc(a, b, c, d = 48):
a = 129
return a + b
print myfunc(12,15,17)
This is printed:
fun
Hi List,
I'm looking for a good advanced python book. Most books I looked at up
to now are on beginners level.
I don't need a reference (that's online) or a book explaining how to use
the interpreter or how to use list comprehensions on the one side and
skipping topics like decorators, metacla
I would say it's a little bit more:
You have to know the keywords and (basic) concepts, e.g. you really have
to understand what it means, that everything is a class.
If you get foreign, you have to be able to understand it. And the other
way round, given a problem, you should be able to write a
On 08/02/2013 03:09 PM, Ray Cote wrote:
- Original Message -
From: "Schneider"
To: python-list@python.org
Sent: Friday, August 2, 2013 8:00:09 AM
Subject: Python performance
Hi list,
I have to write a small SMTP-Relay script (+ some statistic infos)
and
I'm wondering,
On Fri 02 Aug 2013 02:59:26 PM CEST, Tim Chase wrote:
On 2013-08-02 14:00, Schneider wrote:
I have to write a small SMTP-Relay script (+ some statistic infos)
and I'm wondering, if this
can be done in python (in terms of performance, of course not in
terms of possibility ;) ).
It has to h
Hi list,
I have to write a small SMTP-Relay script (+ some statistic infos) and
I'm wondering, if this
can be done in python (in terms of performance, of course not in terms
of possibility ;) ).
It has to handle around 2000 mails per hour for at least 8hours a day
(which does not mean, that
On Wed 31 Jul 2013 08:53:26 AM CEST, Musical Notation wrote:
Is it possible to write a Turing-complete lambda function (which does not
depend on named functions) in Python?
what should a sinlge Turing-complete lambda function be?
For me, a programming language can be Turing-complete or a funct
(in the
example /bin/ls) is called, and not only ls.
bg,
Johannes
On 07/26/2013 12:39 PM, Devyn Collier Johnson wrote:
On 07/25/2013 09:58 AM, Schneider wrote:
Hi,
nice idea.
mybe - for security reasons - you should ensure, that the right tool
is called and not some tool put the path with t
Hi,
nice idea.
mybe - for security reasons - you should ensure, that the right tool is
called and not some tool put the path with the same name.
bg,
Johannes
On Thu 25 Jul 2013 03:24:30 PM CEST, Devyn Collier Johnson wrote:
Aloha Python Users!
I made a Python3 module that allows users
On 25.05.2013 07:54, dieter wrote:
Schneider writes:
how can I serialize a python class to XML? Plus a way to get the class
back from the XML?
My aim is to store instances of this class in a database.
In case you want to describe the XML data via an XML-schema
(e.g. to exchange it with
On 26.05.2013 22:48, Roy Smith wrote:
In article ,
Chris Rebert wrote:
On May 23, 2013 3:42 AM, "Schneider" wrote:
Hi list,
how can I serialize a python class to XML? Plus a way to get the class
back from the XML?
There's pyxser: http://pythonhosted.org/pyxser/
My
Hi list,
how can I serialize a python class to XML? Plus a way to get the class
back from the XML?
My aim is to store instances of this class in a database.
bg,
Johannes
--
GLOBE Development GmbH
Königsberger Strasse 260
48157 MünsterGLOBE Development GmbH
Königsberger Strasse 260
48157 Müns
Maybe the implementation of the Python Interpreter could be seen as
transition function.
This can be understand in detail, but it even if you know how the
interpreter works, you don't really know to work
_with_ the interpreter.
Even more, there are a lot of decisions, which are made 'by design'
On 11.04.2013 22:16, Ian Kelly wrote:
On Thu, Apr 11, 2013 at 9:23 AM, Ethan Furman wrote:
On 04/11/2013 04:13 AM, Sven wrote:
Yes, I had the idea to add bluetooth too, removes the whole plugging and
unplugging spiel. I might start work on that,
and if anyone else wants to dive in and help, fe
On Friday, 12 April 2013 10:22:21 UTC+1, Chris Angelico wrote:
> On Fri, Apr 12, 2013 at 7:18 PM, Rob Schneider wrote:
>
> > f.close
>
>
>
> Yep, there's the problem! See my previous post for details. Change this to:
>
>
>
> f.cl
On Friday, 12 April 2013 09:26:21 UTC+1, Cameron Simpson wrote:
>
> | > > Question: is the size of the incomplete file a round number? (Like
>
> | > > a multiple of a decent sized power of 2>)
>
> [...]
>
> | Source (correct one) is 47,970 bytes. Target after copy of 45,056
>
> | bytes. I've
> The file system is Mac OS Extended Journaled (default as out of the box).
I ran a repair disk .. .while it found and fixed what it called "minor"
problems, it did something. However, the repair did not fix the problem. I
just ran the program again and the source is 47,970 bytes and target af
>
> > Or that the filesystem may be full? Of course, that's usually obvious
>
> > more widely when it happens...
>
> >
>
> > Question: is the size of the incomplete file a round number? (Like
>
> > a multiple of a decent sized power of 2>)
>
>
>
> Also on what OS X file system type does t
> I would consider the chance that the disk may be faulty, or the file
>
> system is corrupt. Does the problem go away if you write to a different
>
> file system or a different disk?
>
It's a relatively new MacBook Pro with a solid state disk. I've not noticed
any other disk problems. I di
> The close method is defined and flushing and closing a file, so
>
> it should not return until that's done.
>
>
>
> What command are you using to create the temp file?
>
>
re command to write the file:
f=open(fn,'w')
... then create HTML text in a string
f.write(html)
f.close
--
http:/
Thanks. Yes, there is a close function call before the copy is launched. No
other writes.
Does Python wait for file close command to complete before proceeding?
--
http://mail.python.org/mailman/listinfo/python-list
Using Python 2.7.2 on OSX, I have created a file in temp space, then use the
function "shutil.copyfile(fn,loc+fname)" from "fn" to "loc+fname".
At the destination location, the file is truncated. About 10% of the file is
lost. Original file is unchanged.
I added calls to "statinfo" immediately
Hi,
maybe you could do this by a decorator on the setattr method. It should
look more or less
like your implementation, but in my eyes it's a cleaner and can be reused.
Further, I would use a stack for each attribute, so that you can restore
all previous values.
bg,
Johannes
On 03/06/2013 0
thank you guys for the huge list of answers,
In my setting I have to access some routers and firewall from a
linux-client.
I think I'll try Fabric.
On 26.10.2012 06:20, Rodrick Brown wrote:
On Oct 25, 2012, at 6:34 AM, Schneider wrote:
Hi Folkz,
how can i create a SSH-Connection
Hi Folkz,
how can i create a SSH-Connection with python? I have to send some
commands to the remote host and parse their answers.
greatz Johannes
--
http://mail.python.org/mailman/listinfo/python-list
Martin P. Hellwig schrieb:
On 02/16/11 09:04, Arndt Roger Schneider wrote:
[snip]
tkpath does not seem to come standard with Python's tk version when I
looked into it a couple of years ago, but maybe it has now?
tk canvas and tkpath share the same interface, the first tkpath was
a p
Martin P. Hellwig schrieb:
Hi all,
Information on using tkinter for displaying an svg image seems a bit low
spread on the Internet. I recently played around with pygame and svg and
realized, hold on this can be done with tk too. So I thought I post a
little example for future generations :-)
Steven D'Aprano schrieb:
On Thu, 10 Feb 2011 15:48:47 +, Cousin Stanley wrote:
Steven D'Aprano wrote:
I have a tkinter application under Python 2.6 which is shows text in a
giant font, about twenty(?) times larger than expected.
The fonts are set using:
titlefont = '-Adobe-Helvetica-B
rantingrick schrieb:
[snip]
1. You cannot define the terms--restrict your opponent--
and battle it yourselves.
2. Your specified directory browser is useless.
--At least define that the directory browser must have
constant complexity to work with volatile
data over a network...
Littlefield, Tyler schrieb:
>And of course, it should also offer support for Windows, since most of
the computer users use Windows, especially those who need accessibility
features.
uh. no, and no.
Plenty of those utilizing screen readers are using macs nowadays, as
well as vinux or some deri
Adam Skutt schrieb:
On Jan 18, 8:09 am, Arndt Roger Schneider
wrote:
Back to rantingrick 21st century toolkit/framwork:
Let's have a look at the numbers:
Worlwide pc market are 300 Million pcs per year,
this number includes desktops(2/3) and servers(1/3).
Your gui app is not releva
rantingrick schrieb:
On Jan 18, 12:25 pm, Arndt Roger Schneider
wrote:
rantingrick schrieb:
On Jan 18, 7:09 am, Arndt Roger Schneider
We DO need to consider the mobile market in this decision. Maybe it is
time for us to actually get on the cutting edge of GUI's. Maybe we
should he
rantingrick schrieb:
On Jan 18, 7:09 am, Arndt Roger Schneider
wrote:
Summary wxWidgets:
wxWidgets is large scale C++ library from the 20th century,
solemnly dedicated toward desktop computers.
wxWidgets originates from a time before templates
were used in C++ and thus duplicates many of
Octavian Rasnita schrieb:
From: "Arndt Roger Schneider"
At least keep the disclaimer:
>> Well, tosssing screenshots around doesn't prove wether
>> a framwork/toolkit is good or not;
>> It only displays the developers commitment to create
>> a work of a
Terry Reedy schrieb:
On 1/16/2011 11:20 PM, rantingrick wrote:
Ok, try this...
http://juicereceiver.sourceforge.net/screenshots/index.php
http://www.sensi.org/~ak/pyslsk/pyslsk6.png
http://www.wxwidgets.org/about/screensh.htm
Ok, wxwidgets can look at least as good as tk. Agr
Tim Harig schrieb:
[snip]
This isn't such a tragedy Erlang as it is for other managed VMs because
Erlang/BEAM makes powerful usage of its VM for fault tolerance mechanisms. I
don't know of any other VM that allows software upgrades on a running system.
styx, the distributed operating system i
rantingrick schrieb:
On Dec 29, 6:41 pm, Gerry Reno wrote:
wxPython looks good but I don't see anyone developing support for things
like smartphones.
No wx is not the answer to our problems
Rather: ... to *your* problem...
Also, what do you think about frameworks such as pyjamas? It
Peter schrieb:
I am using Windoze, I suspect the appearance attributes I am asking
about here are platform dependent?
Using Tkinter, I would like to generate a Checkbutton that is filled
in with a solid colour rather than a tick mark when selected.
tk = Tk()
tk.option_add("*Checkbutton.inidca
lkcl schrieb:
[snip]
it's the exact same thing for SVG image file-format. i'm
_definitely_ not convinced that "SVG the image fileformat" is The One
True Way to design images - but i'm equally definitely convinced of
the power of SVG manipulation libraries which allow for the creation
SVG image
rantingrick schrieb:
On Jun 10, 9:38 pm, Stephen Hansen wrote:
Also-- you're just starting to get wrong.
http://docs.python.org/library/tix.html
They don't -call- them the things you are, but between ComboBox, and the
flexibility of HList and TList... it actually offers quite a lot.
Terry Reedy schrieb:
On 6/7/2010 5:25 PM, Arndt Roger Schneider wrote:
Terry Reedy schrieb:
...
Hah, You are ill-informed.
How about 'under-informed'? That I readily admit ;-)
tkpath 0.3 contains a surface element, which renders vector graphics
elements in an off-scree
Terry Reedy schrieb:
Ant
I agree that the current tk situation is not completely satisfactory.
In particular, the IO facilities are inadequate and have not, to my
knowledge, changed in a decade. Image input formats are limited. There
is no canvas output as an image. (Output of the canvase dis
Pradeep B schrieb:
On Sat, May 29, 2010 at 7:33 PM, Kevin Walzer wrote:
Tkinter doesn't wrap native printing API's. There are a few extensions that
do it, but they are platform specific and not complete.
The usual ways of printing are like this:
1. If you're outputting data from the text
Robert Kern schrieb:
Martin Schneider wrote:
I tried Numeric, but e.g. it doesn't seem to feature transpose...
Yes, it does. Numeric.transpose()
Then I must have made a mistake. I'll look into it. Thanks for the
correction.
How do I compile Numpy against python2.2? :-)
You c
Diez B. Roggisch schrieb:
Can't you just get Numpy (or it's predecessors, Numeric) compiled against
ptyhon2.2?
I tried Numeric, but e.g. it doesn't seem to feature transpose...
How do I compile Numpy against python2.2? :-)
Thanks for your answers and best regards,
Martin
--
http://mail.python
Hi!
I'd like to handle two-dimensional arrays. My first choice, the numpy
library, doesn't seem to be an option due to compatibility issues (see
my other thread about python22.dll).
Is there a tutorial somewhere how to handle 2d-arrays with vanilla Python?
Thanks and best regards,
Martin
--
Hi!
I'd like to use the numpy library (which runs on Python 2.5) in the same
project with another (mandatory) library which needs python22.dll. When
I try to compile I get an error similar to "python22.dll not compatible
with the current Python version."
Has anybody an idea how to solve this
Am Wed, 23 Jul 2008 08:33:57 -0700 wrote antar2:
> I already asked a similar question, but encounter problems with
> python...
> How can I concatenate the elements in each list of a list of lists
>
> list_of_listsA =
>
> [['klas*', '*', '*'],
> ['mooi*', '*', '*', '*'],
> ['arm*', '*', '*(haar)'
Tim Roberts <[EMAIL PROTECTED]> wrote:
> Xah Lee <[EMAIL PROTECTED]> wrote:
> >
> >Let me tell you, since you know PHP, that PHP and Perl are
> >practically identical in their high-levelness or expressiveness or
> >field of application (and syntax), and, Perl and Python are pretty
> >much the same
Rico Secada <[EMAIL PROTECTED]> wrote:
>
> Second, I need some advice.
>
http://www.nondot.org/sabre/Mirrored/AdvProgLangDesign/
Learn, or better said understand, those and then choose wisely.
Lisp throws lambda calculus right into your face, which is a good
thing. Scheme might be the better c
Hi guys,
I´m experiencing weird error messages while installing MySQL-python
with easy_install... I have no idea where the errors come from.
Read the whole output at http://pastebin.com/m3859cf40
It´s really a lot...
Someone got ideas?
Greets
Jonas
--
http://mail.python.org/mailman/listinfo/p
Jay,
Couple of points that may help you.
1) A serial port does not have data ports 0-n. A serial port takes a
byte (8 bits), then shifts them down a single pipe using a chip called a
UART (feel free to google for unfamiliar terms).
example
Bit pattern 1010 1010
would be shifted one bit at a
Congratulations to Guide,
Mike
Harald Armin Massa wrote:
> Guido at Google: a message in THE public forum c.l.p.
>
> A confirmation by Martellibot, that Guido is IN FACT sitting 15m
> distant from him; and everybody in Python knows where Martellibot has
> his desk.
>
> Can it get more official
I would vote against ant because java must be installed to run it.
The bootstrap install should be very simple. If you make python usage
dependent on:
1) download java
2) install java
3) add java to path
4) download ant
5) install ant
6) add ant to path
7) download ptyhon
8) install python
9) a
Les,
I only ping internal machines. You are right about shutting down ports.
When we disable telent, we also disable ping. Many people may not though,
good luck,
Mike
Laszlo Zsolt Nagy wrote:
> Michael Schneider wrote:
>
>> I telnet to port 13 (returns time)
>>
> The
I telnet to port 13 (returns time)
Hope this is helpful,
Mike
Nico Grubert wrote:
> Hi there,
>
> I could not find any "ping" Class or Handler in python (2.3.5) to ping a
> machine.
> I just need to "ping" a machine to see if its answering. What's the best
> way to do it?
>
> Kind regards,
>
[EMAIL PROTECTED] wrote:
,,
However there is one thing I don't like in python,
> that is, scoping by indentation. But it would not annoy me so much that
> make me decide to implement a new language^_^.
>
>
> Regards,
>
> Limin
>
I find these comments interesting. It is very common for
Ken,
I would suggest that you embed python in your app (very easy to do).
-And convert several of your existing scripts to python.
-Show them a stack of python books for customer training purposes
- Drive excel with python (allows integration of your product with other
products.
- Pick an are
Alex,
Good point. Can python be used to write firefox extensions that could
be called from javascript?
1) javascript would come in on the HTML page
2) javascript would communication with the Extension API
3) the extension would be written in python
That way, you would only need to make your e
I have been away from unix/linux for a couple of years.
I went with SUSE. Just do an install all, and 10 gig later you
are done.
Very simple install, very easy admin with YAST.
If you are a power admin, there may be better release. But if you want
simple, but powerful, SUSE has worked well fo
Alex Martelli wrote:
> Michael Schneider <[EMAIL PROTECTED]> wrote:
>
>
>>I would like to use weak refs in an observer pattern implementation.
>>The problme that I have seems to be that weakrefs can't manage functions.
>
>
> They can manage just fin
Hello All,
I am comming back to python after being away for several years.
I would like to use weak refs in an observer pattern implementation.
The problme that I have seems to be that weakrefs can't manage functions.
--- from docs:
http://www.python.org/doc/current/lib/module-
Jas,
I use a python called twisted to run processes as you describe.
Twisted is an event-driven framework that brings a change in the
way that you look at things.
take a look at:
http://twistedmatrix.com/projects/core/documentation/howto/process.html
Good luck, hope this is useful,
Mike
jas
Thanks to all, I added the object as a subclass (should this be
required for 2.4.1 ???)
I also switched to the decorator with the @property syntax
Thank you very much for the help for adding @property to the language.
what a great language :-)
Mike
Michael Schneider wrote:
> Hello
Thanks to all, I added the object as a subclass (should this be
required for 2.4.1 ???)
I also switched to the decorator with the @property syntax
Thank you very much for the help for adding @property to the language.
what a great language :-)
Mike
Michael Schneider wrote:
> Hello
Hello All,
I have been working on learning how to use python properties.
The get property access is working, but the the set
property is not working.
Rather then dispatching the property assignment to setNothing, the
property object is being replaced with a string.
I must be doing something ver
Take a look at:
http://wingware.com/
It is only $35.00 for an IDE. (30 day free eval version)
I use eclipse for java, and have become quite fond of tab completion.
Mike
CppNewB wrote:
> I am absolutely loving my experience with Python. Even vs. Ruby, the syntax
> feels very clean with an emp
Frederik,
Thank you very much for the info on properties, that is very useful.
Sorry about the public typo, that should have been protected. I should
not post before coffee hits :-)
Happy coding,
Mike
Fredrik Lundh wrote:
> Michael Schneider wrote:
>
>
>>1) mark an objec
I have been following this thread with great interest.
I have been coding in C++ since the late 80's and Java since the late 90's.
I do use private in these languages, with accessors to get at internal
data.
This has become an ingrained idiom for me. When I create a python
object, it is natu
I would need to get a better picture of your app.
I use a package called twisted to handle large scale computing
on multicore, and multi-computer problems
http://twistedmatrix.com/
Hope this is useful,
Mike
yoda wrote:
> Hi guys,
> My situation is as follows:
>
> 1)I've developed a service th
Just curious, is anyone using python for OGL 2.0 shader language
development?
Which lib are you using?
Thanks,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
86 matches
Mail list logo