[ANN] [Hack] Import binary extensions from zipfiles, windows only

2004-12-16 Thread Thomas Heller
=== reload() on already imported extension modules does not work correctly: It happily loads the extension a second time. http://starship.python.net/crew/theller/moin.cgi/Hacks_2fZipExtImporter Cheers, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are tuples immutable?

2004-12-16 Thread Thomas Heller
ity? Smalltalk has separate Dictionary and IdentityDictionary classes. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: why not arrays?

2004-12-16 Thread Thomas Bartkus
the joys associated with memory allocation/deallocation :-) Thomas Bartkus "Rahul" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi. > I just wanted to know why arrays have not been included as a builtin > datatype like lists or dictionaries? The numpy exten

Re: BASIC vs Python

2004-12-16 Thread Thomas Bartkus
rience. So Similar to BASIC - no! Great language for beginning programmers - yes! Thomas Bartkus "abisofile" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > hi > > I'm new to programming.I've try a little BASIC so I want ask since >

Re: [ANN] [Hack] Import binary extensions from zipfiles, windows only

2004-12-17 Thread Thomas Heller
"Delaney, Timothy C (Timothy)" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: > >> zipextimporter.py contains the ZipExtImporter class which allows to >> load Python binary extension modules contained in a zip.archive, >> without unpacking them to the

Re: pywhich script - where is that module?

2004-12-17 Thread Thomas Guettler
Am Fri, 17 Dec 2004 09:09:25 + schrieb Keith Dart: > Have you ever wondered where your python modules get imported from? > Here is a little script, called "pywhich", that will tell you. Nice, you could add it to the python cookbook. Thomas -- Thomas Güttler, h

Re: Potential improvement on delegation via explicit calls and super

2004-12-17 Thread Thomas Guettler
n change the source of Base, I would do it like this: class Base: _init_done=0 def __init__(self): if self._init_done: return self._init_done=1 # ... do init Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: BASIC vs Python

2004-12-17 Thread Thomas Bartkus
"Mike Meyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Thomas Bartkus" <[EMAIL PROTECTED]> writes: > > > The "interpreted" nature of the existing Python language has little to do > > with how it compares to other la

type method-wrapper?

2004-12-20 Thread Thomas Guettler
Hi, l=[] print type(l.__delattr__) # --> I didn't find a corresponding type in the modules "types". Is it missing or am I blind? (Python 2.3.3) -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Recursive structures

2004-12-20 Thread Thomas Guettler
uot;]="foo2" assert(not isrecursive(d)) d["foo3"]=d assert(isrecursive(d)) if __name__=="__main__": test_isrecursive() -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Email filters in python

2004-12-20 Thread Thomas Guettler
ative for fetchmail. Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Thomas Heller
r brauchbaren IDE gemausert und Java selber hat -- trotz der geschweiften Klammern -- doch soviel von Oberon geerbt, daß ich nicht gleich Pickel bekomme, wenn ich darin programmieren muß. ;o) Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Change vars in the parent process

2004-12-21 Thread Thomas Guettler
Am Tue, 21 Dec 2004 06:20:09 -0800 schrieb Markus Franz: > Hi! > > > Is there any possibility to change vars inside a parent process from > the inside of a child process? > Thanks Hi, No, that's impossible. At least on unix. Thomas -- Thomas Güttler, http:/

Re: Problem with msvcrt60 vs. msvcr71 vs. strdup/free

