right curly quote and unicode

2006-10-17 Thread TiNo
Hi all,I am trying to compare my Itunes Library xml to the actual files on my computer.As the xml file is in UTF-8 encoding, I decided to do the comparison of the filenames in that encoding.It all works, except with one file. It is named 'The Chemical Brothers-Elektrobank-04 - Don't Stop the Rock (

Re: right curly quote and unicode

2006-10-19 Thread TiNo
That is actually> not an apostrophe, but ASCII char 180: ´It's actually Unicode char #180, not ASCII. ASCII characters are in 0..127 range.Yep, that's what I ment... :D > In the Itunes library it is encoded as: Don%E2%80%99t Looks like a utf-8 encoded string, then encoded like an url.It is. I just

Re: Getting a lot of SPAM from this list

2006-10-25 Thread TiNo
How do you send and receive this email?24 Oct 2006 22:12:35 -0700, Paul Rubin <"http://phr.cx"@nospam.invalid>: I've given up on email pretty much.  I no longer have a public emailaddress of any type.  I just give out a URL (including on my resume,business cards, etc), which leads to a HTTPS contac

Re: Is python for me?

2006-11-13 Thread TiNo
> > At least: i use the dutch portal http://python.startpagina.nl/ to start > with. Can you advice me a good Python interpreter, or a good startpage > (as in Python for dummys)? > > Lennart > > -- > http://mail.python.org/mailman/listinfo/python-list > check http://www.diveintopython.org/ pretty g

bad marshal data in site.py in fresh 2.5 install win

2006-12-29 Thread TiNo
uot;license" for more information. >>> - What can I do about this? Thanks, TiNo -- http://mail.python.org/mailman/listinfo/python-list

Help on installing Easy_Install

2006-12-29 Thread TiNo
ptools-0.6c3-py2.5.egg\setuptools\command\easy_install.py" , line 1412, in get_script_header LookupError: no codec search functions registered: can't find encoding ?? What to do? thanks, TiNo -- http://mail.python.org/mailman/listinfo/python-list

Re: bad marshal data in site.py in fresh 2.5 install win

2006-12-30 Thread TiNo
p 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> --- ?? also removed site.pyc, and run it again, but with the s

Re: bad marshal data in site.py in fresh 2.5 install win

2007-01-03 Thread TiNo
Removing aliases.pyc solved it. Thank you. 2007/1/3, "Martin v. Löwis" <[EMAIL PROTECTED]>: > TiNo schrieb: > > File "F:\Python25\lib\encodings\__init__.py", line 32, in > >from encodings import aliases > > ValueError: bad marshal data >

Re: pdb.py - why is this debugger different from all other debuggers?

2006-01-09 Thread Tino Lange
ake a consolidated patch now, send it to sf and to post a note about that on python-dev@python.org to get the "board's approval" :-) "idle" also changed dramatically during the last versions - why shouldn't pdb also become better ... a volunteer seems to be there ;-) Thank

CSV Parser and unusual (?) linesterminator - misunderstanding?

2006-01-20 Thread Tino Lange
c', '1d#2a', '2b', '2c', '2d#3a', '3b', '3c', '3d#'] > $ I would have been expecting that the parser returns three lines, i. e. > ['1a', '1b', '1c', '1d'] > ['2a', '2b', '2c', '2d'] > ['3a', '3b', '3c', '3d'] Any hints what I'm doing wrong here? Thanks Tino -- http://mail.python.org/mailman/listinfo/python-list

Re: CSV Parser and unusual (?) linesterminator - misunderstanding?

2006-01-20 Thread Tino Lange
Peter Otten wrote: > Tino Lange wrote: > >> I'm trying to use the csv Parser included with Python. Field Delimiter is >> "|", Line Delimiter is "#". Unfortunately it doesn't work as expected. >> The parser seems to just ignore the 'line

Re: reading file to list

2009-01-17 Thread Tino Wildenhain
thon would be 3 or 5)). So? Please count the lines: [line.strip().split() for line in file("blob.txt")] HTH Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: reading file to list

2009-01-17 Thread Tino Wildenhain
MRAB wrote: Tino Wildenhain wrote: Xah Lee wrote: comp.lang.lisp,comp.lang.scheme,comp.lang.functional,comp.lang.python,comp.lang.ruby ... OK, I want to create a nested list in Lisp (always of only integers) from a text file, such that each line in the text file would be represented as a

Re: psycopg2 weirdness

