Re: ReportLab alternative for Python3

2012-03-21 Thread Emile van Sebille
On 3/21/2012 8:15 AM Katya said... Out of this GUI on user's request I want to create a report, > prefferebly in DOC or/and ODT or/and PDF or/and HTML formats. ReportLab which seems to be suitable is not ready for Python3. So, any reason why not to just run that part under python2 -- they t

Nhung dieu ban can biet

2012-03-29 Thread Nguyen Van Hung
thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Script Works Locally But Not Remotely with SSH

2012-04-02 Thread Emile van Sebille
On 3/27/2012 5:51 PM goldtech said... Hi, I have a WinXP PC running an SSH server and I have a Linux PC with an SSH client and logged into the XP seemingly OK. It's all on my personal LAN, the connection seems OK. I have a py file on the XP that I run via SSH from the Linux, it's: import webb

Re: Python-URL! - weekly Python news and links (Mar 31)

2012-04-02 Thread Emile van Sebille
On 3/31/2012 8:38 AM Cameron Laird said... And it's time to bring "Python-URL!" to a close. Three cheers for your efforts over the years keeping this going. Many heartfelt thanks, Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Programing Art or Science?

2012-04-02 Thread Emile van Sebille
On 4/2/2012 4:52 PM Jürgen Exner said... "Pascal J. Bourguignon" wrote: ccc31807 writes: Programming is neither an art nor a science, but a trade. Oh, that's why it is tought in trade schools alongside butchery, plumbing, masonry, and chimney sweeping Yes -- back when we opened our firs

Re: Python Gotcha's?

2012-04-05 Thread Emile van Sebille
On 4/5/2012 11:10 AM Jon Clements said... On Wednesday, 4 April 2012 23:34:20 UTC+1, Miki Tebeka wrote: Greetings, I'm going to give a "Python Gotcha's" talk at work. If you have an interesting/common "Gotcha" (warts/dark corners ...) please share. (Note that I want over http://wiki.python.o

Re: Learning new APIs/classes (beginner question)

2012-04-06 Thread Emile van Sebille
On 4/6/2012 1:41 PM Martin Jones said... In a nutshell: My question is: how do experienced coders learn about external/third-party classes/APIs? I'm teaching myself Python through a combination of Hetland's 'Beginning Python', various online tutorials and some past experience coding ASP/VBScript

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

2012-04-09 Thread Emile van Sebille
On 4/9/2012 3:47 AM Alain Ketterlin said... Janis writes: I have this problem with my script exiting randomly with Linux OS status code -9 (most often) or -15 (also sometimes, but much more rarely). My guess is that your script hits a limit, e.g., number of open files, or stack-size, or...

Re: functions which take functions

2012-04-09 Thread Emile van Sebille
On 4/9/2012 11:57 AM Kiuhnm said... Do you have some real or realistic ... yes (but easy and self-contained) aah, no. examples when you had to define a (multi-statement) function and pass it to another function? This weekend I added functionality to a subsystem that allows users to

Re: Newbie python questions...

2012-04-14 Thread Emile van Sebille
On 4/14/2012 11:25 AM vmars316 said... win7HomePremium: Greetings, 1) I installed portablePython(pP) here: C:\Users\vmars\Python3 ?Does that look ok? 2) I would like to try pyWin, but it won't let me install because there is no pP3.2 in registry. ? How can I update the Registry for Python3.2

Re: I couldn't use the sign funcion inside of another function

2012-04-23 Thread Emile van Sebille
On 4/23/2012 11:39 AM Chris Rebert said... On Mon, Apr 23, 2012 at 11:29 AM, Julio Sergio wrote: I want to use the sign function. When I use it in in-line mode works pretty well: : sign(-20) : -1 However, I wrote the following code in a file, say, pp.py def tst(x): s = sign(x)

Re: int object

2012-04-28 Thread Emile van Sebille
On 4/27/2012 11:42 PM Debashish Saha said... 44 sph_yn_P=(l*sph_yn(l,K*R)/(K*R))-sph_yn(l,K*R) Here you're clearly multiplying by R... ---> 45 Beta_l=l-(K_P*R(sph_jv(l+1,K_P*R))/(sph_jv(l,K_P*R))) ... and here you've got R(...) which is attempting to call R() which isn't def

Re: Trouble splitting strings with consecutive delimiters