2004-12-21 Thread Thomas Heller
e (I can only guess wht this file does) *libgcc: %{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt with this one: *libgcc: %{mthreads:-lmingwthrd} -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcr71 seemed to do the trick. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Read word tables

2004-12-21 Thread Thomas Guettler
ave a sample code to read a table? Hi, There is a small script[1] which parses the XML produced by Excel. Something like this should be possible for msword, too. Other way: You can export to the openoffice format and unzip it. The read these xml files. HTH, Thomas [1]:http://aspn.activesta

Re: getting env variable from bourne shell script

2004-12-21 Thread Thomas Guettler
t;release" [5]="i586-suse-linux") BASH_VERSION='2.05b.0(1)-release' COLORTERM=1 COLUMNS=143 CPU=i686 CVSROOT=:ext:[EMAIL PROTECTED]:/raid/develop CVS_RSH=ssh you could use '^(.*?)=(.*)$' as regex to parse each line group(1) is the variable name group(2) the

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Thomas Heller
t; > Soon it will be possible to become a well-known programmer > without writing any code at all; just issue grandiose manifestos and plans > until everyone is suitably impressed. I hope that I'm retired then. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Unicode entries on sys.path

2004-12-23 Thread Thomas Heller
icode entries in sys.path to normal strings using windows default conversion rules - is this a problem that I can fix by changing some regional setting on my machine? Hm, maybe more a windows question than a python question... Thanks, Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode entries on sys.path

2004-12-27 Thread Thomas Heller
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: >> It seems that Python itself converts unicode entries in sys.path to >> normal strings using windows default conversion rules - is this a >> problem that I can fix by changing some region

getattr() woes

2004-12-28 Thread Thomas Rast
an be done about this? If there are no better solutions, perhaps the documentation for property() could point out this pitfall? - Thomas -- If you want to reply by mail, substitute my first and last name for 'foo' and 'bar', respectively, and remove '.invalid'. -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode entries on sys.path

2004-12-29 Thread Thomas Heller
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: >> How should these patches be approached? > > Please have a look as to how posixmodule.c and fileobject.c deal with > this issue. > >> On windows, it would probably >> be eas

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Thomas Heller
cause I know I just won't be able to accomodate > all the requests/advice, given the constraints on book size &c. I found the discussion of unicode, in any python book I have, insufficient. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: calling functions across threads

2004-12-29 Thread Thomas Rast
plain to me why this happens, and how (if possible) I can > get the numbers printed in sync with the appends to the list? I tried your code, and got the expected behaviour, i.e. the numbers are printed every half second. Maybe you have a buffering problem? $ python2.4 -V Python 2.4 $ uname -a Li

Re: Tkinter vs wxPython

2004-12-29 Thread Thomas Bartkus
ndows, it follows that desktop theme. Both Gnome and Windows XP alter the the controls design according to user preferences. wxPython GUIs reflect this automatically and the controls always look and work like the underlying system. I may be wrong but I don't think you get that with TKinter! Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: The Industry choice

2004-12-30 Thread Thomas Bartkus
ny viable, technical reasons for that? Are there "viable, technical reasons"? That would be doubtful. But There is a reason very important to major companies. When you leave that company, there will be a *long* line of Java programmers waiting to take your place. There need b

Re: How to use subprocess

2005-03-23 Thread Thomas Bellman
lass. It doesn't do exactly what you want, but maybe you can use it as inspiration for doing it yourself. It requires the subprocess module, but I have successfully used it under Python 2.3.2 with subprocess installed locally. -- Thomas Bellman, Lysator Computer Club, Linköping Univer

Re: PyGTK Button Size Question

2005-03-23 Thread Thomas Guettler
equest HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list

Re: wanted: visual report templating system

2005-03-23 Thread Thomas Guettler
ta files > 2. a visual designer in which a nontechnical person can create a > report layout template (supporting charts, text, graphics, etc.) > 3. a server engine to merge the two and create on-the-fly reports when > requested programmatically. Hi, You can script openoffice with pyUNO.

Re: IronPython 0.7 released!

2005-03-23 Thread Thomas Heller
;t do M$ > Passport logins which it seems the gotdotnet site requires. Robin - we're too old for blogs ;-) But I could download the thingie with Mozilla without logging in into somewhere - although the bug tracker seems to require login. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Example Code - Named Pipes (Python 2.4 + ctypes on Windows)

2005-03-26 Thread Thomas Heller
n Win32" but I > do not have access to it at present. At least one chapter of PPW32 is available as sample chapter somewhere on an OReilly site - but you should buy the book anyway imo. For the windows api functions you should refer to Microsoft's docs at MSDN. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Example Code - Named Pipes (Python 2.4 + ctypes on Windows)

2005-03-26 Thread Thomas Heller
Harald Massa <[EMAIL PROTECTED]> writes: > "Srijit Kumar Bhadra" <[EMAIL PROTECTED]> wrote in >> Here is an example of Multithreaded Pipe Server and Client using the >> excellent ctypes library (Windows). > > Excellent. Maybe you would also like to post it to the > > http://starship.python.net/cre

Re: Things you shouldn't do

2005-03-30 Thread Thomas Bartkus
"Steve" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What are some of other people's favourite tips for > avoiding bugs in the first place, as opposed to finding > them once you know they are there? > Fonts with slashed zeros and serifs. -Tom -- http://mail.python.org/mailman

Re: class attributes and inner classes in C extensions

2005-04-01 Thread Thomas Heller
urself with PyObject_SetAttrString(FooType, "Bar", FooBarType); You *may* have to cast the FooType and FooBarType to (PyObject *), to avoid compiler warnings. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Performance issue

2005-04-02 Thread Thomas Rast
$ time echo stop | python2.4 anagram_forloop.py [...] real0m0.221s user0m0.134s sys 0m0.014s * My version but with the length comparison removed: $ time echo stop | python2.4 anagram_no_lencmp.py [...] real0m0.408s user0m0.353s sys 0m0.010s * My version as above: $ time echo stop | python2.4 anagram_fast.py [...] real0m0.144s user0m0.099s sys 0m0.008s Hope that helps :-) - Thomas -- If you want to reply by mail, substitute my first and last name for 'foo' and 'bar', respectively, and remove '.invalid'. -- http://mail.python.org/mailman/listinfo/python-list

