RE: TKinter in Python - advanced notions

2023-06-23 Thread Andreas Heckel via Python-list
, which I certainly still am, but also show enough complexity to see the concept in action. Any hints / links to github or similar highly welcome. If the list is not the appropriate place, I am happy if you email me directly. Cheers, Andreas > -Original Message- > From: Python-list

Re: built-in pow() vs. math.pow()

2023-04-03 Thread Andreas Eisele
Andreas Eisele schrieb am Donnerstag, 30. März 2023 um 11:16:02 UTC+2: > I sometimes make use of the fact that the built-in pow() function has an > optional third argument for modulo calculation, which is handy when dealing > with tasks from number theory, very large numbers, prob

built-in pow() vs. math.pow()

2023-03-30 Thread Andreas Eisele
ce for any enlightening comment on this. Best regards, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: Find the path of a shell command

2022-10-17 Thread Andreas Eder
ches a detached rm. It works pretty well > until it is invoked by cron! I suspect that for cron we need to specify > the full path. > Of course I can hardcode /usr/bin/rm. But, is rm always in /usr/bin? > What about other commands? Why not just use os.unlink ? 'Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: Performance issue with CPython 3.10 + Cython

2022-10-07 Thread Andreas Ames
-like format strings solved the issue. Now the application bowls happily along, consistently below 0.02 seconds per second application time. 2. Valgrind + callgrind is an awesome toolchain to spot performance issues, even on VMs. Am Di., 4. Okt. 2022 um 11:05 Uhr schrieb Andreas Ames < andreas.0

Performance issue with CPython 3.10 + Cython

2022-10-04 Thread Andreas Ames
ts = (381, 9, 3); 1 second of application time corresponds to > 0.39760732650756836 seconds real time. > 2022-10-04 10:41:56|INFO|__main__ |Execution loop 2800 done. GC > counts = (381, 9, 3); 1 second of application time corresponds to > 0.42221736907958984 seconds real time. > 2022-10-04 10:42:01|INFO|__main__ |Execution loop 2900 done. GC > counts = (381, 9, 3); 1 second of application time corresponds to > 0.4237234592437744 seconds real time. Thanks in advance, Andreas -- https://mail.python.org/mailman/listinfo/python-list

Re: Parallel(?) programming with python

2022-08-15 Thread Andreas Croci
, that are unfortunately about to end. Thanks again, Community. On 08.08.22 12:47, Andreas Croci wrote: tI would like to write a program, that reads from the network a fixed amount of bytes and appends them to a list. This should happen once a second. Another part of the program should take the list,

Re: Parallel(?) programming with python

2022-08-08 Thread Andreas Croci
che before letting you read, which would include a normally slow disk access. Andreas Julio -- https://mail.python.org/mailman/listinfo/python-list

Re: Parallel(?) programming with python

2022-08-08 Thread Andreas Croci
Thanks for your reply. On 08.08.22 13:20, Stefan Ram wrote: Yes, but this is difficult. If you ask this question here, you might not be ready for this. Indeed. I haven't learned it yet myself, but nevertheless tried to write a small example program quickly, which might still

Parallel(?) programming with python

2022-08-08 Thread Andreas Croci
tI would like to write a program, that reads from the network a fixed amount of bytes and appends them to a list. This should happen once a second. Another part of the program should take the list, as it has been filled so far, every 6 hours or so, and do some computations on the data (a FFT).

Immutable view classes - inherit from dict or from Mapping?

2021-04-12 Thread Andreas R Maier
Hi, I have written some classes that represent immutable views on collections (see "immutable-views" package on Pypi). Currently, these view classes inherit from the abstract collection classes such as Mapping, Sequence, Set. However, they implement the read-only methods of dict, list and set,

Installation Python 3.6.x on Windows using command line installer (without GUI)

2017-07-27 Thread Andreas Jung
I need to installed Python 3.6.x on Windows as part of an automated process without user-interaction. Recently Python releases provided MSI files for installation using the "msiexec" utility however there are no more MSI release files available for Python 3.6.X. Are there any alternatives? -aj

Re: subprocess problem

2017-02-15 Thread Andreas Paeffgen
On 2017-02-11 02:23:12 +, Cameron Simpson said: def your_function(...): with open('/path/to/your/logfile.txt', 'a') as logfp: print("PATH=".os.environ['PATH'], file=logfp) p=Popen(...) p.communicate(...) print("p.returncode=%r" % (p.returncode)) and any

Re: subprocess problem

