Usage of PyDateTime_FromTimestamp

2011-08-30 Thread Andreas
Hi, I'm working on a c-extension of python and want to create an instance of python datetime object with a unix timestamp in c. On the documentation site ( http://docs.python.org/c-api/datetime.html ) I found the function PyDateTime_FromTimestamp() which returns a new reference based on an input

Re: Usage of PyDateTime_FromTimestamp

2011-08-30 Thread Andreas
Am 30.08.2011 23:49, schrieb MRAB: > The key phrase is "argument tuple". The arguments passed to a Python > call are always a tuple, not PyFloat_Object. > > You can build a tuple from the PyFloat_Object using: > > Py_BuildValue("(O)", float_object) > > The "(O)" says to build a tuple ("(...

Re: HTTPSConnection script fails, but only on some servers (long)

2005-04-13 Thread andreas
cURL and pycurl, which do support all kind of more extreme HTTP (FTP, etc.) handling, like using https over an proxy. Andreas On Tue, Apr 12, 2005 at 03:37:33AM -0400, Steve Holden wrote: > Paul Winkler wrote: > >This is driving me up the wall... any help would be MUCH appreciated. >

Re: delete will assure file is deleted?

2005-04-26 Thread andreas
t you > access that file, highly broken. Well, it has been the normal semantics with Unix for decades. Actually it's the normal way to create temporary files that will be cleanuped when the program exits: f = open("temp") os.remove("temp") # now use f f.close() # frees t

Problem compiling an extension with MS Visual C++ Toolkit 2003

2005-12-31 Thread Andreas
ing build\lib.win32-2.4\shptree.pyd -> D:\Python24\Lib\site-packages copying build\lib.win32-2.4\dbflibc.pyd -> D:\Python24\Lib\site-packages Question: -- Has anyone an idea ? Thanks, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Portable apps

2006-12-19 Thread Andreas
thing else than python? TCLKit? StarKIT? Best regards Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: pyFltk-1.1

2006-02-22 Thread andreas
To put it simply, if you think Tkinter is not very easy/simple/fast/... (fill in your favourite adjective here) then you might want to try pyFltk. It basically helps you to build simple user interfaces from Python. Regards Andreas Held http://pyfltk.sourceforge.net -- http://mail.python.org

Re: Py2Exe security

2005-05-03 Thread andreas
tants as cleartext in the binary too. Personally I'd be more concerned about the network side (use https and verify the server certificate), and debugging tools that might be able to intercept your traffic anyway. Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: SSL (HTTPS) with 2.4

2005-05-19 Thread andreas
ound on the net for some patches to httplib (google is your friend) be aware that these are quite old patches. c) using some external solution, like pycURL. Andreas On Thu, May 19, 2005 at 12:53:11PM -0400, Andrew Bushnell wrote: > Thanks for the update. I will/can keep you posted. I know for

Cannot allocate memory when using os.spawn for moving files

2009-03-17 Thread Andreas
nlp(os.P_NOWAIT, 'mv', 'mv', LOCALFILENAME, REMOTEFILENAME) where LOCALFILENAME is some string like '/home/andreas/model.bin' and REMOTEFILENAME is some string like '/home/nfs/model-output/'. Here I have the problem that after about every 10th model ru

Regex similar to "^(?u)\w$", but without digits?

2009-04-11 Thread Andreas
Hello, I'd like to create a regex that captures any unicode character, but not the underscore and the digits 0-9. "^(?u)\w$" captures them also. Is there a possibility to restrict an expression like "\w" to "\w without [0-9_]"? I'm using python 2

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

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

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

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

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

Dealing with the __str__ method in classes with lots of attributes

2012-05-10 Thread Andreas Tawn
Say I've got a class... class test(object): def __init__(self): self.foo = 1 self.bar = 2 self.baz = 3 I can say... def __str__(self): return "foo: {0}\nbar: {1}\nbaz: {2}".format(self.foo, self.bar, self.baz) and everything's simple and clean and I can vary the f

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

2012-05-10 Thread Andreas Tawn
> On Thu, May 10, 2012 at 11:33 PM, Andreas Tawn > wrote: > > Say I've got a class... > > > > class test(object): > >    def __init__(self): > >        self.foo = 1 > >        self.bar = 2 > >        self.baz = 3 > > > > I can

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