Re: Name of IDLE on Linux

2005-04-02 Thread Thomas Rast
cumentation files there. - Thomas -- If you want to reply by mail, substitute my first and last name for 'foo' and 'bar', respectively, and remove '.invalid'. -- http://mail.python.org/mailman/listinfo/python-list

Re: Change between Python 2.3 and 2.4 under WinXP

2005-04-05 Thread Thomas Heller
Maybe off-topic for this thread, but I noticed that when installing > 2.4.1 that 2.4.0 is automatically removed. Does 2.4 do the same thing > to 2.3 versions? No. 2.4 and 2.3 (and other versions) can coexist. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython 0.7 released!

2005-04-05 Thread Thomas Gagne
Does the Python community think Microsoft's embrace is a good or bad thing? James wrote: http://www.gotdotnet.com/workspaces/workspace.aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742 -- http://mail.python.org/mailman/listinfo/python-list

Does IronPython indicate MS interest in dynamic languages?

2005-04-05 Thread Thomas Gagne
Cameron Laird wrote: And now, for something completely different, I'll tender a personal view: I think Mr. Gates and Python are actually destined to get along uncharacteristically well. Roughly, I suspect the habits and motivations of the two are so skew, that the usual "embrace and extend" simp

Re: Problem with access to shared memory(W2K) / ORIGINALLY (win32) speedfan api control

2005-04-06 Thread Thomas Heller
hMapObject > ,FILE_MAP_ALL_ACCESS > ,0 > ,0 > ,0 > ) > > if (pBuf == 0): > print "Could not map view of file" > raise WinError() > else: > print repr(pBuf) > print repr(hMapObject) > > pBuf_str = cast(pBuf, c_char_p) > print repr(pBuf_str.value) > print repr(pBuf_str) > > pBuf_buf = cast(pBuf, Buffer) Here's the problem. pBuf is a pointer to a Buffer structure, not the buffer structure itself. Something like pBuf_buf = Buffer.from_address(pBuf) may work. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with access to shared memory(W2K) / ORIGINALLY (win32) speedfan api control

2005-04-06 Thread Thomas Heller
annot create an empty mapping on Windows). If I run it with non-zero length it does not raise an exception shmem = mmap.mmap(0, 0, "$M$B$M$5$S$D$", mmap.ACCESS_READ) although it *creates* the shared memory block, IIUC. Are you sure your speedfan app is running when you get the WindowsError? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: decorating functions with generic signatures (not for the faint of heart)