2012-05-01 Thread Emile van Sebille
re.split(':|;|px', "width:150px;height:50px;float:right") You could recognize that the delimiter you want to strip is in fact px; and not px in and of itself. So, try: re.split(':|px;', "width:150px;height:50px;float:right") Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble splitting strings with consecutive delimiters

2012-05-01 Thread Emile van Sebille
On 5/1/2012 10:13 AM Temia Eszteri said... re.split(':|px;', "width:150px;height:50px;float:right") Emile That won't work at all outside of the example case. It'd choke on any attribute seperator that didn't end in px. It would certainly choke on all delimeters that are not presented in the

Re: key/value store optimized for disk storage

2012-05-04 Thread Emile van Sebille
On 5/4/2012 10:46 AM Tim Chase said... I hit a few snags testing this on my winxp w/python2.6.1 in that getsize wasn't finding the file as it was created in two parts with .dat and .dir extension. Also, setting key failed as update returns None. The changes I needed to make are marked below.

Re: key/value store optimized for disk storage

2012-05-04 Thread Emile van Sebille
On 5/4/2012 12:49 PM Tim Chase said... On 05/04/12 14:14, Emile van Sebille wrote: On 5/4/2012 10:46 AM Tim Chase said... I hit a few snags testing this on my winxp w/python2.6.1 in that getsize wasn't finding the file as it was created in two parts with .dat and .dir extension. Hrm..

Re: How to compute a delta: the difference between lists of strings

2012-05-05 Thread Emile van Sebille
On 5/5/2012 5:12 AM J. Mwebaze said... This is out of curiosity, i know this can be done with python diffllib module, but been figuring out how to compute the delta, Consider two lists below. s1 = ['e', 'f', 'g', 'A', 'B', 'C', 'D', 'C'] s2 =['e', 'A', 'B', 'f', 'g', 'C', 'D', 'z'] This is the

Re: When convert two sets with the same elements to lists, are the lists always going to be the same?

2012-05-05 Thread Emile van Sebille
On 5/5/2012 4:04 AM Peng Yu said... I agree that people have different opinions on issues like this. But I think that "The Customer Is God". Readers of the doc is the customers, the writers of the doc is the producers. The opinion of customers should carry more weight than producers. Only to a

Re: __all__, public API, private stuff, and leading _

2012-05-11 Thread Emile van Sebille
On 5/11/2012 9:41 AM Ethan Furman said... Style question: Since __all__ (if defined) is the public API, if I am using that should I also still use a leading underscore on my private data/functions/etc? I would, even if only to alert any future maintainer of the internal vs exposed nature of t

Re: Good data structure for finding date intervals including a given date

2012-05-13 Thread Emile van Sebille
On 5/12/2012 5:17 AM Jean-Daniel said... Hello, I have a long list of n date intervals that gets added or suppressed intervals regularly. I am looking for a fast way to find the intervals containing a given date, without having to check all intervals (less than O(n)). ISTM the fastest way is t

Re: write a bot

2012-05-13 Thread Emile van Sebille
On 5/13/2012 2:25 PM admin lewis said... Hi, I want write a bot in python, it should explore a site, click links and extract some info. I know mechanize but I would like to know if there is something better for performance. Have you looked into Scrapy? http://scrapy.org Emile -- http://mai

Re: Jython 2.7 alpha1 is out!

2012-05-19 Thread Guido van Rossum
t; Please report any bugs here: http://bugs.jython.org/ Thanks! > > -Frank > -- > http://mail.python.org/mailman/listinfo/python-announce-list > >        Support the Python Software Foundation: >        http://www.python.org/psf/donations/ -- --Guido van Rossum (python.org/~guido) -- http://mail.python.org/mailman/listinfo/python-list

Re: DIR reports file timestamp and size, but os.path.getctime(), os.path.getsize() raise WindowsError [Error 5] Access is denied

2012-05-22 Thread Emile van Sebille
On 5/21/2012 5:01 PM [email protected] said... Wondering if any of you have stumbled across the following behavior: Any ideas on how I can retrieve timestamps and file sizes like DIR without raising exceptions? Beyond the obvious trap the error and use the commands module to run DIR direct

Re: append method

2012-05-23 Thread Emile van Sebille
On 5/23/2012 5:23 AM 水静流深 said... >>> s=[1,2,3] >>> s.append(5) >>> s [1, 2, 3, 5] >>> s=s.append(5) >>> s >>> print s None why can't s=s.append(5) It could, but it doesn't. ,what is the reason? A design decision -- there's currently a mix of methods that return themselves and not

