Re: Point of Sale

2005-01-27 Thread Andreas Pauley
like these desperately. I've also seen ICE from ZeroC (www.zeroc.com) and OSE (http://ose.sourceforge.net/browse.php?group=python-manual&entry=modules.htm) I haven't tried any of them yet, will have to do that a bit later. Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Can we pass some arguments to system("cmdline")?

2005-06-19 Thread Andreas Kostyrka
me=dir) But you should consider if you really really want to do this. What happens when " " in dir? What happens when dir == "; rm -Rf /" Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding Python - Deleting a class instance

2005-06-22 Thread Andreas Kostyrka
n you really remove the reference, or else you get dangling pointers which will lead to a corrupted heap and/or segfault somewhere in the future of your program. Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP ? os.listdir enhancement

2005-06-23 Thread Andreas Kostyrka
What's wrong with (os.path.join(d, x) for x in os.listdir(d)) It's short, and easier to understand then some obscure option ;) Andreas On Thu, Jun 23, 2005 at 11:05:57AM +0200, Riccardo Galli wrote: > On Wed, 22 Jun 2005 11:27:06 -0500, Jeff Epler wrote: > > > Why not ju

Re: help!

2005-06-24 Thread Andreas Kostyrka
Just out of curiosity, does the filesystem support seperate a/m/c times? Andreas On Fri, Jun 24, 2005 at 02:49:01PM +0300, Eser Çetinkaya wrote: > > > In your documentation, it is written : > " > os.path.getatime(path) > Return the time of last acc

building python 2.4.1

2005-06-28 Thread Andreas Heiss
Hi ! I am trying to build python 2.4.1 from source on a Linux system. Everything seems fine, but tkinter seems not to work. The file _tkinter.pyd is missing. How can tell configure to build all necessary components ? Thanks Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: building python 2.4.1

2005-06-28 Thread Andreas Heiss
John Abel wrote: > Andreas Heiss wrote: > >>Hi ! >>I am trying to build python 2.4.1 from source on a Linux system. >>Everything seems fine, but tkinter seems not to work. >>The file _tkinter.pyd is missing. >>How can tell configure to build all necessar

Re: strange __call__

2005-06-29 Thread Andreas Kostyrka
Just a guess, but setting "__X__" special methods won't work in most cases because these are usually optimized when the class is created. It might work if a.__call__ did exist before (because class a: contained a __call__ definition). Andreas On Wed, Jun 29, 2005 at 09:15:45AM

Re: Store multiple dictionaries in a file

2005-06-30 Thread Andreas Kostyrka
How so? >>> import cPickle as cp >>> f=open("/tmp/test.pck", "wb") >>> cp.dump(dict(a=1), f) >>> cp.dump(dict(b=1), f) >>> f.close() >>> f=open("/tmp/test.pck", "rb") >>> cp.load(f) {'a': 1} >>> cp.load(f) {'b': 1} >>> cp.load(f) Traceback (most recent call last): File "", line 1, in ? EOFError

Re: Re:

2005-07-01 Thread Andreas Kostyrka
import os as realos Names are nothing magic in Python, and quite easily manipulated: import os os.write(1, "Hello World!") class os: pass o = os() import os os.write(1, "\n") So basically this kind of name clashes usually do not happen in Python. Or another usage: os = SomeObject()

Re: Re:

2005-07-01 Thread Andreas Kostyrka
ies and the __getattr__ (and friends) special methods. So yeah, even if takes some violence to explain it to C++/Java developers, good python code doesn't have getters and setters ;) Andreas signature.asc Description: Dies ist ein digital signierter Nachrichtenteil -- http://mail.python.org/mailman/listinfo/python-list

Re: Re:

2005-07-01 Thread Andreas Kostyrka
after one month, another month I've spent interfacing with the existing C++ app, and afterwards I've optimized for 4 months. And actually did a number of feature requests the C++ team never ever contemplated to do.) To put it bluntly for most cases where today C/C++ is used, it's used unneccessarily and causes pain and costs for all involved. You know this projects, where even with a strong dislike for Perl, one prays "Couldn't they do it in Perl, anything, not C?". *g* Andreas signature.asc Description: Dies ist ein digital signierter Nachrichtenteil -- http://mail.python.org/mailman/listinfo/python-list