2009-01-17 Thread Tino Wildenhain
can happen if the environment of the web server differs from your personal user when you are testing your scripts. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: How to print lambda result ?

2009-01-20 Thread Tino Wildenhain
)) which is just a quite useless application of lambda :-) (num,num >1 and "s" or "") or even (num,"s" if num >1 else "") in python > 2.5 or in python <3.0: (num,"s"*(num >1)) :-) HTH Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: How to print lambda result ?

2009-01-20 Thread Tino Wildenhain
Barak, Ron wrote: Thanks Tino: your solutions without the lambda work nicely. What I still don't understand is why the print does not execute the lambda and prints the result, instead of printing the lambda's object description. Bye, Ron. Well its up to the implemention what

Re: USB in python

2009-01-22 Thread Tino Wildenhain
andler for your hardware's USB ids. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: USB in python

2009-01-27 Thread Tino Wildenhain
t might be temperature sensors but there are a lot of GPIO chips, electronic resistors, A/D converters etc. available. Most of the stuff can be even ordered as sample from dallas/maxim. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Results of executing hyperlink in script

2009-01-28 Thread Tino Wildenhain
the records, at least os.popen2,os.popen3 support tuple as argument: i,o=os.popen2((cmd,arg1,arg2)) and quotes them correctly. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: is python Object oriented??

2009-01-29 Thread Tino Wildenhain
ere everything is a class, even the primitive types. well actually except keywords, everything is an object in python too, including of course primitive types (if you say so - practically python does not have them). Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http:

Re: key capture

2009-02-02 Thread Tino Wildenhain
needs to be asynchronously so you can catch note-on, note-off events during playback. Good luck Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Unzipping a .zip properly, and from a remote URL

2009-02-03 Thread Tino Wildenhain
eation could be put into a class with caching of already existing subdirectories created and recursive creation of missing subdirectories as well es to make sure you do not ascend out of your target directory by accident (or crafted zip, see above). Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Unzipping a .zip properly, and from a remote URL

2009-02-03 Thread Tino Wildenhain
Christopher Culver wrote: Tino Wildenhain writes: so instead you would use archive = zipfile.ZipFile(remotedata) That produces the following error if I try that in the Python interpreter (URL edited for privacy): import zipfile import urllib2 remotedata = urllib2.urlopen("

Re: Python ssh with SSH Tectia server

2009-02-03 Thread Tino Wildenhain
Hi, loial wrote: Has anyone any experiencing with ssh between a python client and the SSH Tectia server from SSH (ssh.com) ? this might well be. ;) Does it work? Did you try? (It should however since at least openssh client worked) Cheers Tino smime.p7s Description: S/MIME

Re: Locating python

2009-02-04 Thread Tino Wildenhain
s root for you, but needs the password to do it. sudo does the same thing, but again needs the password to do it. hope that makes senses (and that this worked). actually "su" needs the root (or the target users') password and sudo needs _your_ (the current users) password. HTH Tin

Re: Locating python

2009-02-04 Thread Tino Wildenhain
se 11.1 default config. i just tried it: argh. This Nürnberg Windows ;-) But this shows that a sensible configuration of the system is usefull before you start installing services on it :-) Cheers Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: len()

2009-02-04 Thread Tino Wildenhain
ects where sequences indeed have a len() method called __len__() Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Use list name as string

2009-02-05 Thread Tino Wildenhain
27;dataname' of the assignment in the function call? The only solution I see would be to add a property to your datastore to give it its own unique name. (By subclassing and providing a name attribute or property) - and while you are at it, maybe you want to put the 'write to file'

Re: Use list name as string

2009-02-05 Thread Tino Wildenhain
%s' line %d" % (repr(a),filename,func_name,line_no) for ln,srcline in enumerate(contextlines or []): print "%3s : %s" % ('*>' if ln==contextindex else '',srcline) just play around calling the above function from different places and you should see what I mean :-) Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing two book chapters (text files)

2009-02-05 Thread Tino Wildenhain
://www.nltk.org/ it's a python toolkit for natural language processing. there's a book at http://www.nltk.org/book with much more info. Also there is difflib in the standard package which can be used depending on exact definition of "similarity". Regards Tino smime.p7s

Re: Fastest database solution

2009-02-06 Thread Tino Wildenhain
iguration would be helpful. Please note that postgres is quite good at handling concurrent load - this does not mean its best or every desk top database application. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Question on Strings