Re: Help doing it the "python way"

2012-05-24 Thread Emile van Sebille
On 5/24/2012 2:30 PM Paul Rubin said... Paul Rubin writes: new_list = chain( ((x,y-1), (x,y+1)) for x,y in coord_list ) Sorry: new_list = list(chain( ((x,y-1), (x,y+1)) for x,y in coord_list)) >>> from itertools import chain >>> coord_list = zip(range(20,30),range(30,40)) >>> a =

Re: About a list comprehension to transform an input list

2012-06-08 Thread Emile van Sebille
On 6/8/2012 9:17 AM Daniel Urban said... On Fri, Jun 8, 2012 at 6:10 PM, Julio Sergio wrote: > From a sequence of numbers, I'm trying to get a list that does something to even numbers but leaves untouched the odd ones, say: [0,1,2,3,4,...] ==> [100,1,102,3,104,...] I know that this can be d

Re: using identifiers before they are defined

2012-06-12 Thread Emile van Sebille
On 6/12/2012 10:53 AM Julio Sergio said... So I modified my module: global something a = something(5) def something(i): return i And this was the answer I got from the interpreter: ->>> import tst Traceback (most recent call last): File "", line 1, in File "tst.py

Re: finding the byte offset of an element in an XML file (tell() and seek()?)

2012-06-14 Thread Emile van Sebille
On 6/14/2012 12:27 PM Ben Temperton said... Hi there, I am working with mass spectroscopy data in the mzXML format that looks like this: ... ... ... ... . 160409990 160442725 160474927 160497386

Re: mbox parsing, specifically message body

2012-06-14 Thread Emile van Sebille
On 6/14/2012 12:57 PM Ryan Clough said... Hello everyone, Is anyone familiar with a simple way to parse mbox emails in Python? >>> import mailbox >>> help(mailbox) Help on module mailbox: NAME mailbox - Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes. Emile I use

Re: PIL for the Python 3.2.3

2012-06-15 Thread Emile van Sebille
On 6/15/2012 5:18 AM Gonzalo de Soto said... Dear Python Org, It wanted to know if already PIL's version is available for Python 3.2.3. Not yet. See http://www.pythonware.com/products/pil/ Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: Academic citation of Python

2012-06-16 Thread Emile van Sebille
Or copy a citation from Guido: http://www.python.org/~guido/Publications.html Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic Zero Padding.

2011-06-07 Thread Emile van Sebille
On 6/7/2011 2:36 PM Friedrich Clausen said... Hello All, I want to print some integers in a zero padded fashion, eg. : print("Testing %04i" % 1) Testing 0001 but the padding needs to be dynamic eg. sometimes %05i, %02i or some other padding amount. But I can't insert a variable into the form

Re: I don't know list, I not good at list.

2011-07-13 Thread Emile van Sebille
On 7/13/2011 2:13 PM Ellerbee, Edward said... I've been beating my head against the desk trying to figure out a method to accomplish this: #- My intent is to have the end data come out (from the example list above) in the forma

Re: how to get a list of all the hosts on the intranet around my workstation?

2011-07-16 Thread Emile van Sebille
On 7/16/2011 9:52 AM Chris Angelico said... On Sun, Jul 17, 2011 at 2:31 AM, Phlip wrote: pydhcplib? Shell to a DHCP utility? Ping every server in a range around my own? I'd say there's several imperfect options, and no perfect ones. 1) DHCP, which hosts may or may not be using. 2) DNS - lo

Re: list comprehension to do os.path.split_all ?

2011-07-28 Thread Emile van Sebille
On 7/28/2011 1:18 PM gry said... [python 2.7] I have a (linux) pathname that I'd like to split completely into a list of components, e.g.: '/home/gyoung/hacks/pathhack/foo.py' --> ['home', 'gyoung', 'hacks', 'pathhack', 'foo.py'] os.path.split gives me a tuple of dirname,basename, but the

Re: ANN: geany-pyflakes 1.0

2011-08-05 Thread Emile van Sebille
On 8/5/2011 9:14 AM Filip Gruszczyński said... Hello everyone, I have just published a small plugin for Geany IDE that adds Pyflakes error detection to the editor. If there are people using Geany for Python development I would be very grateful for opinions and suggestions. The plugin can be fou

Re: ANN: geany-pyflakes 1.0