Re: shelve in a ZipFile?

2005-07-02 Thread Andreas Kostyrka
sion and/or a key prefix (which would allow multiple dictionaries or at least key spaces in one file) Andreas > > --Scott David Daniels > [EMAIL PROTECTED] signature.asc Description: Dies ist ein digital signierter Nachrichtenteil -- http://mail.python.org/mailman/listinfo/python-list

Re: No Subject

2005-07-02 Thread Andreas Kostyrka
ctually, using a library "directly" is mostly a nonbrainer in Python. What sometimes takes some work is to write a binding that is Pythonic and safe. Because many C/C++ libraries aren't safe. > > As for "advanced development tools"... That's a flameware waiting to happen. Well, my C/C++/Python is all basically at the same level. emacs (sometimes vi *g*). Using anything "higher" just suggests that there are defecits in the language. And I guess no editor will tell me, that I call free twice for the same pointer ;) Andreas signature.asc Description: Dies ist ein digital signierter Nachrichtenteil -- http://mail.python.org/mailman/listinfo/python-list

Re: Re:

2005-07-02 Thread Andreas Kostyrka
Am Samstag, den 02.07.2005, 15:11 +0100 schrieb Tom Anderson: > On Fri, 1 Jul 2005, Andreas Kostyrka wrote: > > > Am Freitag, den 01.07.2005, 08:25 -0700 schrieb George Sakkis: > > > >>> Again, how? Is there a way to force that an external user of my lib can > >

Re: Obtaining glyph width in Python

2005-07-04 Thread Andreas Lobinger
Aloha, Charlie wrote: > Hi, I'm looking for a way to obtain the width of a string, either in actual > inches/centimeters, or pixels will also work. Unfortunately this seems > difficult as I'd like to keep things as close to the stock Python install as > possible, and I'm not working with Graphics

Re: Polling, Fifos, and Linux

2005-07-08 Thread Andreas Kostyrka
for writing. [This bit of wisdom comes Advanced Programming in the UNIX Environment by W.R. Stevens p. 400: 'If we encounter the end of file on a descriptor, that descriptor is considered readbale by select.'] closing the old descriptor must be done after opening a new one, or else

Re: Existance of of variable

2005-07-13 Thread Andreas Kostyrka
is not enough, but playing and living to maintain the code afterwards is very educative ;) OTOH, perhaps for me it was teaching more, because I have been forced to maintain by first bigger python application almost for a decade. One learns quite a bit about software engineering this way ;

Re: threads and sleep?

2005-07-13 Thread Andreas Kostyrka
g is if the sleep will pause the t > thread as well as the main function or is the thread independat of the > main function sleep? Well, your program seems to be non-functional (missing if expression?), but as I said above, the main thread waits via select, so the child process sho

Re: threads and sleep?

2005-07-13 Thread Andreas Kostyrka
ithreading well. At least not at the moment. But this is basically there isn't currently a theoretical way to provide the environment that Python does safely in a multithreaded app without an incredible performance hit. Andreas signature.asc Description: Dies ist ein digital signierter Nachrichtenteil -- http://mail.python.org/mailman/listinfo/python-list

Re: threads and sleep?

2005-07-13 Thread Andreas Kostyrka
y does. But it will probably not show as a Python thread. Without some special interfacing with the Python/C API any thread created in C will not show up in Python. > that thread probably wouldn't be running a Python interpreter. Andreas signature.asc Description: Dies ist ein digital signiert

Re: threads and sleep?

2005-07-13 Thread Andreas Kostyrka
ust one thread is the additional locking overhead. OTOH it's only done for operatations that will probably take a long time anyway. (And long is a relative term here *g*). Andreas signature.asc Description: Dies ist ein digital signierter Nachrichtenteil -- http://mail.python.org/mailman/listinfo/python-list

Re: threads and sleep?