2009-02-06 Thread Tino Wildenhain
st try it out in the interactive interpreter Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: convert the ip packet to and from RS-232 packet

2009-02-09 Thread Tino Wildenhain
such, not really a python topic. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: python ssh and Tetia SSH server

2009-02-10 Thread Tino Wildenhain
past with ssh.com ssh. Maybe you can get a test version and just try it out. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Using paramiko rsa key

2009-02-10 Thread Tino Wildenhain
and connecting in my python code? Sure, where can we send the invoice too? Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2.Request:: http Request sending successfully, but Response contains in valid data.

2009-02-11 Thread Tino Wildenhain
ta is having valid xml data r = urllib2.urlopen(req) print(r.code) // output 200 print(r.msg) // output OK print(r.read()) // Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: PySerial "write" should accept "bytearray"

2009-02-14 Thread Tino Wildenhain
read" functions should return a "bytearray". I'm sure patches are welcome. And did you copy the pyserial author? Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Python interface to ODF documents?

2009-02-15 Thread Tino Wildenhain
st of xml parsers included in the standard lib. This works very well to my experience. Not sure if an abstraction layer on top of that exists. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: hist without plotting

2009-02-15 Thread Tino Wildenhain
like scipy.histogram(a) ? Actually I don't see many plotting functions beside plot() anyway... Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonic way to determine if a string is a number

2009-02-15 Thread Tino Wildenhain
pproach instead of trying to copy (incomplete as it has been shown not only digits and . constitute a float) already implemented code. Of course if you want to limit the range of accepted data even more, then isdigit and friends can be used - maybe you could time both approaches with a set of data

Re: Pythonic way to determine if a string is a number

2009-02-15 Thread Tino Wildenhain
dom string to a number is sure something you want to achieve. Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: print string as raw string

2009-02-17 Thread Tino Wildenhain
nsense. print r"\." or in python3.0 print(r"\.") will just print: \. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Python dictionary size/entry limit?

2009-02-21 Thread Tino Wildenhain
string in memory) which runned perfectly with linux. You can try yourself maybe by installing ubuntu on the same host. (If you feel fit you can even skip the install and run it off life CD but then you need to fiddle a little to get swap space on disk) Regards Tino -- http://mail.python.org/mailm

Re: finding the difference between the two version of the python program...

2008-12-01 Thread Tino Wildenhain
roll your own diff. Regards TIno smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a .xls file to .html

2008-12-03 Thread Tino Wildenhain
just save it as HTML (or whatever Microsoft believes is HTML). If the file is stored elsewhere in Excel-Format, then you could script that using xlrd (google for it) Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: python to parse excel file csv format

2008-12-03 Thread Tino Wildenhain
n reader: os.popen(("chown",fmodes,fname)) or even plus better: for fmodes,fname in reader: os.chmod(fname,fmodes) (Both my examples avoid problems with unquoted filenames) Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: zip a created file

2008-12-13 Thread Tino Wildenhain
mediate file in the file system. (This also avoids a lot of problems with your approach above - for example if the same query is put twice the same time...) Just have a look at the examples in the documentation which come with the zipfile module. Cheers Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: regex problem ..

2008-12-15 Thread Tino Wildenhain
uld my current regex (r"""[^a-zA-Z0-9]""") be modified? You might want to normalize before checking, e.g. from urllib import unquote p=re.compile("[^a-zA-Z0-9 ]") flagged=[] for s in strs: if p.search(unquote(s)): flagged.append(s) be carefull howeve

Re: confused about __str__ vs. __repr__

2008-12-18 Thread Tino Wildenhain
Neal Becker wrote: Reading some FAQ, I see that __str__ is "meant for human eyes". But it seems that: class X(object): def __str__(self): return "str" def __repr__(self): return "repr" x = X() d = {0 : x} print d {0: repr} So if __str__ is "meant for human eyes", then w

Re: confused about __str__ vs. __repr__

2008-12-18 Thread Tino Wildenhain
ation sensibly, best if you would come with a proposal? Perhaps pprint.pprint is a starting point? Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Django/Turbogears too specific?

2008-12-21 Thread Tino Wildenhain
code and design this way. I prefer TAL (template attribute language, ZPT) [1] much over the other attempts I've seen ( and I've seen a lot) Cheers Tino [1] http://en.wikipedia.org/wiki/Template_Attribute_Language smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.pyt

Re: How to represent a sequence of raw bytes

