Re: Get classes from "self.MyClass" to improve subclassability

2015-06-12 Thread Thomas Güttler
Hi Steven, I understand your solution. It is correct and works. But the missing five characters "self." in the upstream code produces a lot of more lines in the final result. Regards, Thomas Güttler Am Freitag, 12. Juni 2015 14:24:06 UTC+2 schrieb Steven D'Aprano: > On F

Re: Get classes from "self.MyClass" to improve subclassability

2015-06-15 Thread Thomas Güttler
Hi, crazy. I develop python since several years. I was not aware, that you can change the defaults of kwargs. I am amazed, but won't use it :-) Am Samstag, 13. Juni 2015 01:09:47 UTC+2 schrieb Terry Reedy: > On 6/12/2015 7:12 AM, Thomas Güttler wrote: > > Here is a snippet fro

Can't install/uninstall Python

2015-07-14 Thread Thomas Via
Hello. I have a problem installing/uninstalling python. I’m trying to reinstall Python 2.7.9/2.7.10, but during the installation, it didn’t let me, which gave me this: "There is a problem with this Windows Installer package. A program required for this install to complete could not be

From logging to files to a better solution: syslog, Sentry, Logstash, ....

2015-09-09 Thread Thomas Güttler
or Logstash in detail. Which solution could fit for our environment? Please ask if you have question! Regards, Thomas Güttler -- https://mail.python.org/mailman/listinfo/python-list

Re: From logging to files to a better solution: syslog, Sentry, Logstash, ....

2015-09-11 Thread Thomas Güttler
Am Donnerstag, 10. September 2015 08:42:47 UTC+2 schrieb dieter: > Thomas Güttler writes: > > ... > > Why we are unhappy with logging to files: > > > > - filtering: We don't want to get INFO messages over the VPN. > > You can quite easily control at wha

Re: From logging to files to a better solution: syslog, Sentry, Logstash, ....

2015-09-15 Thread Thomas Güttler
Am Freitag, 11. September 2015 11:03:52 UTC+2 schrieb jmp: > On 09/11/2015 09:22 AM, Thomas Güttler wrote: > > > > I want INFO to be logged and stored on the remote host. > > Therefore I must not filter INFO messages. > > > > I don't want to pull INFO me

Re: From logging to files to a better solution: syslog, Sentry, Logstash, ....

2015-09-15 Thread Thomas Güttler
Am Freitag, 11. September 2015 10:18:11 UTC+2 schrieb marco@colosso.nl: > On Friday, September 11, 2015 at 9:22:42 AM UTC+2, Thomas Güttler wrote: > > Am Donnerstag, 10. September 2015 08:42:47 UTC+2 schrieb dieter: > > > Thomas Güttler writes: > > > > ... &

Re: From logging to files to a better solution: syslog, Sentry, Logstash, ....

2015-09-16 Thread Thomas Güttler
Am Mittwoch, 16. September 2015 07:58:11 UTC+2 schrieb dieter: > Thomas Güttler writes: > > Am Freitag, 11. September 2015 11:03:52 UTC+2 schrieb jmp: > > ... > >> Something like (python 2.7) > >> > >> import logging > >> > >> logCfg

Re: try/except/finally

2014-06-10 Thread Thomas Rachel
Am 08.06.2014 05:58 schrieb Rustom Mody: Some people¹ think that gotos are a code-smell. ¹ I am not exactly those people. A chap called E W Dijkstra made the statement: "Goto statement considered harmful" and became famous. And became widely misunderstood. If anybody would read the whole what

Re: Python's re module and genealogy problem

2014-06-11 Thread Thomas Rachel
re orthogonal. So there is an infinite number of strings these REs match. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: comtypes

2014-06-21 Thread Thomas Heller
comtypes (or ctypes) you dereference pointer by indexing them with zero. So something like this could work: for item in dwt: print item[0] Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Iterating through set

2014-07-17 Thread Thomas Rachel
if item in myset: remove.add(item) HTH, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Distributing python applications as a zip file

2014-07-23 Thread Thomas Heller
here: http://legacy.python.org/dev/peps/pep-0441/ https://pypi.python.org/pypi/pyzzer https://pypi.python.org/pypi/pyzaa/0.1.0 Or write your own little utility to create such a thing, it's not complicated. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: How to pack a string variable of length 1 as a char using struct.pack?