2005-07-13 Thread Andreas Kostyrka
Am Mittwoch, den 06.07.2005, 14:38 + schrieb Grant Edwards: > > Unfortunately that means you've got to debug a number cruncher > that's written in C. If one is careful, one can use Pyrex :) Andreas signature.asc Description: Dies ist ein digital signierter Nachr

Re: threads and sleep?

2005-07-13 Thread Andreas Kostyrka
for a number of problems in this segment. (Be it Twisted, forking, threads + GIL, etc.) Andreas signature.asc Description: Dies ist ein digital signierter Nachrichtenteil -- http://mail.python.org/mailman/listinfo/python-list

Re: Frankenstring

2005-07-13 Thread Andreas Lobinger
Aloha, Thomas Lotze wrote: > I think I need an iterator over a string of characters pulling them out > one by one, like a usual iterator over a str does. At the same time the > thing should allow seeking and telling like a file-like object: f = frankenstring("0123456789") for c in f: > ...

Re: Frankenstring

2005-07-14 Thread Andreas Lobinger
Aloha, Thomas Lotze wrote: >>A string, and a pointer on that string. If you give up the boundary >>condition to tell backwards, you can start to eat up the string via f = >>f[p:]. There was a performance difference with that, in fact it was faster >>~4% on a python2.2. > When I tried it just now,

using hotshot for timing and coverage analysis

2005-07-15 Thread Andreas Lobinger
Aloha, hotshot.Profile has flags for recording timing per line and line events. Even if i had both set to 1 i still get only the standard data (time per call). Is there any document available that has examples how to use the hotshot for converage analysis and to display timing per line? Hoping f

Re: httplib/HTTPS Post Problem

2005-07-15 Thread Andreas Kostyrka
http & https using curl the data is recieved by the > web server with no problems. Just a curious guess: Are you behind a proxy? If so, it's a known and never fixed bug from Python 1.5 times ;) You might also try to use PyCurl. Andreas > > When I post using my python client

Re: python certification

2005-07-20 Thread Andreas Kostyrka
the person who asks doesn't have a clue what they are asking about ;) (These are the people look for Pearl and Pyhton programmers ;) ) Andreas > > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list

Re: time.time() under load between two machines

2005-07-22 Thread Andreas Kostyrka
I've just noticed that you didn't mention any details like OS, versions, network infrastructure. You do not mention either how large the difference is. Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: return None

2005-07-22 Thread Andreas Kostyrka
Define nothing :) None is the representation of nothing in Python ;) Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing a log file

2005-08-14 Thread Andreas Kostyrka
w you motivate that person is another question. b) try to hack some solution yourself. Start with doing the python tutorial? Andreas > I am looking for a way to parse a simple log file to get the > information in a format that I can use. I would like to use python, > but I am just beginnin

Re: Parsing a log file

2005-08-14 Thread Andreas Kostyrka
endtime = timestamp sql = "insert into data (start, end, user) value (%r, %r, %r);" print sql % (starttime, endtime, user) else: raise AssertationError("%r is not a valid line" % l) Am Sonntag, den 14.08.2005, 07:31 -0700 schrieb CG: > Thanks

Re: Parsing a log file

2005-08-14 Thread Andreas Kostyrka
endtime = timestamp sql = "insert into data (start, end, user) value (%r, %r, %r);" print sql % (starttime, endtime, user) else: raise AssertationError("%r is not a valid line" % l) Am Sonntag, den 14.08.2005, 07:31 -0700 schrieb CG: > Thanks

Re: Moinmoin config

2005-08-18 Thread Andreas Schlapsi
> Hi, > > I have Moinmoin 1.3.4 installed and working on Linux RHEL3.0. However, > all screen elements are lined up on the left hand side. How can I get > it displayed like the wiki at: > > http://moinmoin.wikiwikiweb.de/HelpOnConfiguration > Hi Mark, It seems that your MoinMoin installatio

Re: The ONLY thing that prevents me from using Python