2017-02-10 Thread Andreas Paeffgen
Thanks for all the great advice. I tested all the possibilities. So far no luck. If i start the app from a terminal, the solutions work. But not, if i start the app-bundle (There is no connection to a terminal) 1. Copied the path to p.subprocess 2. Used the def wich: python function 3. Used sh

Re: subprocess problem

2017-02-09 Thread Andreas Paeffgen
I guess which does not return an error code. If it does not find anything, the return is just blank. If it finds something, the path is returned. So the change of code did not help, because there is just no error message. Could there be a $path problem in the subprocess started inside the binar

Re: subprocess problem

2017-02-09 Thread Andreas Paeffgen
Maybe i could use another trick to circumvent the problems in the frozen app? The frozen apps can be downloaded here: https://sourceforge.net/projects/panconvert/files/Newest/ @Cameron: 1. I use PyQT5 for a creating a gui app. To run the app on other systems, where no QT5 and PyQT5 is install

subprocess problem

2017-02-08 Thread Andreas Paeffgen
The Problem with the subprocess code is: Using the sourcecode functioning as normal. The frozen app with cx_freeze on every platform just returns an empty result Here is the code in short: def get_path_pandoc(): settings = QSettings('Pandoc', 'PanConvert') path_pandoc = settings.value

Re: Call for Assistance

2016-08-11 Thread Andreas Röhler
On 12.08.2016 06:48, Lawrence D’Oliveiro wrote: On Wednesday, August 10, 2016 at 3:42:39 AM UTC+12, Reto Brunner wrote: What on earth isn't "free" enough about You are free to: Share — copy and redistribute the material in any medium or format No you are not. A court has ruled

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 11:42, Lawrence D’Oliveiro wrote: On Thursday, June 30, 2016 at 9:31:29 PM UTC+12, Andreas Röhler wrote: Science is not about believing, but about models. The nice thing about science is, it works even if you don’t believe in it. Thats it! -- https://mail.python.org/mailman

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 10:24, Steven D'Aprano wrote: On Thursday 30 June 2016 12:13, Rustom Mody wrote: The irrational and emotional psychological forces that inspire mathematicians can make interesting reading, but they have no relevance in deciding who is write or wrong. Hmm, so math is not inspir

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 10:24, Steven D'Aprano wrote: On Thursday 30 June 2016 12:13, Rustom Mody wrote: [ ... ] Besides, the whole point of science is to develop objective, rational reasons to believe things. Science is not about believing, but about models. Believing is important to make the career

Re: Can math.atan2 return INF?

2016-06-30 Thread Andreas Röhler
On 30.06.2016 03:33, Lawrence D’Oliveiro wrote: So you see, like it or not, we are drawn to the conclusion that there *was* indeed something before our particular Big Bang. That's linear like the Big Bang theorie. What about assuming something beyond our notion of time and space, unknown s

Re: Operator Precedence/Boolean Logic

2016-06-23 Thread Andreas Röhler
On 23.06.2016 14:08, Antoon Pardon wrote: Op 23-06-16 om 13:45 schreef Chris Angelico: On Thu, Jun 23, 2016 at 7:23 PM, Antoon Pardon wrote: I don't care. In modern mathematics, zero is usaly defined as the empty set. The empty set contains nothing, but it isn't nothing itself. Otherwise the

Re: Operator Precedence/Boolean Logic

2016-06-23 Thread Andreas Röhler
On 23.06.2016 11:46, Marko Rauhamaa wrote: Ridiculous? It was this line of thinking that led Paul Dirac to predict the existence of antimatter. Marko Yeah. Maybe we could construct examples already using antagonistic charges of electrons? -- https://mail.python.org/mailman/listinfo/pytho

Re: Operator Precedence/Boolean Logic

2016-06-23 Thread Andreas Röhler
On 23.06.2016 11:17, Steven D'Aprano wrote: [ ... ] We can derive arithmetic from set theory. IMO not, resp. not really. But that would make a another item, pretty off-topic from Python. Should you know a place where to continue, would like to follow up. Thanks BTW. Zero is very speci

Re: Operator Precedence/Boolean Logic

2016-06-23 Thread Andreas Röhler
On 23.06.2016 10:17, Antoon Pardon wrote: Op 23-06-16 om 09:05 schreef Steven D'Aprano: On Thursday 23 June 2016 16:34, Andreas Röhler wrote: Indeed, why should the result of 4 - 4 have a different truth-value than 4 - 3 ? Because 4-4 is zero, which is "nothing", while 4-3 i

Re: Operator Precedence/Boolean Logic