2005-04-08 Thread Thomas Heller
ve also done some time ago. Maybe the following code snippet is useful for you - it creates a source code string which can than be compiled. The code prints this when run: """ def f(a, b=42, c='spam', d=None): 'docstring' return f._api_(a, b, c, d) def

Re: UselessPython 2.0

2005-04-10 Thread Thomas Moore
I guess when useless, nothing cannot be done. - Original Message - From: <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: Sent: Monday, April 11, 2005 12:17 AM Subject: Re: UselessPython 2.0 > Nice idea for a site, but I suggest renaming it to something like > FunPython.com . My gu

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-11 Thread Thomas Heller
ly a step backwards in usability. For commercial development, it should not be a problem to buy a license for MSVC 7.1, which gives you the right to distribute msvcrt71.dll. And maybe that's the reason that few people care about this issue? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-12 Thread Thomas Heller
ect the presence/absence of the needed Python version and > offer an auto download and install if needed. Sure. Someone. > > At least one thing in Python's favor is the lack of having to 'register' > before downloading (or after installation) and the ability to redistri

Re: Python 2.4 killing commercial Windows Python development ?

2005-04-12 Thread Thomas Heller
ll launcher executable, because on > Windows it's non-trivial to find out which "python.exe" in the task > manager is running which Python script. Anyway, each app would have a > small launcher that bootstraps the actual Python script[1]. (Or, if > there's some way to

Re: distribute python script

2005-04-14 Thread Thomas Heller
d I'm monitoring this group, but I hope you understand the I cannot spend too much time to debug each problem reported. A very common problem with py2exe has to do with encodings (google for "EncodingsAgain", and you will find a wiki page explaining this), but this is pure spec

Re: distribute python script

2005-04-14 Thread Thomas Heller
"codecraig" <[EMAIL PROTECTED]> writes: > Thanks so much Thomas!!! I added encodings to my setup's...here it is > > setup(console=[{"script": 'monkey_shell.py'}], options={"py2exe": > {"packages": ["encodings"]}}

new to mac OS10

2005-04-14 Thread Thomas Nelson
I'm on a mac OS X (10.3.8), and I seem to have accidentally destroyed the default python installation. How should I put it on? Do I need to use the unix version? any help would be greatly appreciated. THN -- http://mail.python.org/mailman/listinfo/python-list

Re: new to mac OS10

2005-04-14 Thread Thomas Nelson
Maurice LING wrote: I'm using OSX 10.3.8 as well. Just wondering, how did you "destroy" it? What I am thinking is, it may not be as destroyed as you think it might have... cheers maurice I was actually trying to update to the newest python version, and I had read something saying it would confl

Re: sort of a beginner question about globals

2005-04-15 Thread Thomas Heller
pment" by Kent Beck (Addison-Wesley). Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: new to mac OS10

2005-04-15 Thread Thomas Nelson
The main thing I would like is to be able to use tkinter with python on my mac. will the command-line-style source allow this? Does it come with IDLE? How is the fink version different from the source i can download at python.org? Here's the result of the requested commands on my Terminal.

Re: IPython - problem with using US international keyboard input scheme on W2K

2005-04-16 Thread Thomas Heller
write code for my own use. If others benefit > that is great. If it doesn't do what you want, make your own > version. If you want to distribute a new version, go for it. Maybe it would make sense then to maintain the readline code in the ctypes CVS repository, since it requires ctypes anyway? Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: pydoc preference for triple double over triple single quotes -- any reason?

2005-04-16 Thread Thomas Rast
uotes are treated as ordinary quotes, which breaks '''This doesn't work''' but not """This'll work""" due to the apostrophe. pydoc then probably decided to follow PEP 257 which says For consistency, always use ""&qu

Re: Regular Expressions - Python vs Perl

2005-04-21 Thread Thomas Bartkus
ftware - think how much more the world gains in software quality and quantity. How about man hours saved? Why does anyone still waste so much angst over execution speed? I doubt the total execution time for all the RegEx queries you ever ran took as much time as you just wasted on your little exper

Re: Regular Expressions - Python vs Perl

2005-04-21 Thread Thomas Bartkus
"codecraig" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I found some benchmarking (perhaps simple) but search for "The Great > Computer language shootout" look at the original shootout and the > win32 one. > > Thomas: > "I

Re: Regular Expressions - Python vs Perl

2005-04-21 Thread Thomas Bartkus
If gonzo RegEx query performance was of utmost importance, would anyone put either of Perl or Python at the top of his list? Thomas Bartkus -- http://mail.python.org/mailman/listinfo/python-list

Re: Python callbacks & PyGILState_Release()

2005-04-23 Thread Thomas Heller
if (pyresult == NULL) PyErr_Print(); > // Free interpreter lock > PyGILState_Release(gstate); > } PyErr_Print() will do the 'right' thing´s. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: How to start python interactively from python script?