2005-08-24 Thread Andreas Kostyrka
prices are somehow laughable: I'm currently paying EUR39 for a dedicated host (with at least 200GB traffic, I'd had to look it up 60GB "storage", 256MB RAM and a 2.4GHz P4 CPU all alone to me). That makes the 79.95 dollars for "Linode 256" somehow a bit expensive.

Re: Lossless Number Conversion

2005-08-29 Thread Andreas Kostyrka
generates a complex number instead of raising an exception? Lisp has > something like this, and it makes number crunching much more convenient. Yes and no. There isn't general solution. But for example you want to allow complex number, just use cmath. Andreas signature.asc Description:

Re: encryption with python

2005-09-07 Thread Andreas Lobinger
Aloha, [EMAIL PROTECTED] wrote: > I was wondering if someone can recommend a good encryption algorithm > written in python. > It would be great if there exists a library already written to do this, > and if there is, can somebody please point me to it?? M2Crypto, interface to OpenSSL http://sand

zlib written in python

2005-09-20 Thread Andreas Lobinger
Aloha, is a pure _python_ implementation of the zlib available? I have broken zlib streams and need to patch the deocder to get them back. Wishing a happy day LOBI -- http://mail.python.org/mailman/listinfo/python-list

Re: Second posting - Howto connect to MsSQL

2005-02-14 Thread Ames Andreas
hon ODBC wrapper: mxOdbc (www.egenix.com) 3) ODBC driver: either a commercial one or the freetds driver (www.freetds.org) HTH, aa -- Andreas Ames | Programmer | Comergo GmbH | Voice: +49 69 7505 3213 | andreas . ames AT comergo . com -- http://mail.python.org/mailman/listinfo/python-list

Re: searching pdf files for certain info

2005-02-22 Thread Andreas Lobinger
Aloha, rbt wrote: Not really a Python question... but here goes: Is there a way to read the content of a PDF file and decode it with Python? I'd like to read PDF's, decode them, and then search the data for certain strings. First of all, http://groups.google.de/groups?selm=400CF2E3.29506EAE%40net

Re: searching pdf files for certain info

2005-02-22 Thread Andreas Lobinger
Aloha, rbt wrote: Thanks guys... what if I convert it to PS via printing it to a file or something? Would that make it easier to work with? Not really... The classical PS Drivers (f.e. Acroread4-Unix print-> ps) simply define the pdf graphics and text operators as PS commands and copy the pdf cont

User Security (Roles & Permissions)

2005-02-28 Thread Andreas Pauley
of Zope would work, were I can assign certain functionality/permissions to a role, and then assign each user a role. I'd prefer not to fully jump into Zope just yet, because although it has just about all the features you can think of, it is also fairly complex (for me at least). Regar

Calling external text-files (newb)

2005-02-28 Thread Andreas Winkler
Hi I tried to have python call an external 'Word'-file, and the read the whole text into a single string with the following code: [CODE] source = raw_input('file path') File = open('source', 'r') S = input.read() print S [/CODE] But when I try to run it, it raises the following error: File = op

Re: User Security (Roles & Permissions)

2005-02-28 Thread Andreas Pauley
On Mon, 28 Feb 2005, Andreas Pauley wrote: Hi all, I'm starting with a Point of Sale system (QT gui, MySQL db) and I'm wondering if there are any user management/user security modules available that can be reused independently of the specific system that you write. I think something

Re: PDF count pages

2004-12-06 Thread Andreas Lobinger
Aloha, Jose Benito Gonzalez Lopez wrote: Does anyone know how I could do in order to get/count the number of pages of a PDF file? Like this ? Python 2.2.2 (#3, Apr 10 2003, 17:06:52) [GCC 2.95.2 19991024 (release)] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>

cut strings and parse for images

2004-12-06 Thread Andreas Volz
rhaps you've some tips how to solve this problems? regards Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: cut strings and parse for images

2004-12-06 Thread Andreas Volz
x27;m a really newbie to python and not able to create a minimum example. Could you please give me a very small example how to use urlparse? Or point me to an example in the web? regards Andreas -- http://mail.python.org/mailman/listinfo/python-list

regex syntax

2004-12-06 Thread Andreas Volz
ein ".jpg" vorkommt oder nicht und dann eine Entscheidung treffen. Ich hab mir schon überlegt einfach die letzten viel Stellen des strings "per Hand" auf die Zeichenfolge zu vergleichen und so regex zu umgehen. Aber ich muss es irgendwann ja doch mal nutzen ;-) Gruß Andreas --