2016-06-23 Thread Andreas Röhler
On 23.06.2016 09:05, Steven D'Aprano wrote: On Thursday 23 June 2016 16:34, Andreas Röhler wrote: Indeed, why should the result of 4 - 4 have a different truth-value than 4 - 3 ? Because 4-4 is zero, which is "nothing", Hmm, water freezes at zero degree celsius, beca

Re: Operator Precedence/Boolean Logic

2016-06-22 Thread Andreas Röhler
On 23.06.2016 06:47, Lawrence D’Oliveiro wrote: On Thursday, June 23, 2016 at 3:12:52 PM UTC+12, Larry Hudson wrote: On 06/22/2016 12:42 AM, Lawrence D’Oliveiro wrote: * boolean operators don’t have to operate on boolean values. The language spec

Re: Distinction between “class” and “type”

2016-05-14 Thread Andreas Röhler
I suspect that one could produce a class that is not a type, Say: has not a complete type definition. Think of type for example with the distinction of strings and numbers. Types start from low level units. A class definition must know about strings and numbers, it inherits this knowledge

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

Probem with fbconsole

2015-01-04 Thread Ole Andreas Gløersen
I want to enter text msg and upload picture (so all friends can see and some private pictures) to my Facebook acount. I'm working with fbconsole (it's important that it is text based command line) for setting up cron job on a Raspberry Pi. My code: import fbconsole redirect_uri = "https://lo

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: 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: 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: 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: 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: 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: 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: 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: 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: 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

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

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: 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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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-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-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: Question about mailing list rules

2013-07-12 Thread Andreas Perstinger
://sscce.org/ before posting your latest 10,000 line program :-) Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: A few questiosn about encoding

2013-06-20 Thread Andreas Perstinger
lues to patterns, or vice versa. In this manner, final-form documents can be exchanged and faithfully rendered." http://files.pef-format.org/specifications/pef-2008-1/pef-specification.html#Unicode I wish you a pleasant sleep tonight. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Help me with the script? How to find items in csv file A and not in file B and vice versa

2013-06-18 Thread Andreas Perstinger
riterows([item] for item in_a_not_b) The syntax for the for-clause in a comprehension is for x in something thus you are missing the "in" keyword: writer.writerows([item] for item in in_a_not_b) Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: C vs Python terminology

2013-06-16 Thread Andreas Perstinger
On 16.06.2013 14:55, Dave Angel wrote: On 06/16/2013 07:22 AM, Andreas Perstinger wrote: On 16.06.2013 08:32, Denis McMahon wrote: C: ^ int a, b; b = 6; a = b; In C, this places the numeric value 6 into the memory location identified ^ by the variable "b"

OT: C vs Python terminology (was: A certainl part of an if() structure never gets executed)

2013-06-16 Thread Andreas Perstinger
he name "b" to it. Then it binds the name "a" to the same object. Thus both "a" and "b" reference the same object, i.e. they are different names for the same object." Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't feed the troll...

2013-06-15 Thread Andreas Perstinger
Nick the Gr33k wrote: >You are spamming my thread. Well, you don't own this thread. In fact nobody owns it. This is a public forum and thus anybody can answer to any post as he likes. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Pattern Search Regular Expression

2013-06-15 Thread Andreas Perstinger
up the basic regex metacharacters and try to come up with a solution (Hint: you will need groups) http://docs.python.org/3/howto/regex.html#regex-howto http://docs.python.org/3/library/re.html#regular-expression-syntax Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Having a hard time to 'get' bing api search results

2013-06-14 Thread Andreas Perstinger
e 365, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python2.7/json/decoder.py", line 381, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Expecting property name: line 2 column 1 (char 2) Thanks for your inputs Andreas. Also, thi

Re: Having a hard time to 'get' bing api search results

2013-06-13 Thread Andreas Perstinger
load() can't parse your file due to an error at the beginning of line 2. So can you please post the first lines of your file? Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrong website loaded when other requested

2013-06-13 Thread Andreas Perstinger
oo) and to the forum at devshed.com (at least you've found the right subforum there). Thank you very much! Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Wrong website loaded when other requested

2013-06-13 Thread Andreas Perstinger
plain text. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem creating a regular expression to parse open-iscsi, iscsiadm output (help?)

2013-06-13 Thread Andreas Perstinger
x27;SID': '154', 'ipaddr': '221.128.52.224', 'initiatorName': 'iqn.1996-04.de.suse:01:7c9741b545b5', 'sessionState': 'LOGGED_IN', 'iqn': 'iqn.1992-04.com.emc:vplex-8460319f-00000007&#

Re: A certainl part of an if() structure never gets executed.

2013-06-12 Thread Andreas Perstinger
nths): print(' %s ' % (i, month) ) to somehow return '==' instead of 0 but don't know how. As with most of your problems you are barking up the wrong tree. Why not use the actual value you get from the form to check whether you have a valid month? Do you und