2012-05-11 Thread Andreas Tawn
> This issue bit me once too often a few months ago, and now I have a class > called > "O" from which I often subclass instead of from "object". > Its main purpose is a friendly __str__ method, though it also has a friendly > __init__. > > Code: > > class O(object): > ''' A bare objec

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

2012-05-11 Thread Andreas Tawn
> I have no idea why using __repr__ versus __str__ would make any difference in > the > order of the attributes. They're going to come out in the order you specify, > regardless of what you name your method. If you don't like the arbitrary > order you > get from the dictionary, then either sort

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? Possibly. I'll often try to subdivide into several simpler types, but sometimes that makes the code more complex than it needs to be. -- http://mail.python.org/m

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

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

Attribute Error in xml.sax.saxutils.XMLGenerator on Arch Linux (64bit)

2011-06-29 Thread Andreas Hasenkopf
ave you encountered a similar problem? Maybe you could suggest me some possible solutions to my little problem? Thanks a lot Andi -- Andreas Hasenkopf Phone: +49 151 11728439 Homepage: http://www.hasenkopf2000.net GPG Pub Key: http://goo.gl/4mOsM signature.asc Description: OpenPGP digital signature -- http://mail.python.org/mailman/listinfo/python-list

Re: relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Andreas Löscher
> What the precise difference (semantics and speed) is between the > BINARY_ADD and INPLACE_ADD opcodes, I dunno. Look in the Python source > code or maybe someone knows it from memory :-) > > Irmen > from Python/ceval.c: 1316case BINARY_ADD: 1317w = POP(); 1318

Re: relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Andreas Löscher
Am Sonntag, den 21.08.2011, 14:52 -0400 schrieb Roy Smith: > In article , > Christian Heimes wrote: > > > Am 21.08.2011 19:27, schrieb Andreas Lscher: > > > As for using Integers, the first case (line 1319 and 1535) are true and > > > there is no difference in

Re: relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Andreas Löscher
Am Sonntag, den 21.08.2011, 12:53 -0700 schrieb Laurent: > > With 64 bit 3.2.2 on my Win 7 Pentium, the difference was 4% and with > > floats (0.0 and 1.0), 6% > > For floats it is understandable. But for integers, seriously, 4% is a lot. I > would never have thought an interpreter would have di

Re: relative speed of incremention syntaxes (or "i=i+1" VS "i+=1")

2011-08-21 Thread Andreas Löscher
Am Sonntag, den 21.08.2011, 19:38 -0400 schrieb Terry Reedy: > On 8/21/2011 7:17 PM, Andreas Löscher wrote: > > Am Sonntag, den 21.08.2011, 14:52 -0400 schrieb Roy Smith: > >> In article, > >> Christian Heimes wrote: > >> > >>> Am 21.08.2011 19

RE: Remove all directories using wildcard

2011-03-18 Thread Andreas Tawn
> I'm new to python and I am trying to figure out how to remove all sub > directories from a parent directory using a wildcard. For example, > remove all sub directory folders that contain the word "PEMA" from the > parent directory "C:\Data". > > I've trying to use os.walk with glob, but I'm not

RE: Vectors

2011-04-20 Thread Andreas Tawn
> Algis Kabaila writes: > > > Are there any modules for vector algebra (three dimensional > > vectors, vector addition, subtraction, multiplication [scalar > > and vector]. Could you give me a reference to such module? > > NumPy has array (and matrix) types with support for these basic > operati

RE: Vectors

2011-04-20 Thread Andreas Tawn
> On Apr 20, 6:43 am, Andreas Tawn wrote: > > > Algis Kabaila writes: > > > > > > Are there any modules for vector algebra (three dimensional > > > > vectors, vector addition, subtraction, multiplication [scalar > > > > and vector]. Could y

RE: What other languages use the same data model as Python?

2011-05-05 Thread Andreas Tawn
> Steven D'Aprano wrote: > > > Some day, we'll be using quantum computers without memory addresses, > [ ... > ] it will still be possible to > > represent data indirectly via *some* mechanism. > > :) Cool! Pass-by-coincidence! And Python 3 already has dibs on the > 'nonlocal' keyword! > >

Newbie: Python 3.2, search for module dBase + Excel

2011-05-17 Thread Andreas Mosmann
syntax error inside the modules and I somewhere read, that both modules only exist for version 2.X Is there a way for me to use them anyway or do I have to change to any 2.X- Version? If last, which should I install? Thanks in advance Andreas remark: My task is to compare 2 directories incl

RE: starting a separate thread in maya

2011-05-20 Thread Andreas Tawn
> Hi, > I'm using python2.5 in maya 2009 x64 (in linux). For Maya/Python stuff you'll probably have more success at http://www.tech-artists.org/ Cheers, Drea -- http://mail.python.org/mailman/listinfo/python-list

RE: Python sets which support multiple same elements

2011-05-20 Thread Andreas Tawn
> For example, I was writing a program to detect whether two strings are > anagrams of each other. I had to write it like this: > > def isAnagram(w1, w2): > w2=list(w2) > for c in w1: > if c not in w2: > return False > else: > w2.remove(c) > return True > > But if there

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).

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

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

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

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

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

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

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: 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-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 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 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 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: 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: 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 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 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: extract PDF pages

2005-10-13 Thread Andreas Lobinger
Aloha, David Isaac wrote: > I am looking for a Python solution. > Just for PDF page extraction. > Any hope? With python, there's always hope. http://sourceforge.net/projects/pdfplayground In the CVS (sorry no distribution at the time) you'll find an example page-extract. http://cvs.sourceforge.n

Re: Abstract Methods & Abstract Class

2005-10-19 Thread Andreas Kostyrka
elf): raise TypeError("abstract method called") But basically, Python does not have abstract methods, and usually doesn't need them. Andreas -- http://mail.python.org/mailman/listinfo/python-list

tachometer diagram

2005-10-31 Thread Andreas Kaiser
Hello, I'am searching for a python solution for display a tachometer diagram. I prefer a solution for wxPython. The plot libraries I've found do not implement this diagram type. Any hints welcome! Thanks Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: tachometer diagram

2005-10-31 Thread Andreas Kaiser
Hello Jorge, I can change my mind, sorry. The target OS for this app is Win. When pyQt4 is available, I will check QT. Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: tachometer diagram

2005-10-31 Thread Andreas Kaiser
> I can change my mind, sorry. Should be: I _can't_ change ... Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: tachometer diagram

2005-11-02 Thread Andreas Kaiser
Hi Franz, you're right! Andrea (the developer of these widgets) sends me this link about the wxPython ML. Thanks. Andreas -- http://mail.python.org/mailman/listinfo/python-list

[Subprocess/Windows] subprocess module under Windows 98

2005-11-02 Thread Andreas Jung
ionflags' attributes but I could not find any documentation. Is there a way to suppress the DOS boxes somehow using these attributes or is there another way to get rid of them? Thanks in advance, Andreas pgpwXZAww91hx.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess module under Windows 98

2005-11-02 Thread Andreas Jung
--On 2. November 2005 08:48:24 -0800 Ernesto <[EMAIL PROTECTED]> wrote: This worked for me on XP... not sure for 98... http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/409002 Thanks, this works! Andreas pgpeWK0kWa6KX.pgp Description: PGP signature -- http://mail.pyth

Re: Addressing the last element of a list

2005-11-08 Thread Andreas Lobinger
Aloha, [EMAIL PROTECTED] wrote: > Isn't there an easier way than > lst[len(lst) - 1] = ... lst[-1] = ... Wishing a happy day LOBI -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic Link Library

2005-12-05 Thread Andreas Kostyrka
would be to create an interface module with public cdef'ed functions in Pyrex, and embed Python in your DLL. But it's certainly not something you want to try when you ask this kind of questions, it's a headache. Andreas > > Please provide any answers you may have. &g

Point of Sale

2005-01-27 Thread Andreas Pauley
open-source POS system. Can you recommend anything that I can use? Regards, Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Point of Sale

2005-01-27 Thread Andreas Pauley
On Thu, 27 Jan 2005, Cameron Laird wrote: In article <[EMAIL PROTECTED]>, Andreas Pauley <[EMAIL PROTECTED]> wrote: Hi, My company has given me a rather cool project: I have to provide them with an open-source python-based point-of-sale / cash register system that can integrat

Re: Point of Sale

2005-01-27 Thread Andreas Pauley
On Thu, 27 Jan 2005, Peter Hansen wrote: Andreas Pauley wrote: My company has given me a rather cool project: I have to provide them with an open-source python-based point-of-sale / cash register system that can integrate with their existing ERP backend. Do you have information about the

  1   2   3   4   5   6   7   >