2014-08-05 Thread Thomas Orozco
On Tue, Aug 5, 2014 at 2:15 PM, wrote: > Hi, > How to pack a string variable of length 1 as a char using struct.pack? > The following works fine: > p = struct.pack('c', b'1') > > Whereas this causes an error "char format requires a bytes object of > length 1": > s = '1' > p = struct.pack('c', s)

Re: 'is not' or '!='

2014-08-19 Thread Thomas Rachel
If you ask the wrong question, you might get a wrong answer. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: 'is not' or '!='

2014-08-19 Thread Thomas Rachel
everything else return other is None # is equal only to None return not(other) # is equal to everything which is falsey Pick one. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: 'is not' or '!='

2014-08-21 Thread Thomas Rachel
d [...] IMHO annotate does the same what blame does on other VCS. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: very lightweight gui for win32 + python 3.4

2014-09-12 Thread Thomas Heller
Am 12.09.2014 18:38, schrieb Chris Angelico: On Sat, Sep 13, 2014 at 2:35 AM, Nagy László Zsolt wrote: So I need to create a GUI mode version of my program. That the customer should be able to see a progress bar. What kind of GUI toolkit should I use for this? I would like this to be lightweigh

Re: very lightweight gui for win32 + python 3.4

2014-09-13 Thread Thomas Heller
Am 13.09.2014 03:19, schrieb Grant Edwards: On 2014-09-12, Thomas Heller wrote: Am 12.09.2014 18:38, schrieb Chris Angelico: Does Tkinter really work well with cx_Freeze? I doubt it (from my experiences with py2exe). I never had any problems with Tkinter and py2exe, but you do get a

Re: Thread-ID - how much could be?

2014-09-16 Thread Thomas Rachel
9223372036854775807 the couter could be 9223372036854775807? And after? :) After that, the couter magically turns into a long and it goes on. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Iterator, modify data in loop body

2014-09-16 Thread Thomas Rachel
while lst: yield lst.pop(0) and you can do for element in iter_pop(lst): # work with element lst.append(new_element) Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] Jedi Python Autocomplete in Zeus IDE

2014-09-17 Thread Thomas Orozco
On Wed, Sep 17, 2014 at 8:32 AM, Steven D'Aprano wrote: > > jumppanen.ju...@gmail.com wrote: > > > On Wednesday, September 17, 2014 9:42:16 PM UTC+10, Steven D'Aprano wrote: > [...] > >> According to the screen shot there, if you have typed > >> > >> self.balan > >> > >> the autocomplete will

Re: DRY and class variables

2011-09-08 Thread Thomas Jollans
On 08/09/11 11:55, egbert wrote: > My classes correspond to sql tables. > In these classes I want to have several class variables > that refer to data that are common to all instances. > > The assignment statements for the class variables are the same > in all classes, except that of these instruc

Re: TypeError: object.__init__() takes no parameters

2011-09-09 Thread Thomas Rachel
tainer derives from object and tries to call its superclass's constructor with 2 parameters - which won't work. Write this as super(Container, self).__init__(). HTH, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: TypeError: object.__init__() takes no parameters