Re: cut strings and parse for images

2004-12-07 Thread Andreas Volz
Am Tue, 07 Dec 2004 00:40:02 GMT schrieb Paul McGuire: > Is this in the ballpark of where you are trying to go? Yes, thanks. You helped me a lot. Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: regex syntax

2004-12-07 Thread Andreas Volz
Am Mon, 6 Dec 2004 17:24:35 -0800 (PST) schrieb [EMAIL PROTECTED]: > Ich kann nicht spricht Deutch, aber: Ahh! Sorry for this! It was a mistake :-( regards Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: regex syntax

2004-12-07 Thread Andreas Volz
Am 6 Dec 2004 17:43:21 -0800 schrieb [EMAIL PROTECTED]: > viel besser als das vergleichbare Regexp: > > >>> re.match('.*\.jpg$', filename) Ok,now I've choosen this regex: > '.*\.(?i)jpe?g' to get .jpg .JPG .jpeg .JPEG seems to wo

regex for url paramter

2004-12-07 Thread Andreas Volz
rl2 > http://www.example.org/example.html¶m=1 I played with regex to find one that matches also second case with multible parameters. I think it's easy, but I don't know how to do. Can you help me? regards Andreas -- http://mail.python.org/mailman/listinfo/python-list

OT: Re: PDF count pages

2004-12-09 Thread Andreas Lobinger
Aloha, [EMAIL PROTECTED] wrote: Andreas Lobinger wrote: >>> import pdffile I browsed the code in CVS and it looks like a pretty comprehensive implementation. Maybe we should join forces. I have problems contacting you via the given e-mail adress. Wishing a happy day LOB

Re: Performance (pystone) of python 2.4 lower then python 2.3 ???

2004-12-17 Thread Andreas Kostyrka
thon1.5/test/pystone.py Pystone(1.1) time for 1 passes = 0.66 This machine benchmarks at 15151.5 pystones/second Run on a Knoppix/Debian based Duron 700 (Sony PCG-FX201 laptop). I guess there must be differences in how your pythons got compiled, even if you didn't specifies explicitly opti

Re: PyQt on MAC OS X

2004-12-13 Thread glenn andreas
In article <[EMAIL PROTECTED]>, Michael McGarry <[EMAIL PROTECTED]> wrote: > One problem is my Window created in Qt appears underneath all others on > the screen and focus never goes completely onto this window. Kind of weird. > > Any ideas? > If the application is not properly bundled you wi

Generating RTF with Python

2005-03-31 Thread Andreas Jung
Hi, does anyone know of a high-level solution to produce RTF from Python (something similar to Reportlab for producing PDF)? Thanks, Andreas pgptlX6o8zD33.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

string goes away

2005-03-31 Thread Andreas Beyer
nstead? I am sure there has been lots of discussion on whether or not to remove the string module. Maybe you can just direct me to the right place. Thanks for help! Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: string goes away

2005-03-31 Thread Andreas Beyer
Yeeh, I was expecting something like that. The only reason to use map() at all is for improving the performance. That is lost when using list comprehensions (as far as I know). So, this is *no* option for larger jobs. Andreas Skip Montanaro wrote: >>> upper_list = map(str

Re: string goes away

2005-04-01 Thread Andreas Beyer
hope this is not the case.) So, what is the purpose of map()? Should it too be deprecated? Andreas Skip Montanaro wrote: Andreas> Yeeh, I was expecting something like that. The only reason to Andreas> use map() at all is for improving the performance. That is Andreas> lost w

Re: Question regarding 2 modules installed via 'pip'

2013-11-16 Thread Andreas Perstinger
was answered within one hour (you asked at 2013-11-14 17:27:33Z, "yoonix" answered at 2013-11-14 18:19:54Z). But since he didn't spoonfed you, no wonder that you ignore that answer. Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: using ffmpeg command line with python's subprocess module

2013-12-04 Thread Andreas Perstinger
bprocess.py", line 820, in __init__ restore_signals, start_new_session) File "/usr/lib/python3.3/subprocess.py", line 1380, in _execute_child restore_signals, start_new_session, preexec_fn) TypeError: Can't convert '_io.BufferedRandom' object to str implicitly "fp" is a file object, but subprocess expects a list of strings as its first argument. Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: using ffmpeg command line with python's subprocess module

2013-12-10 Thread Andreas Perstinger
... fp.write(b"foo\nbar\nbaz\n") ... fp.flush() ... subprocess.call(["cat", fp.name]) ... 12 foo bar baz 0 Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: problem with graph of python(show)

2013-12-10 Thread Andreas Perstinger
? http://www.vpython.org/contents/bounce_example.html There is also a forum for VPython: https://groups.google.com/forum/?fromgroups&hl=en#!forum/vpython-users Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: Need Help with the BeautifulSoup problem, please

2013-12-16 Thread Andreas Perstinger
tag['style'] = 'REPLACE' tag.string=ii.string print(ii.replace_with(tag)) And please read https://wiki.python.org/moin/GoogleGroupsPython if you want to continue using Google Groups for accessing this list. Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: PDFMiner install question

2013-12-20 Thread Andreas Perstinger
ple code in the docs was obviously not updated. https://github.com/euske/pdfminer/blob/master/pdfminer/pdfpage.py So just leave out that line and if you need that exception use "PDFPage.PDFTextExtractionNotAllowed" instead of "PDFTextExtractionNotAllowed". Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: Datetime string reformatting

2013-12-22 Thread Andreas Perstinger
do something like sql_stmt = """INSERT ... VALUES (..., STR_TO_DATE(%s, "%m/%d/%Y %H:%M:%S.{%f}"), ...)""" cursor.execute(sql_stmt, (..., mydate_from_csv, ...)) (BTW: Do you mean microseconds instead of milliseconds?

Re: How to check the date validity?

2013-12-23 Thread Andreas Perstinger
ugh, because not all combinations of two digits are valid hours, minutes or seconds. Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: Emacs python-mode.el bug #1207470

2014-02-14 Thread Andreas Röhler
. Its possible that something I'm doing it causing it, but I have no idea what. I can start emacs with no init file, load python mode, hit enter and I get the error. Has anyone else experienced this? I am sure that Andreas Roehler (the maintainer of python-mode.el) fixed it, but am thinking th

Re: Moving to Python for web

2013-08-28 Thread Andreas Ecaz
On Wednesday, August 28, 2013 11:08:52 PM UTC+2, Joel Goldstick wrote: > On Wed, Aug 28, 2013 at 4:14 PM, wrote: > > > So, I have been working in PHP for several years but I want to learn > > something new. That something new is Python. But since I'm a web developer > > I want to build stuff f

Re: Moving to Python for web

2013-08-28 Thread Andreas Ecaz
On Wednesday, August 28, 2013 11:25:44 PM UTC+2, Andreas Ecaz wrote: > I've looked at Flask, Bottle and Web.py. I quite like the look of Bottle. > I'll keep looking for some other microframeworks, maybe I can find something > else that interests me. > > > >

Re: Moving to Python for web

2013-08-29 Thread Andreas Ecaz
I've decided to go with Flask! It's now running on UWSGI with NGINX. Hopefully I can get some stuff done :) @Chris “Kwpolska” Warrick I just don't like the big frameworks, for me there is too much magic going on. -- http://mail.python.org/mailman/listinfo/python-list

Re: Moving to Python for web

2013-08-29 Thread Andreas Ecaz
On Thursday, August 29, 2013 3:10:03 PM UTC+2, Chris “Kwpolska” Warrick wrote: > On Thu, Aug 29, 2013 at 2:45 PM, Andreas Ecaz wrote: > > > I've decided to go with Flask! It's now running on UWSGI with NGINX. > > Hopefully I can get some stuff done :) > > &