2011-08-05 Thread Emile van Sebille
On 8/5/2011 11:58 AM Filip Gruszczyński said... fyi - the downloaded geany-pyflakes-1.0.tar.gz is in fact not gzipped and should either be gizzped or simply named geany-pyflakes-1.0.tar. However, after activating the plugin, asking geany for a new file breaks geany and it rudely closes so I'm un

Re: Table Driven GUI Definition?

2011-08-05 Thread Emile van Sebille
On 8/5/2011 10:53 AM Tim Daneliuk said... I have a task where I want to create pretty simple one page visual interfaces (Graphical or Text, but it needs to run across Windows, Cygwin, Linux,*BSD, OSX ...). These interfaces are nothing more than option checklists and text fields. I'm not happen

Re: Get the name of a function

2011-08-05 Thread Emile van Sebille
On 8/5/2011 11:52 AM gervaz said... Hi all, is there a way to retrive the function name like with self.__class__.__name__? yes, but not reliably: Python 2.6.4rc2 (r264rc2:75497, Oct 20 2009, 02:55:11) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information.

Re: Replace all references to one object with references to other

2011-08-05 Thread Emile van Sebille
On 8/5/2011 12:37 PM Jack Bates said... I have two objects, and I want to replace all references to the first object - everywhere - with references to the second object. What can I try? Start with a proxy to your first and have it swap in to the second? EMile -- http://mail.python.org/mailma

Re: how to separate a list into two lists?

2011-08-06 Thread Emile van Sebille
On 8/6/2011 10:07 AM smith jack said... if a list L is composed with tuple consists of two elements, that is L = [(a1, b1), (a2, b2) ... (an, bn)] is there any simple way to divide this list into two separate lists , such that L1 = [a1, a2... an] L2=[b1,b2 ... bn] >>> L = [('a1', 'b1'), ('a2'

Re: decorator issue with modules dbus & gobject

2011-08-21 Thread Emile van Sebille
On 8/18/2011 5:02 AM Makiavelik said... Hi, Here is a sample code that reproduces the issue : Not really 'sample' enough to allow others to investigate... ImportError: No module named gobject ImportError: No module named dbus ImportError: No module named dbus.mainloop.glib Try to eliminate th

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

2011-08-22 Thread Emile van Sebille
On 8/22/2011 2:55 AM Richard D. Moores said... I couldn't resist giving it a try. Using Python 3.2.1 on a 64-bit Windows 7 machine with a 2.60 gigahertz AMD Athlon II X4 620 processor, I did 18 tests, alternating between n=n+1 and n+=1 (so 9 each). The fastest for n+=1 was C:\Windows\System32>

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

2011-08-22 Thread Emile van Sebille
On 8/22/2011 9:35 AM Emile van Sebille said... On 8/22/2011 2:55 AM Richard D. Moores said... Coincidence? Naaa.. I just ran it twice -- once per ... _this_ is coincidence. :) Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Emile

Re: is there any principle when writing python function

2011-08-27 Thread Emile van Sebille
On 8/27/2011 9:41 AM Roy Smith said... Chris Angelico wrote: the important considerations are not "will it take two extra nanoseconds to execute" but "can my successor understand what the code's doing" and "will he, if he edits my code, have a reasonable expectation that he's not breaking stuf

Re: Arrange files according to a text file

2011-08-27 Thread Emile van Sebille
On 8/27/2011 10:03 AM [email protected] said... Hello, What would be the best way to accomplish this task? I'd do something like: usernames = """Adler, Jack Smith, John Smith, Sally Stone, Mark""".split('\n') filenames = """Smith, John - 02-15-75 - business files.doc Random Data - Adler J

Re: Arrange files according to a text file

2011-08-27 Thread Emile van Sebille
inside? Sure. Emile Thank you once again. On Sat, 27 Aug 2011 11:06:22 -0700, Emile van Sebille wrote: On 8/27/2011 10:03 AM [email protected] said... Hello, What would be the best way to accomplish this task? I'd do something like: usernames = """Adler, Ja

Re: is there any principle when writing python function

2011-08-27 Thread Emile van Sebille
On 8/27/2011 2:57 PM Ben Finney said... Emile van Sebille writes: Code is first and foremost written to be executed. “Programs must be written for people to read, and only incidentally for machines to execute.” —Abelson& Sussman, _Structure and Interpretation of Comp

Re: Arrange files according to a text file

2011-08-27 Thread Emile van Sebille
On 8/27/2011 4:18 PM [email protected] said... Thank you so much. The code worked perfectly. This is what I tried using Emile code. The only time when it picked wrong name from the list was when the file was named like this. Data Mark Stone.doc How can I fix this? Hope I am not asking too mu

Re: How to save the packages received by a network interface or some port in a file and resend the packages received when needed?

2011-08-31 Thread Emile van Sebille
On 8/31/2011 6:35 AM [email protected] said... hi, This is a question not specific to Python,but its related somehow,and I believe I can get some help from your fellow:) I am doing my work on a server service program on Linux that processes the packages sent to the socket it listens.Their