2011-09-09 Thread Thomas Rachel
ntact with Python was with 2.3... Thomas [1] Another example why backward-incompatible change are bad. Why was it necessary in this case? :-( -- http://mail.python.org/mailman/listinfo/python-list

Re: Doctest failing

2011-09-10 Thread Thomas Jollans
_test(): > import doctest, refactory > return doctest.testmod(refactory) > if __name__ == "__main__": > _test() > What is this "refactory"? Are you testing the right code? What is the output of your test - does it make sense for the module? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Invoke a superclass method from a subclass constructor

2011-09-11 Thread Thomas Jollans
nit__(self, module): ... self.module = module ... print ('module logged: {0}'.format (module)) ... >>> class Foo (ModuleLogger): ... def __init__(self, module): ... # calling a superclass constructor here, in Python 3 syntax: ... super().__init__(module) ... >>> f = Foo ('system') module logged: system >>> Using super() is always necessary when calling a superclass' method that is also implemented in the subclass - self.__init__ would just invoke the Foo constructor, you need super() to get to the ModuleLogger constructor. - Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Invoke a superclass method from a subclass constructor

2011-09-11 Thread Thomas Jollans
On 11/09/11 13:17, Kayode Odeyemi wrote: > On Sun, Sep 11, 2011 at 11:41 AM, Thomas Jollans <mailto:t...@jollybox.de>> wrote: > > It is working: > > >>> class A(object): > ... def log (self, module): > ... return str (

Re: Need some experience

2011-09-13 Thread Thomas Jollans
as I haven't touched it in quite a while. It has a constantly overflowing bug tracker where I'm sure you can find a lot of fascinating problems that need solving. The community, I have found, is welcoming and friendly. Much of the standard library is written in Python, but if you know C, you can have a go at the C code as well. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Connection reset by peer

2011-09-14 Thread Thomas Jollans
On 14/09/11 04:39, 守株待兔 wrote: > i want to know, my computer(client) reset it ,or the yahoo > (server) reset it ,what is the peer?? This refers to your program's peer, as in the entity it's communicating with. When you're the client, the other party (which, once the connection is establis

Re: stackoverflow and c.l.py

2011-09-14 Thread Thomas Jollans
On 14/09/11 21:00, Duncan Booth wrote: > Roy Smith wrote: > >> In article , >> Duncan Booth wrote: >> >>> If you want an answer to how to get a specific bit of code to work then >>> Stackoverflow is better if only because people can see who has already >>> answered so don't need to waste time

Re: Turkic I and re

2011-09-16 Thread Thomas Rachel
have the three pairs I, i ("normal") I (other one), ı and İ, i (the other one). But alas, they haven't. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a list value from key/value pair

2011-09-18 Thread Thomas Jollans
On 18/09/11 11:39, Kayode Odeyemi wrote: > Hi all, > > If I have a list with key/value pair, how do I get the value of the key? > > I'm working with this code snippet: Python 3.2.2 (default, Sep 5 2011, 04:33:58) [GCC 4.6.1 20110819 (prerelease)] on linux2 Type "help", "copyright", "credits" or

Re: Where can I find a lexical spec of python?

2011-09-21 Thread Thomas Jollans
is inconsisten with the spec (section 2.1.8): """ Indentation is rejected as inconsistent if a source file mixes tabs and spaces in a way that makes the meaning dependent on the worth of a tab in spaces; a TabError is raised in that case. """ - Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Where can I find a lexical spec of python?

2011-09-21 Thread Thomas Jollans
On 21/09/11 18:33, 程劭非 wrote: > Thanks Thomas. > I've read the document > http://docs.python.org/py3k/reference/lexical_analysis.html > > but I worried it might leak some language features like "tab magic". > > For I'm working on a parser with JavaScri

Re: Where can I find a lexical spec of python?

2011-09-21 Thread Thomas Jollans
t you have already seen. However, I am of the opinion that it gives you all the information you need, and that a complete formal grammar, while perhaps, for you, easier to interpret, would not add any information. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Environment variables not visible from Python

2011-09-22 Thread Thomas Rachel
$ python -c 'import os; print "\n".join(os.getenv(k) or "" for k in ("LINES","COLUMNS","TERM"))' linux $ export LINES $ python -c 'import os; print "\n".join(os.getenv(k) or "" for k in ("LINES","COLUMNS","TERM"))' 24 linux $ export COLUMNS $ python -c 'import os; print "\n".join(os.getenv(k) or "" for k in ("LINES","COLUMNS","TERM"))' 24 80 linux $ HTH, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python deadlock using subprocess.popen and communicate

2011-09-22 Thread Thomas Rachel
bprocesses that have an undetermined amount of output. Just handle process.stdout/stderr by yourself - read it out until EOF and then wait() for the process. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Environment variables not visible from Python

2011-09-22 Thread Thomas Rachel
Am 22.09.2011 12:16 schrieb Ben Finney: -- \ “As far as the laws of mathematics refer to reality, they are | `\not certain, and as far as they are certain, they do not refer | _o__) to reality.” —Albert Einstein, 1983 | Ben Finney So, he said what in

Re: Context manager with class methods

2011-09-22 Thread Thomas Rachel
traceback): print("__exit__") with Foo: pass However, in 2.7 and 3.2 I get: Traceback (most recent call last): File "", line 1, in AttributeError: __exit__ Same here. But with Foo(): pass works, and that is more important and

Re: Python Mixins

2011-09-22 Thread Thomas Jollans
s really a more formalised way of doing just this: using multiple inheritance (which, beyond interfaces, Vala does not support) to mix in functionality. Oh and your thing looks kind of neat. Thomas > I've got an Animal that does animal things, a Cat that does cat things > and a Dog that doe

Re: Python without a tty

2011-09-29 Thread Thomas Jollans
On 29/09/11 11:21, Steven D'Aprano wrote: > I have a Python script which I would like to test without a tty attached > to the process. I could run it as a cron job, but is there an easier way? > > I am running Linux. > ./program /dev/null 2>&1 -- http://mail.python.org/mailman/listinfo/python

Re: os.startfile: Why is there no arguments option?

2011-10-12 Thread Thomas Rachel
and/or subprocess.Popen() resp. .call()? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: os.startfile: Why is there no arguments option?

2011-10-12 Thread Thomas Heller
d run (with 'runas' as option) and without arguments of limited use. [1] http://docs.python.org/library/os.html?highlight=startfile#os.startfile Thanks, Christian It is trivial to call ShellExecute with ctypes. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple threads

2011-11-16 Thread Thomas Rachel
st for fname in list: % launch process ... sp = subprocess.Popen(...) % ... and register it. processes.append(sp) % If we are on the limit, wait for process to finish. do_waiting(LIMIT) do_waiting(1) Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: staticmethod makes my brain hurt

2011-11-17 Thread Thomas Rachel
30> >>> s.__get__(C(), C) at 0x00B43E30> That's how things work. If you want to get back the "real" function from a staticmethod, you either call its __get__ with an arbitrary argument, or you do it the clean way and do a def deref(s): class C(object

Twisted 11.1.0 Released

2011-11-17 Thread Thomas Hervé
://pypi.python.org/packages/2.7/T/Twisted/Twisted-11.1.0.win32-py2.7.msi Thanks to the supporters of the Twisted Software Foundation and to the many contributors for this release. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: What exactly is "pass"? What should it be?

2011-11-18 Thread Thomas Rachel
get of 1 0 LOAD_CONST 0 (None) 3 RETURN_VALUE I don't think that a call is sooo expensive that it would make any noticeable difference. Thomas BTW: Sorry, Dennis, for the private mail - I am incapable to use Thunderbird correctly :-( -- http://mail.python.org/mailman/listinfo/python-list

get date from email

2011-12-01 Thread Thomas Guettler
.mktime_tz(date_tuple)) if date: ... # valid date found Somehow this looks too complicated. Any chance to integrate the datetime module into the email module? related: http://stackoverflow.com/questions/1790795/python-parsing-date-with-timezone-from-an-email -- Thomas Guettler, http://

Re: I love the decorator in Python!!!

2011-12-08 Thread Thomas Rachel
John" yield "Theo" return "The following people were here: " + people Many other things are thinkable... Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: I love the decorator in Python!!!

2011-12-09 Thread Thomas Rachel
# namespace variety small. return self.gen() @GeneratorIterable def mygen(): yield 1 yield 2 list(mygen) -> [1, 2] list(mygen) -> [1, 2] # again, without the () Might be useful if the object is to be transferred to somewhere else. * Some of these decorators are more useful, some less if seen standalone, but very handy if creating other decorators. HTH nevertheless, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: unittest. customizing tstloaders / discover()

2011-12-11 Thread Thomas Bach
Gelonida N writes: > I'd like to use regular expresions as include / exclude rules > and I would like to have another filter function, which would check for > the existence of certain metavariabels in test suite files Did you have a look at nose? I'm using it and it supports include/exclude rule

Re: unittest. customizing tstloaders / discover()

2011-12-12 Thread Thomas Bach
Gelonida N writes: > Do I loose anything if using nose. or example can all unit tests / doc > tests still be run from nose? AFAIK you don't loose anything by using nose – the unittests should all be found and doctests can be run via `--with-doctest', I never used doctests though. regards -- ht

Re: Getting the current directory path and the path where python script is saved

2011-12-13 Thread Thomas Bach
gialloporpora writes: > I would like to know how to obtain the path where script is executed > and the path where the file script is stored. Does this help: In [16]: import os In [19]: os.getcwd() Out[19]: '/home/vince' In [21]: os.__file__ Out[21]: '/home/vince/src/pyramid_install/lib/python

Re: Class: @property -> .__dict__

2011-12-16 Thread Thomas Rachel
call and the value is, in your case, derived from the instance value a. HTH, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: what does 'a=b=c=[]' do

2011-12-24 Thread Thomas Rachel
for a in range(n): yield , , \ ) x, y, z = zip(*create_xyz(11)) or, if you want x, y, z to be lists, x, y, z = [list(i) for i in zip(*create_xyz(11))] . Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: what does 'a=b=c=[]' do

2011-12-24 Thread Thomas Rachel
ithout the round brackets, it is a syntax error. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: what does 'a=b=c=[]' do

2011-12-24 Thread Thomas Rachel
at [] creates *one* object which is then assigned to the three names. That's the same for mutable and immutable objects. But only the modification which happens on mutable objects turns it into a problem. The rest o your explanation is 100% correct. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-02 Thread Thomas Rachel
Am 22.12.2011 15:40 schrieb Νικόλαος Κούρας: Hello when i try to visit my webpage i get the error it displays. Iam not posting it since you can see it by visiting my webpage at http://superhost.gr Please if you can tell me what might be wrong. What is wrong on this site? Mainly the unwanted so

Re: How to support a non-standard encoding?

2012-01-08 Thread Thomas Rachel
a created [*] as helper. It's not so complicate. Use Py2 or Py3 (the recommended way ;-) ) as pivot encoding. These coding/decoding functions are exactly the way to create a codec. I. e., it is not much more. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error

2012-01-09 Thread Thomas Rachel
e away, you have the chance to reach the 2nd one... Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Explanation about for

2012-01-10 Thread Thomas Rachel
t, date in dataset: is shorthand for for anyunusedvariablename in dataset: # take complete row host, hits, agent, date = anyunusedvariablename # tuple unpacking del anyunusedvariablename # remove traces exept that the said variable isn't created. Thomas -- http://mail.python.org/mailman/

Re: Explanation about for

2012-01-10 Thread Thomas Rachel
1'); # which is the same as # a = 'foo'; b = 7; c = 'IE6'; d = '1/1/11'; do_funny_stuff(a, d, c, b) a, b, c, d = ('bar',42,'Firefox','2/2/10') do_funny_stuff(a, d, c, b) a, b, c, d = ('baz',4,'Chrome','3/3/09') do_funny_stuff(a, d, c, b) The "body" of the for suite is executed once for each element. You have read already http://docs.python.org/tutorial/controlflow.html#for-statements http://docs.python.org/library/stdtypes.html#iterator-types ? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: pipe into preallocated buffer?

2012-01-11 Thread Thomas Rachel
. A file object used in the subprocess context needs a fileno() method. StringIO objects don't have such. Probably it is necessary to use subprocess.communicate() (for rather small data lengths) or to use sp.stdout.read() to read it manually. Thomas -- http://mail.python.org/mailman/lis

Re: Finding x is 1, and x is 'foo' comparisons in a code base

2012-01-17 Thread Thomas Heller
Am 17.01.2012 18:10, schrieb Alex Willmer: Hello, I'm looking for a way to find the occurrences of x is y comparisons in an existing code base. Except for a few special cases (e.g. x is [not] None) they're a usually mistakes, the correct test being x == y. However they happen to work most of the

Re: Implicit conversion to boolean in if and while statements

2013-02-08 Thread Thomas Rachel
f x: yield x for db in ifiter(connect("my:db")): Is not very intuitive, however, but does its job. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit conversion to boolean in if and while statements

2013-02-10 Thread Thomas Rachel
d fpr frozensets, such as {{ }} or something. (Although that might clutter with a set containing a set.) Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: inheritance and how to use it

2013-02-15 Thread Thomas Rachel
in it: x = myClass("argument") x.clear() Here the clear() is called on the object which has been created, so after calling the __init__() above (which is, roughly, equivalent to calling it at the bottom of __init__()). Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: A new webpage promoting Compiler technology for CPython

2013-02-17 Thread Thomas Heller
page: http://pypi.python.org/pypi/pycparser Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: improving performance of writing into a pipe

2013-02-18 Thread Thomas Rachel
#x27;t return until in another terminal I open the same queue for reading (???) That's normal. An open call to a pipe blocks until someone reads from it. But it's the same with your popen() version. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: IOerror : need urgent help

2013-02-19 Thread Thomas Calmant
hi It seems you forgot to escape the escape character in the file names ('\'): "C:\Users\inshu.chauhan\Desktop\test.arff" => r"C:\Users\inshu.chauhan\Desktop\test.arff" or => "C:\\Users\\inshu.chauhan\\Desktop\\test.arff" ++ Thomas 2013/2/19 in

Re: Python module import failed error

2013-02-19 Thread Thomas Calmant
Hi, Do you run Python in the same terminal than where you run the export command ? ++ Thomas 2013/2/19 > My guess would be /home/matt/bin - note the leading slash. > > > > > > > > ChrisA > > correct. and in the home directory i run export > PYTHONPATH=$

Re: "The urlopen() and urlretrieve() functions can cause arbitrarily long delays"

2013-02-24 Thread Thomas Rachel
Of course not for the long term. But you could check e.g. if MSN needs 60 s as well from the browser. If not, there could be something else wrong. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: This mail never gets delivered. Any ideas why?

2013-03-10 Thread Thomas Rachel
\n\n%s" % \ (FROM, ", ".join(TO), SUBJECT, TEXT) in order to get a useful result. And, as you are working on it, don't use os.popen - it is deprecated. Better use subprocess: replace p = os.popen("%s -t -i" % SENDMAIL, "w") p.write(messa

Re: This mail never gets delivered. Any ideas why?

2013-03-10 Thread Thomas Rachel
Am 11.03.2013 06:25 schrieb Thomas Rachel: 1. Your subject is not properly encoded. All characters outside the ASCII area must be encoded in an appropriate way if you send an email. It MIGHT be the case that sendmail handles this for you, but probably not every version. Mine not, at least

Re: This mail never gets delivered. Any ideas why?

2013-03-10 Thread Thomas Rachel
Am 11.03.2013 06:47 schrieb Thomas Rachel: # either message.add_header('Subject', email.quoprimime.header_encode(SUBJECT)) # or message.add_header('Subject', email.base64mime.header_encode(SUBJECT)) Sorry! These were completely wrong. # either message

Re: This mail never gets delivered. Any ideas why?

2013-03-11 Thread Thomas Rachel
Am 11.03.2013 10:15 schrieb nagia.rets...@gmail.com: Thank you Thomas but that simple line as i have it now its capable of sending mail successfully Obviously not, otherwise you wouldn't ask, would you? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: This mail never gets delivered. Any ideas why?

2013-03-11 Thread Thomas Rachel
(Note that I changed the arguments for mail a little bit, because -s prevedes the subject and -f the from.) Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: del not working for (exhausted) dict iterable value (Python 3.3)

2013-03-12 Thread Thomas Rachel
ple times - and so does the del statement. A event = dict(Items=[1,2,3]) for e in event['Items']: if 'Items' in event: del event['Items'] runs perfectly, as the iterable is transformed to an iterator at the very start of the loop. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Unicode

2013-03-15 Thread Thomas Heller
cter '\u03bc' in position 0: character maps to Using (german) windows, command prompt, codepage 850. The same happens with Python 2.7. What am I doing wrong? Thanks, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode

2013-03-15 Thread Thomas Heller
Am 15.03.2013 11:58, schrieb Steven D'Aprano: On Fri, 15 Mar 2013 11:46:36 +0100, Thomas Heller wrote: [Windows: Problems with unicode output to console] You can isolate the error by noting that the second one only raises an exception when you try to print it. That suggests that the pr

Twisted 13.0.0 released

2013-04-03 Thread Thomas Hervé
porters of Twisted via the Software Freedom Conservancy and to the many contributors for this release. -- Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: is "_io.py" missing from 2.7.4 ?

2013-04-08 Thread Thomas Rachel
t;> import win32ui >>> win32ui 'C:\Python27\lib\site-packages\Pythonwin\win32ui.pyd'> and >>> import os >>> os Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: use a loop to create lists

2013-04-11 Thread Thomas Goebel
* On 10/04/2013 10:40, martaamu...@gmail.com wrote: > Hi! > > I would like to create a list containing lists. I need each list to > have a differente name and i would like to use a loop to name the > list. > [...] > global_list=[] > for i in range (20): > ("list_"+i)=[] #These would be the n

Re: use a loop to create lists

2013-04-11 Thread Thomas Goebel
* On 11/04/2013 14:11, Franz Kelnreiter wrote: > On Thu, Apr 11, 2013 at 1:46 PM, Thomas Goebel wrote: >> >> the difference between your and my code is that >> >> global_list = {'_'.join(['list', str(i)]):[] for i in range(20)} >> >>

Re: Fwd: use a loop to create lists

2013-04-11 Thread Thomas Goebel
* On 11/04/2013 14:11, Franz Kelnreiter wrote: > On Thu, Apr 11, 2013 at 1:46 PM, Thomas Goebel wrote: > >> global_list = {'_'.join(['list', str(i)]):[] for i in range(20)} > > Thanks for your explanation, I think I know what you want to do and I would >

Re: use a loop to create lists

2013-04-11 Thread Thomas Goebel
* On 11/04/2013 16:11, Franz Kelnreiter wrote: > On Thu, Apr 11, 2013 at 2:57 PM, Thomas Goebel < > thomas.goe...@ohm-hochschule.de> wrote: > >> ... >> Which is the same as: >> f = {'list_' + str(n):[m for m in range(3)] for n in range(3)} >> >

Module import hook

2013-04-16 Thread Thomas Calmant
method to handle a module file path. For the package loading, the implementation in loader.py is based on pkgutil.iter_modules. This part seems to work, but I'm facing the bugs described in the first point. Once again, which mechanisms would you use to do that ? Thanks for your answers :) Regards, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: python and VisualFox dbf

2005-12-11 Thread Thomas Ganss
was also supported via ODBC, but you have to make sure that you are accessing the dbf's exclusively. HTH thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: python24.dll and encodings ?

2005-12-14 Thread Thomas Heller
us maintainer > (Tim Peters) said this about the state of affairs in 2003: > > http://mail.python.org/pipermail/python-dev/2003-October/038639.html > > I offered a policy in: > > http://mail.python.org/pipermail/python-dev/2003-October/038636.html > > Thomas Heller proposed an

Re: python24.dll and encodings ?

2005-12-16 Thread Thomas Heller
Bugs <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: > [snip] >> A PEP discussing the rationales would *really* be great. > > My whole impetus for this thread was to minimize the size of Python > executables created with py2exe. Right now they tend to be rather &

Re: Python and curses

2005-12-16 Thread Thomas Dickey
did none of the work. -- Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net -- http://mail.python.org/mailman/listinfo/python-list

Re: SMP, GIL and Threads

2005-12-16 Thread Thomas Heller
dictionary changes >> just before it does a read. >> > I believe dictionary access is an atomic operation wrt thread > switches anyway, so I'm (again) not sure why a thread is hanging. Well, there's at least the 'do not mutate a dictionary (or list) while iterating over

Re: Testing the availability of a module

2005-12-19 Thread Thomas Heller
ter off just checking > for a successful import like you're doing now. I don't think the above is entirely correct. imp.find_module() probably does what the OP needs. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-22 Thread Thomas Wouters
it wouldn't be able to do that. Trust me. Not-brainwashed-after-a-long-but-utterly-unsuspicious-and-PSU-unrelated-absense'ly y'rs, -- Thomas Wouters <[EMAIL PROTECTED]> Hi! I'm a .signature virus! copy me into your .signature file to help me spread! -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido at Google

2005-12-22 Thread Thomas Wouters
th everything they think up next. And they're friendly people, to boot. A higher evolution *might* contribute to Python's success. It may also contribute to its downfall. Forcing an open-source community to do something it doesn't want to do will *certainly* lead to its downfall.

Re: Indentation/whitespace

2005-12-23 Thread Thomas Bartkus
note and not argue about "why indentation is good" But - why should Python "support s syntax the does not use it's infamous whitespace rules" It's unique to Python. That's what Python *is*. If one doesn't like it, one needn't waste one's ti

Re: sorting with expensive compares?

2005-12-25 Thread Thomas Wouters
layable with a subliminal message the target is likely to respond to. Calculate-me-odds-on-THAT--ly 'yrs, -- Thomas Wouters <[EMAIL PROTECTED]> Hi! I'm a .signature virus! copy me into your .signature file to help me spread! -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon TX 2006: Early-bird registration ends Dec. 31!

2005-12-28 Thread Thomas Wouters
most of the nights, and the 3-4 person special rate (still cheaper than most alternatives) the three troublesome nights. Anyone still trying to get their hotel reserved might want to keep this in mind. A-hotel-with-rooms-"out-of-stock"--what's-next-ly y'rs, -- Thomas Wouters <

Modifying values in a list

2005-12-29 Thread tron . thomas
The following code: numbers = [1, 2, 3] for value in numbers: value *= 2 print numbers results in the following output: [1, 2, 3] The intent of the code was to produce this output: [2, 4, 6] What is the reason for the output produced? What code should be used to obtain the desired outpu

<    13   14   15   16   17   18   19   20   21   22   >