Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Martin Gregorie
can write Fortran programs in any language." - from "Real Programmers don't use Pascal". -- martin@ | Martin Gregorie gregorie. | Essex, UK org | -- http://mail.python.org/mailman/listinfo/python-list

need some debug-infos on a simple regex

2010-11-12 Thread Martin Kaspar
hello dear list! i'm very new to programming and self teaching myself. I'm having a problem with a little project. I'm trying to preform an fetch-process, but every time i try it i runs into errors. i have read the Python-documents for more than ten hours now! And i have several books here - bu

Re: need some debug-infos on a simple regex

2010-11-12 Thread Martin Gregorie
On Fri, 12 Nov 2010 17:21:04 -0800, Martin Kaspar wrote: > hello dear list! > > i'm very new to programming and self teaching myself. I'm having a > problem with a little project. > This doesn't directly help with your problem, but the tool at this URL: http://

Re: Looking For Tutorial Comparison Of sh - perl - python

2010-11-14 Thread Martin Gregorie
hile applying different processing rules depending on line content and/or generating summaries. > Before I attack this myself, has anyone done > something along these lines I could piggyback upon? > I haven't seen such a comparison, but that doesn't meant that they don&#x

Re: Bigotry and hate speech on the python mailing list

2017-04-18 Thread Bob Martin
in 773391 20170418 141627 "Mario R. Osorio" wrote: >Feels like this is something personal against Steven. You should probably t= >ake this to court. I'd rather read Steven's insightful answers and rants th= >an you crying. None here is meant to sugar coat anything, and if that is wh= >at you are

Why is it faster to first pickle data before sending a dict than sending a dict directly in Python 3?

2017-06-12 Thread Martin Bammer
difference, or at least the more straight forward way to send Python objects directly to be a bit faster, as it is in Python 2. Some other interesting results from this example: - Python 2 is much faster - At least Python 3.6 is much faster than Python 3.4 Regards, Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: code review

2012-06-29 Thread Martin P. Hellwig
On Friday, 29 June 2012 20:41:11 UTC+1, Alister wrote: > On Fri, 29 Jun 2012 09:03:22 -0600, Littlefield, Tyler wrote: > > > On 6/29/2012 1:31 AM, Steven D'Aprano wrote: > >> On Thu, 28 Jun 2012 20:58:15 -0700, alex23 wrote: > >> > >>> On Jun 29, 12:57 pm, "Littlefield, Tyler" wrote: > I wa

Re: code review

2012-06-30 Thread Martin P. Hellwig
On Saturday, 30 June 2012 21:30:45 UTC+1, Alister wrote: > On Sat, 30 Jun 2012 21:38:58 +0200, Thomas Jollans wrote: > > > On 06/30/2012 08:39 PM, Thomas 'PointedEars' Lahn wrote: > >> Peter Otten wrote: > >> > >>> If you spell it > >>> > >>> def is_valid_password(password): > >>> return mud

Re: Writing a wrapper - any tips?

2012-07-13 Thread Martin P. Hellwig
On Friday, 13 July 2012 05:03:23 UTC+1, Temia Eszteri wrote: > I'm going to be looking into writing a wrapper for the Allegro 5 game > development libraries, either with ctypes or Cython. They technically > have a basic 1:1 ctypes wrapper currently, but I wanted to make > something more pythonic,

avlhqw avlhqeavlhqino ovfqalmw avlhqei avlhqeaivscunqw