Re: Why do class methods always need 'self' as the first parameter?

2011-08-31 Thread Emile van Sebille
On 8/31/2011 7:35 AM T. Goodchild said... Just curious about the rationale behind this part of the language. http://docs.python.org/faq/design.html -- http://mail.python.org/mailman/listinfo/python-list

Re: How to save the packages received by a network interface or some port in a file and resend the packages received when needed?

2011-08-31 Thread Emile van Sebille
On 8/31/2011 8:37 AM [email protected] said... In fact,UDP is enough for me,I heared that tcpdump and netcat can store and resend the udp packages to get the replay effect,but I don't know how, That may be, but I've never tried that. or is there some better way? I am working on a Linux ser

Re: [Python-ideas] allow line break at operators

2011-09-02 Thread Guido van Rossum
on > with backslash or implicit continuation of parenthesized expressions > is just not that heavy a price to pay.  Perhaps historically some of > these ideas could have been implemented, but now they're just going to > confuse a host of editors and code analysis tools. Tot

Re: Why do class methods always need 'self' as the first parameter?

2011-09-05 Thread Piet van Oostrum
e which definition of the method applies. It would be silly to repeat this information after the parenthesis. Not only silly, it would be stupid as it would be a source of errors, and an example of DRY. -- Piet van Oostrum WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] -- http://mail.python.org/mailman/listinfo/python-list

Re: Closures and Partial Function Application

2011-09-05 Thread Piet van Oostrum
Travis Parks writes: > I also like partial function application. What is the easiest way of > achieving this in Python? Would it look something like this: > > def foo(x, y): > return x + y > > xFoo = lambda y: foo(10, y) from functools import partial xfoo = partial(

Re: PEP 20 - Silly Question?

2011-09-07 Thread Emile van Sebille
On 9/6/2011 6:31 PM Joshua Miller said... You sure it wasn't the invisible one? you know the one in the white text that blends into the background? Aah! So _that's_ significant whitespace! :) Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing WebDAV server

2011-09-07 Thread Piet van Oostrum
mple the Finder on Mac OS X, or probably the Windows Explorer) it can serve the contents of the directory. -- Piet van Oostrum WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] -- http://mail.python.org/mailman/listinfo/python-list

Re: Why do class methods always need 'self' as the first parameter?

2011-09-07 Thread Piet van Oostrum
es the decoration just tell Python not to turn an object's function > into a method? I.e. Is the decorator basically just the syntactic sugar for > doing the above? The classmethod decorator transforms the method (or actually the function) into a different kind of object (

Re: come back and find python 3

2011-02-26 Thread Emile van Sebille
On 2/26/2011 11:36 AM pipehappy said... Hi, all Just come back to use Python, but find something has changed in Python 3. Like package name is no longer with capitalized char for each word in the name; convenient print is removed. And I don't know why can someone inside explain to me about this

Re: Python getting stuck

2011-02-27 Thread Emile van Sebille
On 2/26/2011 5:10 PM Dan Stromberg said... Agreed, a more detailed description would greatly help us help you, but if you're in the standard windows terminal emulator widget (command.com , cmd.exe, powershell), then don't click in the window without first turning on "quick edi

Re: OT: Code Examples

2011-03-01 Thread Emile van Sebille
On 3/1/2011 12:43 AM Erik de Castro Lopo said... Why Python? For me? Because it's executable pseudocode Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Strange occasional marshal error

2011-03-03 Thread Guido van Rossum
they're needed.) That macro looks fine to me; looking at the definition of w_byte() it has matched if/else clauses: #define w_byte(c, p) if (((p)->fp)) putc((c), (p)->fp); \ else if ((p)->ptr != (p)->end) *(p)->ptr++ = (c); \ else w_more(c, p) Although traditionally, just to be sure, we've enclosed similar macros inside do { ... } while (0). Also it would be nice to call out its macro-status by renaming it to W_BYTE -- I suppose at one point in the past it was a plain function... -- --Guido van Rossum (python.org/~guido) -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: Code Examples