Re: OT: e-mail reply to old/archived message

2013-06-11 Thread Andreas Perstinger
On 11.06.2013 22:14, Νικόλαος Κούρας wrote: Τη Τρίτη, 11 Ιουνίου 2013 2:21:50 μ.μ. UTC+3, ο χρήστης Andreas Perstinger έγραψε: > sending the mail to python-list@python.org will just open anew > subject intead of replyign to an opened thread. You would need to find out the Message-Id

Re: Receing a form variable as a list instead of as a string

2013-06-11 Thread Andreas Perstinger
FieldStorage or MiniFieldStorage instance but a list of such instances. Similarly, in this situation, form.getvalue(key) would return a list of strings." http://docs.python.org/3.3/library/cgi.html#using-the-cgi-module Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

OT: e-mail reply to old/archived message (was Re: Encoding questions (continuation))

2013-06-11 Thread Andreas Perstinger
reply to and then add manually the In-Reply-To and References headers to your e-mail using that Id. It's probably easier to just use the web interface at Gmane. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Andreas Perstinger
BCDIC and ASCII and Unicode are charactet sets, correct? iso-8859-1, iso-8859-7, utf-8, utf-16, utf-32 and so on are encoding methods, right? Look at http://www.unicode.org/glossary/ for an explanation of all the terms. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-10 Thread Andreas Perstinger
's. what the 'b' is tryign to say? '\x' is an escape sequence and means that the following two characters should be interpreted as a number in hexadecimal notation (see also the table of allowed escape sequences: http://docs.python.org/3/reference/lexical_analysis.

Re: Changing filenames from Greeklish => Greek (subprocess complain)

2013-06-09 Thread Andreas Perstinger
alue > 127 ? >>> s = 'α' >>> s.encode('iso-8859-7') b'\xe1' >>> bin(0xe1) '0b1111' Now look at the table on https://en.wikipedia.org/wiki/UTF-8#Description to find out how many bytes a UTF-8 decoder expects when it reads that value. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Source code as text/plain

2013-06-04 Thread Andreas Perstinger
7;tip' tag? http://hg.python.org/cpython/help/tip Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: netcdF4 variables

2013-06-01 Thread Andreas Perstinger
t;>> ncf.variables.keys() should return a view (or list, depending on your python version) of all keys, i.e. all variable names. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 378: Format Specifier for Thousands Separator

2013-05-24 Thread Andreas Perstinger
stand your question. Don't worry. I guess most people on this list don't understand it either. It looks like dihedral is a bot although nobody knows for sure. Search for some other posts from him/her/it in the archive and form your own opinion. IMHO you can simply ignore him/her/it. B

Re: Illegal seek error with seek() and os.lseek()

2013-05-14 Thread Andreas Perstinger
o 29] Illegal seek" The device relpcfpga is a char device. Are you sure that your device is seekable? Try f = open("/dev/relpcfpga", "r+b", buffering=0) print(f.seekable()) Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: global variable not working inside function. Increment

2013-05-13 Thread Andreas Perstinger
;t know which tutorials you read. So why don't you tell them yourself? Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in "Import gv " module

2013-04-22 Thread Andreas Perstinger
a/12698636 2) Try some other Graphviz bindings. A quick search on PyPi gave me: https://pypi.python.org/pypi/pygraphviz/1.1 https://pypi.python.org/pypi/pydot/1.0.28 https://pypi.python.org/pypi/yapgvb/1.2.0 Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Error in "Import gv " module

2013-04-22 Thread Andreas Perstinger
" errors?: https://code.google.com/p/python-graph/issues/list?can=1&q=import+gv&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&cells=tiles Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

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

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: 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: 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: Python launcher (PEP 397) and emacs python-mode.el

2013-01-31 Thread Andreas Röhler
Am 01.02.2013 00:59, schrieb Vinay Sajip: Thomas Heller ctypes.org> writes: What I meant to write is this: when the shebang line in script.py contains this: #!/usr/bin/python3.1-32 then emacs SHOULD run py.exe -3.1-32 script.py and the launcher runs c:\Python31\python.exe script.p

Re: Python launcher (PEP 397) and emacs python-mode.el