2012-08-03 Thread Martin Michael Musatov
Thanks to technology, a memorandum of understanding (thanks from Tel Aviva / s, F `u / n (I [I TO rotate HM), and try to think, nature is" E | .. (no offense to kiloton preparation. .. has C, E (Visor / s Chest on Tuesday Kin \ 2 I "auto. Hi Lasso, Wilson vest / Na` martin / NH MW `. bro

Re: dbf.py API question

2012-08-04 Thread Ole Martin Bjørndalen
On Thu, Aug 2, 2012 at 5:55 PM, Ethan Furman wrote: > SQLite has a neat feature where if you give it a the file-name of ':memory:' > the resulting table is in memory and not on disk. I thought it was a cool > feature, but expanded it slightly: any name surrounded by colons results in > an in-memo

Re: dbf.py API question

2012-08-08 Thread Ole Martin Bjørndalen
On Wed, Aug 8, 2012 at 5:18 PM, Ethan Furman wrote: > Ed Leafe wrote: >> When converting from paradigms in other languages, I've often been >> tempted to follow the accepted pattern for that language, and I've almost >> always regretted it. > +1 >> When in doubt, make it as Pythoni

Re: simple client data base

2012-09-03 Thread Martin P. Hellwig
On Monday, 3 September 2012 15:12:21 UTC+1, Manatee wrote: > Hello all, I am learning to program in python. I have a need to make a > > program that can store, retrieve, add, and delete client data such as > > name, address, social, telephone number and similar information. This > > would be a

Re: splitting numpy array unevenly

2012-09-17 Thread Martin De Kauwe
On Tuesday, September 18, 2012 8:31:09 AM UTC+10, Wanderer wrote: > I need to divide a 512x512 image array with the first horizontal and vertical > division 49 pixels in. Then every 59 pixels in after that. hsplit and vsplit > want to start at the edges and create a bunch of same size arrays. Is

Re: Article on the future of Python

2012-09-25 Thread Martin P. Hellwig
On Tuesday, 25 September 2012 09:14:27 UTC+1, Mark Lawrence wrote: > Hi all, > > I though this might be of interest. > http://www.ironfroggy.com/software/i-am-worried-about-the-future-of-python > -- > > Cheers. > Mark Lawrence. I glanced over the article but it seems to me another 'I am afraid

Templating and XML modelling

2012-11-13 Thread Martin Sand Christensen
und like just what you've been looking for? -- Martin Sand Christensen IT Services, Dept. of Electronic Systems -- http://mail.python.org/mailman/listinfo/python-list

Re: debugging in eclipse

2012-11-15 Thread Martin P. Hellwig
On Thursday, 15 November 2012 12:29:04 UTC, chip...@gmail.com wrote: > Hi all! > > > > I have a stupid problem, for which I cannot find a solution... > > > > I have a python module, lets call it debugTest.py. > > > > and it contains: > > def test(): > > a=1 > > b=2 > > c=a

Python-UK Community on google+

2012-12-07 Thread Martin P. Hellwig
of. You can find it here: https://plus.google.com/u/0/communities/109155400666012015869 Hope to see you soon :-) Martin P. Hellwig -- http://mail.python.org/mailman/listinfo/python-list

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Martin P. Hellwig
On 24/01/2012 05:57, Rick Johnson wrote: I would wish that pedantic citizens of the British colony in America stopped calling whatever misinterpreted waffle they produce, English. -- mph -- http://mail.python.org/mailman/listinfo/python-list

Re: The devolution of English language and slothful c.l.p behaviors exposed!

2012-01-24 Thread Martin P. Hellwig
On 24/01/2012 14:51, J wrote: On Tue, Jan 24, 2012 at 09:05, Martin P. Hellwig wrote: On 24/01/2012 05:57, Rick Johnson wrote: I would wish that pedantic citizens of the British colony in America stopped calling whatever misinterpreted waffle they produce, English. I, sir, as a citizen of

Re: Where to put data

2012-01-26 Thread Martin P. Hellwig
On 25/01/2012 17:26, bvdp wrote: Well once you think about distributing, here is the guide line I use: - If it is meant as a library that can be 'imported' in python: > site-packages is the place to be, some linux distros are rather creative with them so be careful. - If it is a 'stand-alon

Re: speaking at PyCon

2012-01-31 Thread Martin P. Hellwig
On 29/01/2012 03:32, Eric Snow wrote: This is my first year speaking at PyCon, so I solicited speaking/preparation advice from a bunch of folks, particularly focusing on the PyCon speaking experience. I've compiled the results and put them online: http://ref.rtfd.org/speakers This is still rou

Re: Eclipse, C, and Python

2012-03-20 Thread Martin P. Hellwig
my workspace but still. Do you know how to solve this?.. Thanks You might want to install the PyDev plugin and switch to that perspective (after configuring it). Cheers, MArtin -- http://mail.python.org/mailman/listinfo/python-list

Re: f python?

2012-04-08 Thread Martin P. Hellwig
wrong, but if that is your destiny there is no point fighting it. Cheers and good luck, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python randomly exits with Linux OS error -9 or -15

2012-04-09 Thread Martin P. Hellwig
On 09/04/2012 11:01, Janis wrote: My experience is that these kind of behaviors are observed when (from most to least likeliness): - Your kernel barfs on a limit, e.g. space/inodes/processes/memory/etc. - You have a linked library mismatch - You have bit rot on your system - You have a faulty l

Re: Open Source: you're doing it wrong - the Pyjamas hijack

2012-05-09 Thread Martin P. Hellwig
uably they are not mistakes at all, are not easy forgotten and can end up haunting you. I hope you will take these comments with you as a lesson learned, I do wish you all the best and look forward to the improvements you are going to contribute. -- Martin P. Hellwig (mph) -- http://mail.pytho

Re: working with raw image files

2011-06-14 Thread Martin De Kauwe
what is a .raw file, do you mean a flat binary? -- http://mail.python.org/mailman/listinfo/python-list

Re: Rant on web browsers

2011-06-14 Thread Martin P. Hellwig
On 14/06/2011 07:31, Chris Angelico wrote: But if anyone feels like writing an incompatible browser, please can you add Python scripting? You might find that Pyjamas already fill your needs python/javascript wise. It is truly great to just write python, translate it, and then have it work in

Re: Python 2.7 and cmd on Windows 7 64 (files lost)

2011-06-24 Thread Martin v. Loewis
same also happens for parts of the registry. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Python 3.2.2rc1

2011-08-14 Thread Martin v. Löwis
nges in 3.2, see http://docs.python.org/3.2/whatsnew/3.2.html To download Python 3.2 visit: http://www.python.org/download/releases/3.2/ Please consider trying Python 3.2 with your code and reporting any bugs you may notice to: http://bugs.python.org/ Enjoy! -- Martin v. Löwis (

Re: Ten rules to becoming a Python community member.

2011-08-16 Thread Martin P. Hellwig
On 16/08/2011 18:51, Prasad, Ramit wrote: Incorrect past tense usage of "used to": """ I "used to" wear wooden shoes """ Incorrect description using "used to": """ I have become "used to" wearing wooden shoes """ Correct usage of "used to": """ Wooden shoes can be "used to" torture someone

Re: Syntactic sugar for assignment statements: one value to multiple targets?

2011-08-16 Thread Martin P. Hellwig
On 03/08/2011 02:45, gc wrote: a,b,c,d,e = *dict() where * in this context means something like "assign separately to all. Any thoughts? Thanks! Well got a thought but I am afraid it is the opposite of helpful in the direct sense. So if you don't want to hear it skip it :-) Although I c

inpipe and outpipe (and other useful functions)

2011-08-28 Thread Ole Martin Bjørndalen
(name, value) = line.split('=') # ... process tag Now, that is a lot more readable than what I had before! The library has a lot of other things in it as well, and is available here: https://github.com/olemb/lib I love Python! -- Ole Martin, http://nerdly.info/ole/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling 2.7 and 3.0 Versions of Dict

2011-08-31 Thread Martin v. Loewis
ry to a set. Actually, you could already do so in the second generator version: def distinct(iterable, keySelector = (lambda x: x)): seen = set() for item in iterable: key = keySelector(item) if key not in seen: yield item seen.add(key) # item is not needed anymore HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: How to daemonize a HTTPServer

2011-09-01 Thread Martin P. Hellwig
On 01/09/2011 04:16, babbu Pehlwan wrote: I have written a http server using BaseHTTPServer module. Now I want to instantiate it through another python script. The issue here is after instantiate the control doesn't come back till the server is running. Please suggest. Sounds like something you

Best way to print a module?

2011-09-05 Thread Martin De Kauwe
s.__dict__.keys(): if not attr.startswith('__') and not attr.endswith('__'): attr_val = getattr(sys, attr) print "%s = %s" % (attr, attr_val) Anyway if there is a better way it would be useful to hear it... Many thanks, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to print a module?

2011-09-05 Thread Martin De Kauwe
Hi, Tim yes I had a feeling my posting might be read as ambiguous! Sorry I was trying to quickly think of a good example. Essentially I have a set of .ini parameter files which I read into my program using configobj, I then replace the default module parameters if the user file is different (in my

Re: Best way to print a module?

2011-09-05 Thread Martin De Kauwe
Trying to follow the suggestion this would be the alternate implementation. import sys sys.path.append("/Users/mdekauwe/Desktop/") import params #params.py contains #apples = 12.0 #cats = 14.0 #dogs = 1.3 fname = "test.asc" try: ofile = open(fname, 'w') except IOError: raise IOError("Can

Re: Newbie...

2011-02-24 Thread Martin P. Hellwig
On 02/24/11 19:22, wisecrac...@tesco.net wrote: Hi all... I am new to this list so treat me gently... ;o) I for one welcome you :-) I use Python almost totally differently to the vast majority of people. I like "banging the metal". Well I can assure you that although you might be indeed i

Re: OT: Code Examples

2011-03-01 Thread Martin De Kauwe
On Mar 1, 3:03 am, Fred Marshall wrote: > I'm interested in developing Python-based programs, including an > engineering app. ... re-writing from Fortran and C versions.  One of the > objectives would to be make reasonable use of the available structure > (objects, etc.).  So, I'd like to read a c

Re: OT: Code Examples

2011-03-02 Thread Martin De Kauwe
On Mar 2, 3:30 am, Robert Kern wrote: > On 2/28/11 10:03 AM, Fred Marshall wrote: > > > I'm interested in developing Python-based programs, including an engineering > > app. ... re-writing from Fortran and C versions. One of the objectives > > would to > > be make reasonable use of the available

Re: 2to3 and maketrans

2011-03-03 Thread Martin v. Loewis
:u'e'}) works fine in 2.x, and will work fine in 3.x when put through 2to3 (which will convert the print and the unicode literals). If you chose to represent strings as bytes in 2.x, the answer will be different. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: 2to3 and maketrans

2011-03-03 Thread Martin v. Löwis
Am 04.03.2011 03:21, schrieb Dan Stromberg: > > On Thu, Mar 3, 2011 at 3:46 PM, Martin v. Loewis <mailto:mar...@v.loewis.de>> wrote: > > That depends on how you chose to represent text in 2.7. > The recommended way for that (also with 3.x in mind) > is

Re: 下载 below Download, in python.org site menu

2011-03-06 Thread Martin v. Loewis
translation of the entire page? It's intentional. Notice that it goes to a different URL than the English download link. Chinese readers will know when to use it. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: 下载 below Download, in python.org site menu

2011-03-06 Thread Martin v. Loewis
t Firewall :-( Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: my computer is allergic to pickles

2011-03-07 Thread Martin P. Hellwig
On 05/03/2011 01:56, Bob Fnord wrote: Any comments, suggestions? No but I have a bunch of pseudo-questions :-) What version of python are you using? How about your OS and bitspace (32/64)? Have you also tried using the non-c pickle module? If the data is very simple in structure, perhaps s

Defining class attributes + inheritance

2011-03-08 Thread Martin De Kauwe
redefine the constructor and therefore can't inherit in this way, which defeats the purpose of defining a default base class. Am I being slow is there a nice solution to this or is that the way it works? thanks, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Defining class attributes + inheritance

2011-03-08 Thread Martin De Kauwe
On Mar 9, 10:20 am, Ethan Furman wrote: > Martin De Kauwe wrote: > > Hi, > > > I think this might be obvious? I have a base class which contains X > > objects which other classes inherit e.g. > > > class BaseClass(object): > >     def _

Re: Defining class attributes + inheritance

2011-03-08 Thread Martin De Kauwe
On Mar 9, 11:50 am, "Rhodri James" wrote: > On Wed, 09 Mar 2011 00:29:18 -, Martin De Kauwe   > wrote: > > > > > > > > > On Mar 9, 10:20 am, Ethan Furman wrote: > [snip] > >> Just make sure and call the parent's constructor,

Re: Defining class attributes + inheritance

2011-03-08 Thread Martin De Kauwe
On Mar 9, 12:53 pm, "Rhodri James" wrote: > On Wed, 09 Mar 2011 01:00:29 -, Martin De Kauwe   > wrote: > > > class BaseClass(object): > >    def __init__(self, a, b, c, d): > >         self.a = a > >         self.b = b > >         self.

Code structure help

2011-03-09 Thread Martin De Kauwe
Hi, I have been working on re-writing a model in python and have been trying to adopt some of the advise offered on here to recent questions. However I am not sure how easy on the eye my final structure is and would appreciate any constructive comments/ suggestions. So broadly the model estimates

Bounds checking

2011-03-18 Thread Martin De Kauwe
print "Error state values < 0: %s" % (attr) sys.exit() if __name__ == "__main__": sys.exit(main()) thanks Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Bounds checking

2011-03-18 Thread Martin De Kauwe
> Don't check for bounds, fix any bug in the code that would set your > values out of bounds and use asserts while debugging. > whilst that is a nice idea in practice this just is not a practical solution. > Otherwise if you really need dynamic checks, it will cost you cpu, for > sure. Yes I a

Re: Bounds checking

2011-03-18 Thread Martin De Kauwe
> Offhand, my only quibble is that sys.exit is not helpful for debugging.   > Much better to raise an error: > >         if not self.funcTable.get(attribute, lambda x: True)(value): >             raise ValueError ('error out of bound') > > or define a subclass of ValueError just for this purpose.

Re: Bounds checking

2011-03-19 Thread Martin De Kauwe
> dir() has to do a bit a computation. I would be tempted to give 'state' > a set of attributes to check. Call it 'nonnegatives'. >     for attr in nonnegatives: >        if ... > > This allows for attributes not subject to that check. > > -- > Terry Jan Reedy Agreed. I was trying to just write a

Re: Bounds checking

2011-03-19 Thread Martin De Kauwe
> assert all(x >= 0 for x in (a, b, c, d, e, f, g, h, i, j)) yep neat! > Why don't you do the range check *before* storing it in state? That way > you can identify the calculation that was wrong, instead of merely > noticing that at some point some unknown calculation went wrong. I guess no r

Re: Bounds checking

2011-03-19 Thread Martin De Kauwe
> Sorry, are you trying to say that it is not practical to write correct > code that isn't buggy? Well, you're honest, at least, still I can't help > but feel that you're admitting defeat before even starting. No. What I am saying is the code is written has been well tested and *appears* to be wo

Re: Bounds checking

2011-03-20 Thread Martin De Kauwe
On Mar 19, 8:40 pm, Steven D'Aprano wrote: > On Sat, 19 Mar 2011 01:38:10 -0700, Martin De Kauwe wrote: > >> Why don't you do the range check *before* storing it in state? That way > >> you can identify the calculation that was wrong, instead of merely > &

Re: os.stat bug?

2011-03-21 Thread Martin v. Loewis
leep time, and a loop around it, it may spin in this loop. If it's not that, and if it's not any other unrelated application that uses CPU that you didn't mention, then chances are high that it's indeed the file system code of your operating system that consumes that much CPU ti

Re: Bounds checking

2011-03-21 Thread Martin De Kauwe
On Mar 21, 9:43 pm, Jean-Michel Pichavant wrote: > Martin De Kauwe wrote: > >> Sorry, are you trying to say that it is not practical to write correct > >> code that isn't buggy? Well, you're honest, at least, still I can't help > >> but feel that

Re: PyCObject_FromVoidPtr etc.

2011-03-22 Thread Martin v. Loewis
NULL; which still should be backwards-compatible with 3.1 and earlier (in which versions you actually also should check for NULL, since even PyCObject_AsVoidPointer can fail, esp. if you are passing something that isn't a PyCObject). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: "in house" pypi?

2011-03-23 Thread Martin v. Loewis
27;d like something as simple as possible, without my install headache. The easiest solution is to use a plain file system. Make a directory per project, and put all distributions of the project into the directory. Then have Apache serve the parent directory, with DirectoryIndex turned

Re: Guido rethinking removal of cmp from sort method

2011-03-24 Thread Martin v. Loewis
have stayed: how should it's implementation have looked like? If it was ok to remove it: how are people supposed to fill out the cmp= argument in cases where they use the cmp() builtin in 2.x? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Fun python 3.2 one-liner

2011-03-30 Thread Martin De Kauwe
what is the character limit on a one liner :P. Very interesting jesting apart, any more? -- http://mail.python.org/mailman/listinfo/python-list

Re: Determining version of OpenSSL

2011-04-04 Thread Martin v. Loewis
f6a5a9b7000) [...] HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

replace regex in file using a dictionary

2011-04-05 Thread Martin De Kauwe
Hi, So i want to replace multiple lines in a text file and I have reasoned the best way to do this is with a dictionary. I have simplified my example and broadly I get what I want however I am now printing my replacement string and part of the original expression. I am guessing that I will need to

Re: replace regex in file using a dictionary

2011-04-05 Thread Martin De Kauwe
yes thanks both work nicely, I will ponder the suggestions. -- http://mail.python.org/mailman/listinfo/python-list

Re: Sandboxed Python: memory limits?

2011-04-06 Thread Martin v. Loewis
t the implementations of PyMem_Malloc and PyObject_Malloc. This would catch many allocations, but not all of them. If you adjust PyMem_MALLOC instead of PyMem_Malloc, you catch even more allocations - but extensions modules which directly call malloc() still would bypass this accounting. Regar

Re: Sandboxed Python: memory limits?

2011-04-07 Thread Martin v. Loewis
Am 07.04.2011 02:06, schrieb Chris Angelico: > On Thu, Apr 7, 2011 at 6:38 AM, Martin v. Loewis wrote: >> You can adjust the implementations of PyMem_Malloc and PyObject_Malloc. >> This would catch many allocations, but not all of them. If you adjust >> PyMem_MALLOC instead

Re: looking for libpython31.a 64bit (missing from python-3.1.3.amd64.msi)

2011-04-13 Thread Martin v. Loewis
y still couldn't do what you want to do (although you didn't actually say what it is that you want to do): building extensions with mingw64 currently isn't supported at all. So if you want to build extension modules for Win64, use Visual Studio (and/or the platform SDK). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Feature suggestion -- return if true

2011-04-17 Thread Martin v. Loewis
ecuted in the original version if _temp is false, but won't get executed in your simplification. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

[ANN] Python 2.5.6 Release Candidate 1

2011-04-17 Thread Martin v. Löwis
lease, Martin Martin v. Loewis mar...@v.loewis.de Python Release Manager (on behalf of the entire python-dev team) -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] Python 2.5.6 Release Candidate 1

2011-04-18 Thread Martin v. Loewis
Am 18.04.2011 09:59, schrieb Werner F. Bruhin: > On 04/17/2011 11:57 PM, "Martin v. Löwis" wrote: >> >> http://www.python.org/2.5.6 > Just FYI, getting a 404 error on the above. Thanks. There had been a number of glitches which have been corrected. If anything l

Re: [ANN] Python 2.5.6 Release Candidate 1

2011-04-19 Thread Martin v. Loewis
> Thanks Martin, I'm glad these older releases are still getting important > fixes. > > I notice http://www.python.org/download/releases/2.5.6/NEWS.txt says the > release date was 17 Apr 2010. Presumably that should have said 2011. Thanks for pointing it out. I fixed it i

Re: multiple Python 2.7 Windows installations

2011-04-19 Thread Martin v. Loewis
tallation on Windows? Exactly so - it's unsupported. There are ways around it, but they require more familiarity with distutils and Windows internals. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: When is PEP necessary?

2011-04-23 Thread Martin v. Loewis
r example, changing the default source encoding to UTF-8 was a fairly small change, yet given past discussions, I felt that writing PEP 3120 was necessary. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Development tools and practices for Pythonistas

2011-04-26 Thread Martin P. Hellwig
On 26/04/2011 14:39, snorble wrote: I would strongly advice to get familiar with: - Lint tools (like PyLint) - Refactoring - Source Control Systems (like Mercurial Hg) - Unit Testing with Code Coverage Followed by either writing your own toolset that integrates all of the above or start learnin

Re: minimal python27.dll?

2011-04-27 Thread Martin v. Loewis
;d rather go for a static build of Python, and let the linker figure out what's needed. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python wide-python-build unicode for Windows

2011-04-29 Thread Martin v. Loewis
> But how could i do this in Windows. It's not supported. Hopefully, it will be supported in Python 3.3, due to PEP 393. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: minimal python27.dll?

2011-05-01 Thread Martin v. Loewis
t is certainly possible. The main functionality that you lose is the ability to load extension modules (.pyd files). Whether that's a serious loss or not depends on your application - in cases where you want static linkage, you can often accept not being able to do dynamic linkage. Regar

Re: minimal python27.dll?

2011-05-01 Thread Martin v. Loewis
Unicode5.1 can I just map python's unicode > functions to some Win32 unicode API? That should be possible - but I doubt it's a matter of "just". Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k buffered IO - flush() required between read/write?

2011-05-11 Thread Martin P. Hellwig
On 11/05/2011 19:08, Genstein wrote: On 11/05/2011 19:24, Terry Reedy wrote: writing and reading. If you want others to look at this more, you should 1) produce a minimal* example that demonstrates the questionable behavior, and 2) show the comparative outputs that raise your question. Thanks

Re: English Idiom in Unix: Directory Recursively

2011-05-18 Thread Martin P. Hellwig
On 17/05/2011 23:20, Ian Kelly wrote: On Tue, May 17, 2011 at 4:26 PM, Xah Lee wrote: Though, if you think about it, it's not exactly a correct description. “Recursive”, or “recursion”, refers to a particular type of algorithm, or a implementation using that algorithm. Only when used as progr

[ANN] Python 2.5.6 released

2011-05-27 Thread Martin v. Löwis
ssues, please see: http://www.python.org/2.5.6 Highlights of the previous major Python releases are available from the Python 2.5 page, at http://www.python.org/2.5/highlights.html Enjoy this release, Martin Martin v. Loewis mar...@v.loewis.de Python Release Manager (on behalf of the entire p

Re: Pros and cons of Python sources?

2017-11-26 Thread nospam . Martin Schöön
es with pip unless I did sudo pip. Follow-up question: Is there a way to find out which packages were installed using pip and which are from Debian's repo? pip list seems to list everything. /Martin -- https://mail.python.org/mailman/listinfo/python-list

Re: windows 11 what is wrong?

2022-04-27 Thread Lars Martin Hambro
Repair passed but pip3 and pip did not find pip.exe and missing modules. Lars Martin hambro Fra: Lars Martin Hambro Sendt: onsdag 27. april 2022, 21:31 Til: python-list@python.org Emne: windows 11 what is wrong? [cid:image001.png@01D85A7E.07A48030

Re: Accuracy of multiprocessing.Queue.qsize before any Queue.get invocations?

2022-05-13 Thread Martin Di Paola
/she probably didn't care how well works in a single-process scenario as this is a very special case. Thanks, Martin. On Thu, May 12, 2022 at 06:07:02PM -0500, Tim Chase wrote: The documentation says[1] Return the approximate size of the queue. Because of multithreading/multiproce

Re: Changing calling sequence

2022-05-13 Thread Martin Di Paola
You probably want something like overload/multiple dispatch. I quick search on PyPI yields a 'multipledispatch' package. I never used, however. On Wed, May 11, 2022 at 08:36:26AM -0700, Tobiah wrote: On 5/11/22 06:33, Michael F. Stemper wrote: I have a function that I use to retrieve daily dat

Re: Request for assistance (hopefully not OT)

2022-05-17 Thread Martin Di Paola
t-get" says than in order to reinstall python it will have to remove half of your computer, abort. Better ask than sorry. Best of the lucks. Martin. On Tue, May 17, 2022 at 06:20:39AM -0500, o1bigtenor wrote: Greetings I was having space issues in my /usr directory so I deleted some programs

Re: Filtering XArray Datasets?

2022-06-07 Thread Martin Di Paola
of how to fix it. In my last project I had a similar problem and I ended up doing the filtering on Python and the "real work" in Julia. Thanks! Martin. On Mon, Jun 06, 2022 at 02:28:41PM -0800, Israel Brewster wrote: I have some large (>100GB) datasets loaded into memory in a t

Re: TENGO PROBLEMAS AL INSTALAR PYTHON

2022-07-08 Thread Martin Di Paola
On Fri, Jul 08, 2022 at 04:15:35PM -0600, Mats Wichmann wrote: In addition... there is no "Python 10.0" ... Mmm, perhaps that's the problem :D @Angie Odette Lima Banguera, vamos a necesitar algun traceback o algo para guiarte. Podes tambien buscar en internet (youtube) q hay varios tutori

Re: Simple message passing system and thread safe message queue

2022-07-18 Thread Martin Di Paola
s and as a challenge for you, make the server single-thread using asyncio and friends. Thanks, Martin. On Mon, Jul 18, 2022 at 06:31:28PM +0200, Morten W. Petersen wrote: Hi. I wrote a couple of blog posts as I had to create a message passing system, and these posts are here: http://blogologue.

Re: list indices must be integers or slices, not str

2022-07-20 Thread Martin Di Paola
was never released in PyPI (I guess I never saw it as more than a challenge). But the implementation is quite simple (I did a post about it): https://book-of-gehn.github.io/articles/2021/07/11/Home-Made-Python-F-String.html Thanks, Martin. On Wed, Jul 20, 2022 at 10:46:35AM -0600, Mats Wichmann wr

Re: exec() an locals() puzzle

2022-07-20 Thread Martin Di Paola
I did a few tests # test 1 def f(): i = 1 print(locals()) exec('y = i; print(y); print(locals())') print(locals()) a = eval('y') print(locals()) u = a print(u) f() {'i': 1} 1 {'i': 1, 'y': 1} {'i': 1, 'y': 1} {'i': 1, 'y': 1, 'a': 1} 1 # test 2 def f(): i = 1

Re: Simple TCP proxy

2022-07-27 Thread Martin Di Paola
s but in any moment your proxy will not activate (forward) more than N connections. This idea is thread-safe, simpler, efficient and has the queue discipline (I leave aside the usefulness). I encourage you to take time to read about the different things mentioned as concurrency and thread-related stu

Re: Which architectures to support in a CI like Travis?

2022-09-19 Thread Martin Di Paola
o two projects, both in Python, but with two totally different dependencies on the environment where they run, so their CI are different. The two examples are using Gitlab actions but the same applies to TravisCI. Thanks, Martin. On Sun, Sep 18, 2022 at 09:46:45AM +, c.bu...@posteo.jp wrote: H

Re: on the python paradox

2022-12-11 Thread Martin Di Paola
On Mon, Dec 05, 2022 at 10:37:39PM -0300, Sabrina Almodóvar wrote: The Python Paradox Paul Graham August 2004 [SNIP] Hence what, for lack of a better name, I'll call the Python paradox: if a company chooses to write

byexample: free, open source tool to find snippets of code in your docs and execute them as regression tests

2021-05-03 Thread Martin Di Paola
p install byexample And if you are a fan of Python's doctest (as I am), there is a compatibility mode that you may want to check: https://byexamples.github.io/byexample/recipes/python-doctest I would like to receive your feedback. Thanks for your time! Martin. -- https://mail.python.org/mailman/listinfo/python-list

Re: Use Chrome's / Firefox's dev-tools in python

2021-05-22 Thread Martin Di Paola
lectq will open a web browser but given that it is fully automated, it should not be a problem (well, yes, it may run a little slow however). The good side is that both can inject javascript if you have to. Would this work for you or am I saying nonsense? Thanks! Martin. On Fri, May 21, 202

Re: Use Chrome's / Firefox's dev-tools in python

2021-05-23 Thread Martin Di Paola
"unselectable text" not necessary means that it is an image. There is a CSS property that you can change to make a text selectable/unselectable. And if it is an image, it very likely that it comes from the server as such, so "intercepting" the packet coming from there will be for nothing: you

<    9   10   11   12   13   14   15   16   17   18   >