Re: print function and unwanted trailing space

2013-08-31 Thread Andreas Perstinger
On 31.08.2013 10:17, candide wrote: What is the equivalent in Python 3 to the following Python 2 code: # - for i in range(5): print i, # - ? How about >>> print(" ".join(str(i) for i in range(5))) 0 1

Re: Weird bahaviour from shlex - line no

2013-09-28 Thread Andreas Perstinger
t;> lexer.wordchar += '.,' >>> print lexer.get_token() foo.bar, >>> print lexer.get_token() baz There is also a "debug" attribute (with three different levels: 1, 2, 3; default value 0 means no debug output): >>> lexer = shlex.shlex("foo, ba

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Andreas Perstinger
Denis told you about 24 hours ago: https://mail.python.org/pipermail/python-list/2013-September/656318.html So either do it like that (which is the reasonable way) or look for another programming language. Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: Select fails when cookie tried to get a numeric value

2013-10-05 Thread Andreas Perstinger
On 05.10.2013 17:31, Νίκος Αλεξόπουλος wrote: Now i have it like this: # connect to database con = pymysql.connect( db = 'nikos_metrites', user = 'nikos_root', passwd = 't1abhp2r!', charset = 'utf8', host = 'localhost' ) Just to be sure: T

Re: Select fails when cookie tried to get a numeric value

2013-10-05 Thread Andreas Perstinger
lue '42' Explanation: http://docs.python.org/3/library/http.cookies.html#http.cookies.BaseCookie.load >>> c = cookies.SimpleCookie('ID=42') >>> isinstance(c, dict) True >>> c.items() dict_items([('ID', )]) Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: How to streamingly read text file and display whenever updated text

2013-10-07 Thread Andreas Perstinger
r(i) + '\n') time.sleep(1) which should work with "tail -f". Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: Re for Apache log file format