2011-03-03 Thread Emile van Sebille
On 3/1/2011 3:59 PM Chris Jones said... On Tue, Mar 01, 2011 at 12:03:02PM EST, Emile van Sebille wrote: On 3/1/2011 12:43 AM Erik de Castro Lopo said... Why Python? For me? Because it's executable pseudocode Not for nothing, Emile.. hey.. you could end up with pseudo bugs and p

Re: send function keys to a legacy DOS program

2011-03-11 Thread Emile van Sebille
On 3/10/2011 4:58 PM Justin Ezequiel said... Greetings, We have an old barcode program (MSDOS and source code unavailable.) I've figured out how to populate the fields (by hacking into one of the program's resource files.) However, we still need to hit the following function keys in sequence. F5

Re: problem installing a module

2011-03-22 Thread Emile van Sebille
On 3/22/2011 8:19 AM luca72 said... Hello i try to install pyvisa under winxp sp3 i get this error: home_dir =os.environ['HOME'] Installation is clearly expecting a HOME environment variable that isn't there. You'll need to set it then install. HTH, Emile return self.data[key.upper()]

Re: Python CPU

2011-04-01 Thread Emile van Sebille
On 4/1/2011 8:38 AM Brad said... Hi All, I've heard of Java CPUs. Has anyone implemented a Python CPU in VHDL or Verilog? -Brad http://code.google.com/p/python-on-a-chip/ Emile -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CPU

2011-04-01 Thread Emile van Sebille
On 4/1/2011 11:28 AM Emile van Sebille said... On 4/1/2011 8:38 AM Brad said... Hi All, I've heard of Java CPUs. Has anyone implemented a Python CPU in VHDL or Verilog? -Brad http://code.google.com/p/python-on-a-chip/ Sorry - wrong url in the cut'n paste buffer - http://tsh

Re: Alphabetics respect to a given locale