2005-04-26 Thread Thomas Heller
PYTHONINSPECT"] = "1"' at the somewher in your script. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: how to pass an array to a VB array via COM

2005-04-26 Thread Thomas Heller
when i send a > tuple: > > RS.AddCurve(((1,2,3),(4,5,6),(7,8,9)),3) To me it looks like you should try this instead, although this is pure speculation: RS.AddCurve(((1,2,3),(4,5,6),(7,8,9))) Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: win32ui CreateFileDialog SLOW (since the SP2 Windows XP patch?)

2005-04-28 Thread Thomas Ganss
connected to a network ? By any chance an older server (W2K,NT4) there ? There were some issues... HTH thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: Suggest an open-source issue tracker, with github integration and kanban boards?

2013-11-16 Thread Thomas Mlynarczyk
ld it? Greetings, Thomas -- Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison! (Coluche) -- https://mail.python.org/mailman/listinfo/python-list

Python RPM distribution with altinstall on Centos 5

2013-11-19 Thread thomas . lehmann
root build's still in place) - how to create a RPM for this concrete Centos 5 - Python version with the "altinstall" feature? (!! we require this !!) Maybe you also have another idea on how to solve this Kind Regards, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Terry Jones: "Monty Python to reunite for stage show"

2013-11-19 Thread Thomas Heller
"All of the surviving members of comedy group Monty Python are to reform for a stage show, one of the Pythons, Terry Jones, has confirmed." See: http://www.bbc.co.uk/news/entertainment-arts-24999401 Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: how to get raw bytes for ctypes functions that return c_wchar_p

2013-11-19 Thread Thomas Heller
wchar_p is converted from/to Python strings. Unfortunately it seems to be gone in Python 3.3. However, you can set restype to POINTER(c_char) and then index the result: result = dplGetPageText(...) print(result[0], result[1], result[2]) Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Packaging a private project

2013-12-17 Thread Thomas Heller
xperienced developer it takes around one day to take these pieces and build a script that scans a python script, finds all the needed modules and packages, and uses pyzzer to build an executable archive from it. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: 'Straße' ('Strasse') and Python 2

2014-01-13 Thread Thomas Rachel
are just wrong, as s = 'Straße' leads - provided you use UTF8 - to a representation of 'Stra\xc3\x9fe', obviously leading to a length of 7. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: 'Straße' ('Strasse') and Python 2

2014-01-13 Thread Thomas Rachel
indows box at work: Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> assert 'Straße'[4] == 'ß' >>> assert u'Straße'[4] == u'ß' PS Nothing to do with Py2/Py3. As bytes and unicode and str stuff is heavily changed between them, of course it has to do. And I think you know that and try to confuse and FUD us all - with no avail. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 __bytes__ method

2014-01-15 Thread Thomas Rachel
r to save them into a file. IOW, the same purpose as we havd on __str__ in Py2. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: 1 > 0 == True -> False

2014-01-30 Thread Thomas Mlynarczyk
Thibault Langlois schrieb: 1 > 0 == True False What am I missing here ? This, perhaps: http://www.primozic.net/nl/chaining-comparison-operators-in-python/ Greetings, Thomas -- Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison! (Coluche) -- https

Pylint across Python versions

2014-02-10 Thread thomas . lehmann
about redefinition also it does not happen. How to get forward with this? Regards, Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Refactoring in a large code base

2016-01-22 Thread Thomas Mellman
On Fri, 22 Jan 2016 04:04:44 -0800, Rustom Mody wrote: > These are just specific examples that I am familiar with Chris' general > point still stands, viz take the large and complex program that is > cpython and clean up these messinesses: You will still have a large and > complex program I'm not

setup failed

2016-02-04 Thread Prince Thomas
Hi I am an computer science engineer. I downloaded the python version 3.5.1.amd64 and just python 3.5.1. The problem is when I install the program setup is failed and showing 0*80070570-The file or directory is corrupted and unreadable. I install the newest visual c++ redist and still same.

Re: %%(%s)s mean in python

2014-10-29 Thread Thomas Rachel
Am 29.10.2014 07:02 schrieb satishmlm...@gmail.com: What does %%(%s)s mean in Python? Weird question, as this has nothing to do with the code you just posted. In general, what comes up to my mind, is that it is a format string to build another format string. Example: metafmt = '%%(%s)s' f