2008-12-21 Thread Tino Wildenhain
py, scipy, they have arrays similar to C and also much more numeric datatypes. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Can´t Surf Python Pages in Windoz e

2008-12-26 Thread Tino Wildenhain
cations using this port already, firewall in your way... a 404 however indicates the service is there but you are not authorized. Please read "User and Permission" chapter in the zope book. Please note the above code you cited is not useable (or sensible) in a zope environm

Re: Windows SSH (remote execution of commands) - Python Automation

2008-12-29 Thread Tino Wildenhain
its more easy and relieable to just use cron on unix side. This works much much better then Task scheduler on windows btw. Regards Tino Can anyone provide me some help in achieving this ? Thanks, -- *Raghu

Re: math module for Decimals

2008-12-29 Thread Tino Wildenhain
ica and friends with python you might check scipy/numpy. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing Excel spreadsheets

2008-12-30 Thread Tino Wildenhain
m, but I'd rather get some more input before going with something I don't know. Thanks, Andy. xlrd(read only) also see pyExcelerator which is now replaced by xlwt :-) Cheers Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Switching user in a SSH connection

2009-01-02 Thread Tino Wildenhain
ould for example run su - in that connection? Or sudo if installed and configured. What else would you need? Tino. smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: ACL in python

2009-01-03 Thread Tino Wildenhain
environment you find within zope for all the TTW-stuff? Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Ideas to optimize this getitem/eval call?

2009-01-04 Thread Tino Wildenhain
at of course ;-) Infact, evoque is really one of the few (or even the only one?) that was conceived from the start to support restricted evaluation. Thats is definitively not the case. There are at least 2 quite old template systems on top of a quite good restricted environment. Cheers Tino smim

Re: image recogniton?

2009-01-06 Thread Tino Wildenhain
gt; wrote: Hi! I know little about the computer image processing, and now I have a fancy problem which is how to read the time from the picture of a clock by programming ? Is there anyone who can give me some suggestions? Thank! Li Han Regards Tino smime.p7s Descriptio

Re: Pure Python interface to MySQL?

2008-10-06 Thread Tino Wildenhain
some, thanks! You have better searching skills than I do, apparently :-) Will you be asking for a pure python implementation of mysql in the next question? ;) Why not use the proxy approach (for example via xmlrpc) as suggested by James or just spill to a file? :-) Just wondering... Tino

Re: SMTPlib inside function, extra tab

2008-10-07 Thread Tino Wildenhain
emplates - which could in the easiest form just module level constants like: stdform=""" Hello %(greeting)s, this automated email is about %(subject)s ... """ and so on and then you use it with stdform % dict(greeting='Mr Ed',subject='writing emails') ... HTH Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Builing Python 2.6 on AIX 5.2

2008-10-07 Thread Tino Wildenhain
brasse wrote: Hello! I am having some trouble building Python 2.6 on AIX. The steps I have taken are: ... a funny side note: I was originally drawn to python because perl wouldn't build on my particular installation of AIX but python did :-) But this was 1.4 or so back then :-) Cheers

Re: template strings for matching?

2008-10-09 Thread Tino Wildenhain
y None (if s doesn't match), or a dictionary with values for 'object', 'location', and 'subloc'. But I couldn't find anything like that in the docs. Am I overlooking something? Yeah, its a bit hard to spot: http://docs.python.org/library/stdtypes.html#st

Re: Efficient Bit addressing in Python.

2008-10-09 Thread Tino Wildenhain
on and use it via if byte & bit1: ... more efficiently for operations on really big bit strings is probably just using integers. HTH Tino Is this possible? - Hendrik -- http://mail.python.org/mailman/listinfo/python-list smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: template strings for matching?

2008-10-09 Thread Tino Wildenhain
[EMAIL PROTECTED] wrote: Tino> Yeah, its a bit hard to spot: Tino> http://docs.python.org/library/stdtypes.html#string-formatting-operations That shows how to use the template formatting as it currently exists. To my knowledge there is no support for the inverse operation, wh

Re: FLexible formatted text involving nested lists?

2008-10-10 Thread Tino Wildenhain
stance.get() would be called with 'weight.kg', splits on the . for the attribute: weight, calls self.weight.format(unit='kg') to retrieve "5 kilos" or something :-) Just some random thoughts. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Efficient Bit addressing in Python.