2011-04-01 Thread Emile van Sebille
On 4/1/2011 1:55 PM candide said... How to retrieve the list of all characters defined as alphabetic for the current locale ? I think this is supposed to work, but not for whatever reason for me when I try to test after changing my locale (but I think that's a centos thing)... import locale

Re: [Twisted-Python] [ANNOUNCE] Twisted 11.0.0 Released

2011-04-03 Thread Laurens Van Houtven
Today is indeed a very, very good day. Thanks! lvh -- http://mail.python.org/mailman/listinfo/python-list

Re: Fun python 3.2 one-liner

2011-04-04 Thread Emile van Sebille
On 4/4/2011 3:16 PM Gregory Ewing said... Chris Angelico wrote: (Remind me how it is that Python code is more readable than line noise or Perl code?) Crazy thought: I wonder if Perl programmers have "multi line Perl" competitions where they laugh their heads off at how readable the code is, a

Re: Is the function filter deprecated?

2011-04-06 Thread Emile van Sebille
On 4/6/2011 4:20 PM Jabba Laci said... Hi, I tried Pylint today and it gave me a warning for the function "filter". Is it deprecated? This post from Guido written in 2005 with an undated update would seem to indicate No. http://www.artima.com/weblogs/viewpost.jsp?thread=98196 Is the us

Re: Python IDE/text-editor

2011-04-18 Thread Ton van Vliet
On Sat, 16 Apr 2011 13:20:32 +1000, Alec Taylor wrote: >Good Afternoon, > >I'm looking for an IDE which offers syntax-highlighting, >code-completion, tabs, an embedded interpreter and which is portable >(for running from USB on Windows). > >Here's a mockup of the app I'm looking for: http://i52.t

Re: Python backup programs?

2011-05-11 Thread Emile van Sebille
On 5/10/2011 4:00 PM Dan Stromberg said... What are your favorite backup programs written, in whole or in part, in Python? bup What do you like about them? resilient and written in python Dislike about them? lack of a user accessible front-end to monitor and restore Are there any fea

Python enabled gdb on Windows and relocation

2011-05-12 Thread Ruben Van Boxem
Hi, I am currently trying to integrate Python support into my toolchain build (including GDB of course). It is a sysrooted binutils+GCC+GDB+mingw-w64 toolchain. I currently have the basic setup working: I can link gdb with my manually generated import lib to the python dll from the official Windo

Python enabled gdb on Windows and relocation

2011-05-12 Thread Ruben Van Boxem
(now in plain-text as required by gdb mailing list) Hi, I am currently trying to integrate Python support into my toolchain build (including GDB of course). It is a sysrooted binutils+GCC+GDB+mingw-w64 toolchain. I currently have the basic setup working: I can link gdb with my manually generated

Re: Python enabled gdb on Windows and relocation

2011-05-14 Thread Ruben Van Boxem
2011/5/14 Doug Evans : > On Thu, May 12, 2011 at 9:19 AM, Ruben Van Boxem > wrote: >> (now in plain-text as required by gdb mailing list) >> >> Hi, >> >> I am currently trying to integrate Python support into my toolchain >> build (including GDB of cour

Re: Python enabled gdb on Windows and relocation

2011-05-14 Thread Ruben Van Boxem
2011/5/14 Eli Zaretskii : >> Date: Sat, 14 May 2011 11:09:13 +0200 >> From: Ruben Van Boxem >> Cc: [email protected], [email protected] >> >> 1. Check hardcoded path; my suggestion would be "> executable>/../lib/python27" >> 2. If thi

Re: Python enabled gdb on Windows and relocation

2011-05-15 Thread Ruben Van Boxem
2011/5/14 Doug Evans : > On Sat, May 14, 2011 at 2:09 AM, Ruben Van Boxem > wrote: >> 2011/5/14 Doug Evans : >>> On Thu, May 12, 2011 at 9:19 AM, Ruben Van Boxem >>> wrote: >>>> (now in plain-text as required by gdb mailing list) >>>> >&g

Re: Python enabled gdb on Windows and relocation

2011-05-15 Thread Ruben Van Boxem
2011/5/15 Ruben Van Boxem : > 2011/5/14 Doug Evans : >> On Sat, May 14, 2011 at 2:09 AM, Ruben Van Boxem >> wrote: >>> 2011/5/14 Doug Evans : >>>> On Thu, May 12, 2011 at 9:19 AM, Ruben Van Boxem >>>> wrote: >>>>> (now in plain-text

Re: Python enabled gdb on Windows and relocation

2011-05-15 Thread Ruben Van Boxem
2011/5/15 Ruben Van Boxem : > 2011/5/15 Ruben Van Boxem : >> 2011/5/14 Doug Evans : >>> On Sat, May 14, 2011 at 2:09 AM, Ruben Van Boxem >>> wrote: >>>> 2011/5/14 Doug Evans : >>>>> On Thu, May 12, 2011 at 9:19 AM, Ruben Van Boxem >>>

Re: Python enabled gdb on Windows and relocation

2011-05-17 Thread Ruben Van Boxem
2011/5/15 Ruben Van Boxem : > 2011/5/15 Ruben Van Boxem : >> 2011/5/15 Ruben Van Boxem : >>> 2011/5/14 Doug Evans : >>>> On Sat, May 14, 2011 at 2:09 AM, Ruben Van Boxem >>>> wrote: >>>>> 2011/5/14 Doug Evans : >>>>>> On T

Re: checking if a list is empty

2011-05-21 Thread Emile van Sebille
On 5/21/2011 7:46 AM John J Lee said... Gregory Ewing writes: Hans Georg Schaathun wrote: 0 is a number as real and existent as any other, one would think that the empty list is also as real and existent as any other list. 0 does have some special properties, though, such as being the add

Re: String to Dictionary conversion in python

2017-09-16 Thread Piet van Oostrum
Exception as e: print "%s: %s" % (type(e).__name__, ', '.join(e.args)) >>> literal("'x':1") {'x': 1} >>> literal("x:1") ValueError: malformed string But in non-interactive use you probably want to propagate the exception. -- Piet van Oostrum WWW: http://piet.vanoostrum.org/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list

Re: choice of web-framework

2017-10-23 Thread Kevin van Keeken
Greetings, while reading through this topic i would like to know, if cherrypy is a viable web-framework as well? I stumbled upon this project a while ago, but didn't read through it in detail and would like to hear something about it, especially in regards to the project requirements. Kind regar

Problem with subprocess.Popen and EINTR

2017-10-28 Thread Piet van Oostrum
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 121, in _eintr_retry_call return func(*args) OSError: [Errno 22] Invalid argument TASK is a string with the name of the shell script. Can anybody shed some light on this? -- Pie

Re: Problem with subprocess.Popen and EINTR

2017-10-29 Thread Piet van Oostrum
Or I could first try to switch to Python 3, as Chris suggested, to see if that makes the problem disappear. -- Piet van Oostrum WWW: http://piet.vanoostrum.org/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list

Re: Are Floating Point Numbers still a Can of Worms?

2022-10-23 Thread Pieter van Oostrum
cigar. (%i10) bfloat(2.718281828459045b0) - bfloat(%e); (%o10) - 2.35360287471352802147785151603b-16 Fricas: (1) -> 2.718281828459045^0.8618974796837966 (1) 2.367648_98319 (2) -> exp(0.8618974796837966) (2) 2.367649_00086 -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP

Re: [Python-Dev] Small lament...

2023-04-03 Thread Guido van Rossum
://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/Q62W2Q6R6XMX57WK2CUGEENHMT3C3REF/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) *Prono

Re: Jupyter notebooks to A4 (again)

2021-01-28 Thread Pieter van Oostrum
Martin Schöön writes: > Hello all, > > Some years ago I asked about exporting notebooks to pdf in > A4 rather than US Letter. I got help, rather detailed > instructions from you in general and Piet von Oostrum in Who now calls himself Pieter van Oostrum, just like hi

Re: Jupyter notebooks to A4 (again)

2021-01-31 Thread Pieter van Oostrum
However, due to a bug this won't work unless you patch the nbconvert export code. This is a simple one-line patch. See https://github.com/jupyter/nbconvert/pull/1496/commits/a61a2241a87912005720d3412ccd7ef7b5fce6dd -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Python 0.9.1

2021-02-16 Thread Guido van Rossum
__ > Python-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/VZYELIYAQWUHHGIIEPPJFREDX6F24KMN/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/> -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] Re: Python 0.9.1

2021-02-16 Thread Guido van Rossum
nificant in this release of Python? I see the > lack of indentation in the first Python programs. > Indentation most certainly was significant from day 0. I suspect what happened is that these files got busted somehow by the extraction process used by Skip or Hiromi. -- --Guido van Rossum

Re: Python 2.7 and 3.9

2021-02-18 Thread Pieter van Oostrum
ottom of your posts. > White space aids readability and readability counts. :) The separator line should be '-- ' (without quotes), i.e. with a trailing space. -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list

Re: [Python-ideas] Re: Looking for people interested in a Python register virtual machine project

2021-03-23 Thread Guido van Rossum
here. So o.m(f()) needs to evaluate o.m (which may have a side effect if o overrides __getattr__) before it calls f(). -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-chang

nrfutil icorrect installation

2021-10-11 Thread Gerhard van Rensburg
Dear python, I installed Python 3.10.0 I then install pip install nrfutil When I try to run nrfutil, I get ModuleNotFoundError: No module named 'constants' C:\Users\ x\nrfutil keys --help Traceback (most recent call last): File "C:\Users\Gerhard van Rensbur

Re: Recursion on list

2021-11-04 Thread Pieter van Oostrum
ast writes: >> li = [] >> li.append(li) >> li > [[...]] > >>li[0][0][0][0] > [[...]] > > That's funny > You made a list whose only element is itself. In [1]: li = [] In [3]: li.append(li) In [4]: li[0] is li Out[4]: True -- Pieter van Oost

Re: Negative subscripts

2021-11-26 Thread Pieter van Oostrum
est, or is the only > alternative to use if...then...else to cater for y = 0? If you put it in a function with x and y as parameters, then both x and y are just a simple identifier inside the function. And then you can then even eliminate the if with for item in x[:len(x)-y]: -- Pieter van O

Re: HTML extraction

2021-12-08 Thread Pieter van Oostrum
rc/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError File "", line 1 XMLSyntaxError: Premature end of data in tag hr line 1, line 1, column 13 -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list

jupyter console vs. ipython in Emacs

2021-12-19 Thread Pieter van Oostrum
--simple-prompt' in Emacs does work with multiline statements. No idea why jupyter console doesn't. Is there any advantage in using jupyter console over ipython? -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4] -- https://mail.python.org/mailman/listinfo/python-list

Re: jupyter console vs. ipython in Emacs

2021-12-20 Thread Pieter van Oostrum
Pieter van Oostrum writes: > My Python development environment is Emacs. I used to use 'jupyter > console --simple-prompt' (driven by Emacs comint) to do interactive > work, but it has the disadvantage that it doesn't work properly with > multiline input, inclu

<    1   2   3   4   5   6   7   8   9   10   >