bdist_rpm with --requires and version

2014-11-07 Thread thomas . lehmann
Hi, using the RPM build I wonder how I can require a certain version of another RPM like: Working: python setup.py bdist_rpm --requires=another-package But how to? ... python setup.py bdist_rpm --requires=another-package>=2.1 Of course this will generate a "=2.1" file which is of course not

Re: io.UnsupportedOperation: fileno

2014-11-14 Thread Thomas Rachel
Am 14.11.2014 00:42 schrieb satishmlm...@gmail.com: fileno() in not supported. Is it only in 3.1? What is the workaround? You have been asked many times about the details of your environment. Especially, you have been told that it is important to know if you directly use the Python CLI or som

Re: why can't download file from linux server into local window disk c:?

2014-12-08 Thread Thomas Rachel
at's completely clear: you are not allowed to create a file named 'c:'. You should replace it with a full path name, such as localpath = 'c:\\passwd' or such. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: why can't download file from linux server into local window disk c:?

2014-12-08 Thread Thomas Rachel
Am 08.12.2014 19:11 schrieb Luuk: no, it's the ssh-server denying a log on from 'root' You are repating yourself. How could possibly with open(localpath, 'wb') as fl: PermissionError: [Errno 13] Permission denied: 'c:' be a problem with the SSH server? -- https://mail.python.org/mailman

Re: Question on lambdas

2014-12-09 Thread Thomas Rachel
te_const_function(val): def inner_function(): return val or just create_const_function = lambda val: lambda: val and then f1 = create_const_function(4) f2 = create_const_function(5) print f1(), f2() et voilà. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: why can't download file from linux server into local window disk c:

2014-12-09 Thread Thomas Rachel
'c:' That's completely clear: you are not allowed to create a file named 'c:'. You should replace it with a full path name, such as localpath = 'c:\\passwd' or such. Thomas --- SoupGate-Win32 v1.05 * Origin: nntp.gatew...@.piz.noip.me> (1:249/999) --- Sy

Re: why can't download file from linux server into local window disk c:

2014-12-09 Thread Thomas Rachel
Am 08.12.2014 19:11 schrieb Luuk: > no, it's the ssh-server denying a log on from 'root' You are repating yourself. How could possibly with open(localpath, 'wb') as fl: PermissionError: [Errno 13] Permission denied: 'c:' be a problem with the SSH server? --- SoupGate-Win32 v1.05 * Origi

Help with finding tutors for Python, Linux, R, Perl, Octave, MATLAB and/or Cytoscape for yeast microarray analysis, next generation sequencing and constructing gene interaction networks

2015-01-03 Thread thomas hahn
text to speech software has problems to read out this website aloud to me? I thank you very much in advance for your thoughts, ideas, suggestions, recommendations, time, help, efforts and support. With very warm regards, *Thomas Hahn* 1)*Graduate student in the Joint Bioinformatics

Re: Best practices to overcome python's dynamic data type nature

2014-02-14 Thread Thomas Heller
enced Python programmers here advise? Unit tests. Lint-like tools - there are a few - also help to discover bugs, even before running or testing the code. They also help in other ways to write better code. Myself I use the 'frosted' tool. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Why Python 3?

2014-05-06 Thread Thomas Lehmann
Hi, I can't give you the advise for a concrete version anyway there are lot of arguments given by the other posters. BUT there is a way how you can circumvent the problem to some extend: Are you intending to use Jenkins? I don't want to convince you here why to use Jenkins but maybe I don't ne

My attempts in playing with tail-recursion in python