2013-01-31 Thread Andreas Röhler
Am 31.01.2013 17:35, schrieb Thomas Heller: Am 31.01.2013 12:05, schrieb Andreas Röhler: Am 31.01.2013 10:03, schrieb Thomas Heller: Has someone managed to patch python-mode.el to use the PEP 397 python launcher when you hit C-c C-c? It seems that emacs should parse the shebang line in the

Re: Python launcher (PEP 397) and emacs python-mode.el

2013-01-31 Thread Andreas Röhler
e way python-mode.el acts by default. AFAIU that launcher is implemented in Python3.3 and should not need any patch at all. Should it not work, please file a bug-report at https://bugs.launchpad.net/python-mode Andreas Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: How to tell people to ask questions the smart way

2012-09-05 Thread Andreas Perstinger
On 05.09.2012 01:05, Ben Finney wrote: Andreas Perstinger writes: On 04.09.2012 11:34, Paolo wrote: > how do I know if a JTextField has the focus? > thank to all Look there: http://www.catb.org/esr/faqs/smart-questions.html#forum That is an unhelpful response. So we have to ag

Re: focus on jtextfield

2012-09-04 Thread Andreas Perstinger
On 04.09.2012 11:34, Paolo wrote: how do I know if a JTextField has the focus? thank to all Look there: http://www.catb.org/esr/faqs/smart-questions.html#forum Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Cut out XML subtree

2012-08-29 Thread Andreas Perstinger
B.2 ... ... """ >>> tree = etree.fromstring(test) >>> subA = tree.find("subA") >>> tree.remove(subA) >>> new = etree.tostring(tree, encoding="unicode") >>> print(new) Element B.1 Element B.2 Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Python list archives double-gzipped?

2012-08-27 Thread Andreas Perstinger
in saying that there is something wrong in the browser or server setup, because I notice the same behaviour with Firefox, Chromium, wget and curl. $ ll *July* -rw-rw-r-- 1 andreas andreas 747850 Aug 27 13:48 chromium_2012-July.txt.gz -rw-rw-r-- 1 andreas andreas 748041 Aug 27 13:41 curl_2012-Jul

Re: help me debug my "word capitalizer" script

2012-08-22 Thread Andreas Perstinger
e line separator capitalised = linesep.join(lines) Because you haven't removed the newline character from each line, joining them with "linesep" introduces a second newline character after each line. Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

RE: something about split()???

2012-08-14 Thread Andreas Tawn
> I have a question about the split function? surpose a = "|",and when I use > a.split("|") , I got the list > ['"",""] ,but I want to get the empty list,what should I do ? Something like... >>> [x for x in "|".split("|") if x] [] Cheers, Drea -- http://mail.python.org/mailman/listinfo/python

Re: Beautiful Soup Table Parsing

2012-08-09 Thread Andreas Perstinger
ing == "Advances") You could also iterate through all next siblings of the header_row: for row in header_row.findNextSiblings("tr"): # do something Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: PollyReports 1.5 -- Band-oriented PDF Report Generator

2012-07-12 Thread Andreas Perstinger
On Thu, 12 Jul 2012 16:59:06 +1000 Chris Angelico wrote: > On Thu, Jul 12, 2012 at 3:35 PM, Andreas Perstinger > wrote: > > Do you mean this license?: > > http://packages.python.org/PollyReports/license.html > > > > It's the standard license for NetBSD pro

Re: ANN: PollyReports 1.5 -- Band-oriented PDF Report Generator

2012-07-11 Thread Andreas Perstinger
/licenses/bsd-license.php and GPL-compatible: http://www.gnu.org/licenses/license-list.html#FreeBSD Bye, Andreas -- http://mail.python.org/mailman/listinfo/python-list

RE: Dealing with the __str__ method in classes with lots of attributes

2012-05-14 Thread Andreas Tawn
> p.s. Is Python seeing a lot of use at Ubisoft or is this just for personal > interest (or > perhaps both)? We do use Python a fair bit, mostly for build systems and data mining, but also because it's the built-in script language for Motionbuilder. -- http://mail.python.org/mailman/listinfo/py

RE: Dealing with the __str__ method in classes with lots of attributes

2012-05-11 Thread Andreas Tawn
> >> It's also helpful to not have to display every attribute, of which > >> there may be dozens. > > > > Do I detect a code smell here? > > > I think so, Murphy's law dictates that the attribute you're interested in > will not be > displayed anyway. That's what __repr__'s for. -- http://mail.py

  1   2   3   4   5   6   7   >