2013-10-08 Thread Andreas Perstinger
nt right after it looks at the , instead of moving onto and so on. I'm not sure if I understand your problem, but your regex pattern only matches up to the size. When you look for the referrer, the pattern expects two quotes but in your string you have "-" (quote, dash, quote). Thus there is no match (i.e. "match" is None) and the if-statement will print "not found". Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: parsing email from stdin

2013-10-08 Thread Andreas Perstinger
_file sys.stdin = sys.stdin.detach() msg = message_from_file(sys.stdin) Looking at the docs, I've found there is also "message_from_binary_file" which works for me with your code. http://docs.python.org/3/library/email.parser.html#email.message_from_binary_file Bye, Andreas -- htt

Re: parsing email from stdin

2013-10-08 Thread Andreas Perstinger
On 08.10.2013 17:25, Antoon Pardon wrote: Op 08-10-13 16:24, Andreas Perstinger schreef: Looking at the docs, I've found there is also "message_from_binary_file" which works for me with your code. http://docs.python.org/3/library/email.parser.html#email.message_from_binary_file

Python TkInter, GTK, GUI overall

2013-10-16 Thread Andreas Ecaz
I've been looking at TkInter and GTK to do some GUI programming, they're both cross-platform compatible. This might seem like a stupid question, but, how do people run the application? I get that I have to compile it and make it an executable. But how do I make it an executable? For Windows and

Re: How to get final URL after redirection

2013-10-31 Thread Andreas Perstinger
nd find the final redirect link and append >"#q=python" to that link and produce an output that is >"www.google.com/#q=python". For bitly links you need to use their API: http://dev.bitly.com/links.html#v3_expand There is a python module for interacting with i

Re: How to add a current string into an already existing list

2013-11-02 Thread Andreas Perstinger
hat your MySQL problems have nothing to do with Python? Everything inside the triple quotes is MySQL specific, so it's a MySQL problem whether you can use + to "add an extra string to an already existing array of strings(list)". This list is not a MySQL support forum. Bye, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Python 3.5.0b2 - permission error after pip upgrade