2008-10-10 Thread Tino Wildenhain
Hendrik van Rooyen wrote: "Tino Wildenhain" wrote: byte1 byte2? this does not look very practical to me. In the simplest form of storing your values in a text string, you could just use ord() to get the byte value and operate on it with 1<<0 1<<1 1<<3 and so on.

Re: Creating single .exe file without py2exe and pyinstaller

2008-10-18 Thread Tino Wildenhain
ttp://shed-skin.blogspot.com/ Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: keyword in package name.

2008-10-19 Thread Tino Wildenhain
mport mechanism, where in java you just have namespaces. Therefore you can always avoid namespace clashes at import time. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: [APSW] SELECT COUNT(*) not succesfull?

2008-10-23 Thread Tino Wildenhain
== Any idea what's wrong with the above? Apart from the other comments, what is obviously wrong is the way you aliased the variables into SQL. Please read on parametrized queries, e.g. the following should work: sql = "SELECT COUNT(*) FROM mytable WHERE key=%s" cursor.exec

Re: FTP via web browser

2008-10-27 Thread Tino Wildenhain
ftp or some local store underneath. What about Webdav? Most OS have support for it nowadays. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: xchat

2008-10-27 Thread Tino Wildenhain
sk in the xchat forum but i get no reply so i try here try it again from within xchat. See the documentation for the python console (like a chat to python interpreter) Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: mySQL problems

2008-10-28 Thread Tino Wildenhain
tion. Also, was the choice of MySQL a conscious one? Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting a list

2008-10-28 Thread Tino Wildenhain
RC wrote: unsortedList = list(["XYZ","ABC"]) sortedList = unsortedList.sort() print sortedList Why this return None? Because you did not read the documentation. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: mySQL problems

2008-10-28 Thread Tino Wildenhain
:-) Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: How to open a shell prompt from an existing shell prompt

2008-10-30 Thread Tino Wildenhain
ith the script. Open a new window would mean a new terminal and is very os specific. Usually you don't have control over such a spawned terminal window. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: How to open a shell prompt from an existing shell prompt

2008-10-30 Thread Tino Wildenhain
gaurav kashyap wrote: Dear Tino, I am using python 2.3.5. on POSIX system,I have the simple query as: I log into the shell as root.Can i issue some command that will open another terminal?(i.e I get a duplicate copy of the shell prompt already opened) I'd say so but what would that have

Re: modifying locals

2008-10-30 Thread Tino Wildenhain
.iteritems(): exec "%s = %s" % (key, item) modify a few of the elements... return locals() locals().update(D) would have done the same :) ... Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: modifying locals

2008-10-31 Thread Tino Wildenhain
Hi, Steven D'Aprano wrote: On Fri, 31 Oct 2008 07:10:05 +0100, Tino Wildenhain wrote: Also, locals() already returns a dict, no need for the exec trickery. You can just modify it: >>> locals()["foo"]="bar" >>> foo 'bar' That is

Re: How to open a shell prompt from an existing shell prompt

2008-10-31 Thread Tino Wildenhain
Hi, gaurav kashyap wrote: Dear Tino, There is no subprocess module in python 2.3.5. My goal is: 1.Open a terminal window and login as root. 2.Issue some command in the terminal window that will open another terminal,similar to the onealready opened. Am i clear now. Not at all. All

Re: open a new terminal window from another terminal window in linux/unix system

2008-10-31 Thread Tino Wildenhain
ide a contract and pay money you should also be able to get someone to configure the system in the way you want it :-) Cheers Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: modifying locals

2008-10-31 Thread Tino Wildenhain
M.-A. Lemburg wrote: On 2008-10-31 09:08, Tino Wildenhain wrote: ... Ah thats interesting. I would not know because I usually avoid such ugly hacks :-) It doesn't even work for already defined local variables: def foo(): ... x = 1 ... locals()['x'] = 2 ... p

Re: push-style templating - an xml-like way to process xhtml

2008-11-02 Thread Tino Wildenhain
n.wikipedia.org/wiki/Template_Attribute_Language In contrast there would be something like TSSL, which unfortunately never saw the light of the day yet :-) http://mail.zope.org/pipermail/zpt/2002-May/003304.html (This solution would not even touch the HTML directly) Regards Tino smime.p7s Description:

Re: push-style templating - an xml-like way to process xhtml

2008-11-02 Thread Tino Wildenhain
Terrence Brannon wrote: Tino Wildenhain wrote: An opposite approach to this form of dynamic HTML production is called push-style templating, as coined by Terence Parr: Hm. "$attr.title$ $if(attr.active)$ $attr.submenu:menuItem()$ $endif$" This looks ugly to me. It looks