2013-08-28 Thread Thomas Baruchel
it that way: def B(func): x = (lambda f: (lambda x: x(x))(lambda y: f(lambda *args: lambda: y(y)(*args(func) def wrapper(*args): out = x(*args) while '__call__' in dir(out): out = out() return out return wrapper tr2 = B(fac) tr2(5

Re: Is there a function that applies list of functions to a value?

2013-08-28 Thread Thomas Rachel
like this: func_im_looking_for([func1, func2, func3, func4], myval) I looked in itertools but nothing seamed to do the job. This seams like something vary obvious that was needed many times elsewhere so maybe you could help me? reduce(lambda x, f: f(x), funcs, myval) would do the job. Thomas

Re: My attempts in playing with tail-recursion in python

2013-08-28 Thread Thomas Baruchel
Le 28-08-2013, Thomas Baruchel a écrit : > The following functions are fully usable; I hope someone will enjoy using > them. > > If you are not interested by the explanations, just jump to the end of the > message and take my functions for using them. Despite the very short size

Re: Newbie question related to Boolean in Python

2013-09-05 Thread Thomas Yang
bear_moved = False while True: next = raw_input("> ") if next == "take honey": dead("The bear looks at you then slaps your face off.") elif next == "taunt bear" and not bear_moved: print "The bear has moved from the door. You can go through

Re: Download all youtube favorites with youtube-dl script

2013-09-27 Thread Thomas Kandler
On 26.09.2013 17:13, Bill wrote: > I have been using the script youtube-dl http://rg3.github.io/youtube-dl/ > > And I was wondering if there is a way to download all of a user's > favorites or uploads. > > The script has a functionality to download all videos in a txt file. So > if there is a way

Re: Download all youtube favorites with youtube-dl script

2013-09-27 Thread Thomas Kandler
On 27.09.2013 21:50, Bill wrote: > Hi. > > A screenshot would help me locate it. > > Cheers Sure. http://i.imgur.com/LvrNZYO.png I don't thing *every* profile has this, but as I said, I use youtube-dl quite often this way. Best -- https://mail.python.org/mailman/listinfo/python-list

Re: Unlimited canvas painting program

2013-10-24 Thread Thomas Murphy
To start with, you'll want some sort of Graphic User Interface, a popular and common (but not the only) one is TkInter, which you can dive into here: https://wiki.python.org/moin/TkInter -- https://mail.python.org/mailman/listinfo/python-list

Re: New user's initial thoughts / criticisms of Python

2013-11-10 Thread Thomas Rachel
Am 09.11.2013 14:27 schrieb Joshua Landau: `select` is quite an odd statement, in that in most cases it's just a weaker variant of `if`. By the time you're at the point where a `select` is actually more readable you're also at the point where a different control flow is probably a better idea. T

Re: Md5 is different in Windows and Linux

2015-03-02 Thread Thomas Rachel
So just do f = open("somefile.txt", "rb") and you should be fine. I don't know which is worse, the fact that you're composing your message in HTML, or the fact that you're using Comic Sans as your font. #2 wouldn't be possible without #1... Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Worst Practices

2015-03-06 Thread Thomas Rachel
Am 26.02.2015 01:37 schrieb Chris Angelico: My bad. I was talking in a context of Python programming, specifically with APIs where you would use some kind of true/false flag as either a function parameter or a return value. Oh. Then take subprocess.Popen.wait()... :-P Thomas -- https

Re: Basic misunderstanding on object creation

2015-05-13 Thread Thomas Rachel
ow that we inherit from object. Might be that this one doesn't work very good with multiple inheritance...) Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Rule of order for dot operators?

2015-05-18 Thread Thomas Rachel
ses, it wouldn't do so, so you have to take care what you do. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does the first loop go wrong with Python3

2015-05-19 Thread Thomas Rachel
Am 19.05.2015 um 15:16 schrieb Oscar Benjamin: However the normal way to do this is to iterate over stdout directly: Depends. There may be differences when it comes to buffering etc... Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: subprocess.Popen zombie

2015-05-20 Thread Thomas Rachel
" routine which .wait()s after a certain time (250 ms or so). Or even better, which .poll()s and re-schedules itself if the process still runs. Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: Can Python function return multiple data?

2015-06-03 Thread Thomas Rachel
ast, C functions can return structs... Thomas -- https://mail.python.org/mailman/listinfo/python-list

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

2015-06-11 Thread Thomas Mlynarczyk
On 11/06/15 14:16, MRAB wrote: harder then they anticipated. ---^ seems nicer... then having to use self everywhere... "then"? Should be "than"... (That seems to be happening more and more these days...) Indeed :-) -- Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont

Get classes from "self.MyClass" to improve subclassability

2015-06-12 Thread Thomas Güttler
Here is a snippet from the argparse module: {{{ def parse_known_args(self, args=None, namespace=None): ... # default Namespace built from parser defaults if namespace is None: namespace = Namespace() # < === my issue }}} I subclass from the class of the

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