2015-06-11 Thread Andreas Balogh
[WinError 5] Access is denied: 'C:\\Users\\Andreas\\AppData\\Local\\Temp\\pip-xf9kwi7g-uninstall\\apps\\python35\\scripts\\pip.exe' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Apps\Python35\lib\site-packages\pi

Re: Invoke a superclass method from a subclass constructor

2011-09-11 Thread Andreas Perstinger
g the return value from A.log() to the attribute "module" and in A.log() there is no output either. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: file processing question

2011-10-12 Thread Andreas Perstinger
[1001, 1002, ...], [2001, 2002, ...], ...])? At least I get this impression from your samples. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Opportunity missed by Python ?

2011-10-13 Thread Andreas Neudecker
east make it a viable alternative to JS) Can the Python community do this without involvment in browser development? Regards Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python gp.ListFeatureClasses return only one file

2011-10-13 Thread Andreas Perstinger
ing should work (assuming you are using version 9.2): shpList = gp.ListFeatureClasses("*.shp") shp = shpList.Next() while shp: print shp shp = shpList.Next() Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Philosophical Python: 2*b or not 2*b

2011-10-27 Thread Andreas Neudecker
Not the answers I expected: ;-) >>> b = True >>> 2*b or not 2*b 2 >>> b = False >>> 2*b or not 2*b True It all becomes clear when you look at: >>> b = False >>> 2*b 0 >>> b = True >>> 2*b 2 No surprise there really. But fun anyway. Any more philsophical Python code out there? -- http://ma

Genehmigt vom Ministerium für alberne Gangarten

2011-10-27 Thread Andreas Neudecker
http://blog.stuttgarter-zeitung.de/fundstucke/2011/10/27/genehmigt-vom-ministerium-fur-alberne-gangarten/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python lesson please

2011-11-07 Thread Andreas Perstinger
pulled it again, using the 'raw' link, saved it, no extra tabs. But it still doesn't work for linux. My python is 2.6.6 Go to the directory where you've downloaded the file and type: python DuquDriverPatterns.py . What output do you get? Bye, Andreas -- http://mail.python.

Re: Trying to write beautifulsoup result to a file and get error message

2011-11-14 Thread Andreas Perstinger
>>> soup = BeautifulSoup(html) >>> type(soup) To write the modified document into a file, you have to convert this structur back into a string: >>> new_html = str(soup) >>> type(new_html) >>> new_html '\n \n Demo\n \n' HTH, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: sick of distribute, setup, and all the rest...

2011-11-28 Thread Andreas Perstinger
rong with any of the distribution systems. So what answers are you expecting from such a post? Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python 2.4

2011-12-21 Thread Andreas Perstinger
et/thinkcs/python/english3e/preface3-rle.html Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Checking for valid date input and convert appropriately

2013-02-22 Thread Andreas Perstinger
elper functions I wrote in my previous message. > >Why do you dislike that solution? Ferrous Cranus has proven in previous discussions (search the archives) that he doesn't like common-sense solutions and insists on doing it his own way (although his methods are either wrong or impossible

Re: Simple Plot in Python

2013-03-16 Thread Andreas Perstinger
subhabangal...@gmail.com wrote: >I was trying to draw in Matplotlib but did not find much help. Have you looked already at the homepape for "maptlotlib"?: http://matplotlib.org/index.html There you'll find a tutorial: http://matplotlib.org/users/pyplot_tutorial.html Bye

Re: [TYPES] The type/object distinction and possible synthesis of OOP and imperative programming languages

2013-04-17 Thread Andreas Abel
et. Their idea of "paradigm" is vague and ill-defined. Cheers, Uday Reddy -- Andreas Abel <>< Du bist der geliebte Mensch. Theoretical Computer Science, University of Munich Oettingenstr. 67, D-80538 Munich, GERMANY andreas.a...@ifi.lmu.de http://www2.tcs.ifi.lmu.d

Re: Error in "Import gv " module

2013-04-22 Thread Andreas Perstinger
missing "graphviz" or you need to adapt your paths: https://code.google.com/p/python-graph/issues/detail?id=15 Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   >