Re: Efficient way to remove objects from a list

2008-11-03 Thread Tino Wildenhain
process(msg) if you want some post processing, its really like you are acting in different stages, so you could just have two lists for your messages: one for the messages in phase1, one for the messages passed phase1 and now in phase2 and work over them in the way shown above. Regards

Re: Workflow engine?

2008-11-08 Thread Tino Wildenhain
her then with a solution. There is not so much magic in workflows as you might seem to think. After all its "just" maintaining a state and rules for possible transitions. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Insert data into MySQL from HTML Form using .psp script

2008-11-08 Thread Tino Wildenhain
storage is. Note there are plenty really good web frameworks with python which save you a great deal of the housekeeping, giving your more time to construct your application. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Workflow engine?

2008-11-09 Thread Tino Wildenhain
so simple, the only complexity comes from the environment it needs to drive. So in short: I doubt there is a general solution to the problem. Regards Tino GS smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: sys.stdout, urllib and unicode... I don't understand.

2008-11-11 Thread Tino Wildenhain
for help through google, I have found this post: http://mail.python.org/pipermail/python-list/2007-October/462977.html and I gave it a try. What I did, though, was not to override sys.stdout, but to declare a new writer stream as a property of my main class: self.out=OutStreamEncoder(sys.stdout,

Re: Little direction please Python MySQL

2008-11-16 Thread Tino Wildenhain
e the database later on more easy then with hand crafted queries when you find out the initial choice of mysql (for whatever reason) was inapropriate. Cheers Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Win 98 with Python 2.5--matplotlib and Numpy problem

2008-11-16 Thread Tino Wildenhain
e with win98 is large enough to justify this. If you feel desperate, you could always get the compiler and try your luck. Otoh you collegue could just abhore the windows and use something different on his hardware :-) With fvwm98 it would even look like :-) HTH Tino smime.p7s Description: S/MIM

Re: Will MySQLdb, the Python shim, be supported for Python 2.6 or 3.x?

2008-11-19 Thread Tino Wildenhain
Hi, Dennis Lee Bieber wrote: ... I'm not any heavy user -- but if it means anything... I finally converted my home machine from 2.4 to 2.5 only a few months ago! (My work machine is still running 2.4). Converted? You can install and run more then one Python version in parallel. (Of c

Re: compressed serialization module

2008-11-19 Thread Tino Wildenhain
;,mode="wb",encoding="bz2") pickle.dump(obj,out,pickle.pickle.HIGHEST_PROTOCOL) out.close() should work (and has far less code :-) Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting fractional part from a float without using string operations

2008-11-19 Thread Tino Wildenhain
are using floating point numbers: >>> 0.23 0.23001 but str() handles the rounding correctly: >>> print 0.23 0.23 >>> print abs(int(a) -a) 0.23 See also http://en.wikipedia.org/wiki/Floating_point for the problems with FP figures. Regards Tino s

Re: Email Program

2009-03-01 Thread Tino Wildenhain
J wrote: Is it possible to make a GUI email program in Python that stores emails, composes, ect? Yes this is possible. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Email Program

2009-03-02 Thread Tino Wildenhain
other way round but not with python but with AREXX those days. It was an SMTPD to accept forwarded mail and spool directly into YAM (that if someone on the other end of the world has hit "send" it was immediately rattling in my inbox :-) Regards Tino smime.p7s Description: S/MIME

Re: Perl-python regex-performance comparison

2009-03-03 Thread Tino Wildenhain
straight forward way. And you don't need the hammer (aka regex) for everything. Several hundred megabytes is not much, you would work thru them sequentially, that is with python you would almost exclusively work with generators. HTH Tino smime.p7s Description: S/MIME Cryptographic Signa

Re: String Identity Test

2009-03-04 Thread Tino Wildenhain
, you could profit from identity and the overhead of installing it would be neglectable (and you can force this in python with "internal") but in this case I'd think calculating and working with a hash instead should be preferred. Regards Tino Wildenhain smime.p7s Description: S

Re: Inverse of dict(zip(x,y))

2009-03-04 Thread Tino Wildenhain
, ...}, what is there any trick to get lists x = [x1, x2, ...] and y = [y1, y2, ...] x,y=zip(d.items()) Cheers Tino smime.p7s Description: S/MIME Cryptographic Signature -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >