Re: python text://protocol client?

2021-04-09 Thread Petite Abeille


> On Apr 9, 2021, at 20:34, Mats Wichmann  wrote:
> 
> seems to be part of "multiformats" work,

Multiformats, yes!

https://multiformats.io

Specifically, multiaddr in this case:

https://github.com/multiformats/multiaddr

+ service discovery:

https://en.wikipedia.org/wiki/Zero-configuration_networking#DNS-SD

±0¢

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python text://protocol client?

2021-04-09 Thread Petite Abeille



> On Apr 9, 2021, at 19:08, Eli the Bearded <*@eli.users.panix.com> wrote:
> 
> The Lua code is not long, under 2k LOC.

Shortish indeed. Wonder how much python code that would translates into. To be 
found out.


-- 
https://mail.python.org/mailman/listinfo/python-list


python text://protocol client?

2021-04-09 Thread Petite Abeille
Hello,

Would you know of any python text://protocol client? Or server?

Thanks in advance.

[1] https://textprotocol.org
[2] https://github.com/textprotocol/public
[3] https://github.com/textprotocol/publictext



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Please don't make unfounded legalistic demands

2015-08-26 Thread Petite Abeille

 On Aug 26, 2015, at 10:35 PM, Mark Lawrence breamore...@yahoo.co.uk wrote:
 
 which is standard in many organisations

https://en.wikipedia.org/wiki/Creeping_normality

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Can I download XML data from the web and save, in as CSV or TXT delimitation?

2015-08-19 Thread Petite Abeille

 On Aug 19, 2015, at 7:01 PM, Denis McMahon denismfmcma...@gmail.com wrote:
 
 Downloading xml from the web is easy
 
 writing csv or txt is easy
 
 The tricky bit is converting the xml you have into the csv or text data 
 you want.
 

curl | xml2 | 2csv

http://www.ofb.net/~egnor/xml2/ref
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: DB API question - where is a stored procedure's return value?

2014-03-12 Thread Petite Abeille

On Mar 13, 2014, at 12:00 AM, Ian Kelly ian.g.ke...@gmail.com wrote:

 As a general solution, one might wrap a stored procedure that returns
 a value into a stored procedure that has an output parameter and call
 it with callproc.  Some implementations might include a return value
 in the parameter list anyway.

Alternatively… if it’s really a function… wrap it in a select statement… such 
as:

select foo() as value from dual

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: efficient way to process data

2014-01-13 Thread Petite Abeille

On Jan 13, 2014, at 7:42 PM, Mark Lawrence breamore...@yahoo.co.uk wrote:

 I've not followed this thread closely but would this help 
 http://pandas.pydata.org/ ?  When and if you get back to it, that is!!!

I doubt it. The mean overhead by far would be to shuffle pointless data between 
the server  client. Best to process data closest to their source.

On the other hand:

http://devour.com/video/never-say-no-to-panda/



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: efficient way to process data

2014-01-12 Thread Petite Abeille

On Jan 12, 2014, at 8:23 PM, Larry Martell larry.mart...@gmail.com wrote:

 AFAIK, there is no way to do this in SQL.

Sounds like a job for window functions (aka analytic functions) [1][2].

[1] http://www.postgresql.org/docs/9.3/static/tutorial-window.html
[2] 
http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions004.htm#SQLRF06174
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Movie (MPAA) ratings and Python?

2013-12-11 Thread Petite Abeille

On Dec 11, 2013, at 12:50 AM, Dan Stromberg drsali...@gmail.com wrote:

 Now the question becomes: Why did chardet tell me it was windows-1255?  :)

As it says on the tin: chardet guesses the encoding of text files. The 
operative word is ‘guesses’.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Petite Abeille

On Dec 10, 2013, at 6:25 AM, Dan Stromberg drsali...@gmail.com wrote:

 The IMDB flat text file probably came the closest, but it appears to have 
 encoding issues; it's apparently nearly windows-1255, but not quite.

It's ISO-8859-1.

Both certificates.list.gz and mpaa-ratings-reasons.list.gz are rather 
straightforward to parse.

For the US, you will get something along these lines out of 
certificates.list.gz:

USA:(Banned)
USA:12
USA:AO
USA:Approved
USA:C
USA:E
USA:E10+
USA:G
USA:GP
USA:K-A
USA:M
USA:M/PG
USA:NC-17
USA:Not Rated
USA:Open
USA:PG
USA:PG-13
USA:Passed
USA:R
USA:T
USA:TV-14
USA:TV-G
USA:TV-MA
USA:TV-PG
USA:TV-Y
USA:TV-Y7
USA:Unrated
USA:X

And as mentioned, imdbpy handles all this out-of-the-box if you don’t feel like 
doing it yourself.




-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Self-defence

2013-11-17 Thread Petite Abeille

On Nov 17, 2013, at 6:50 PM, Yaşar Arabacı yasar11...@gmail.com wrote:

 2013/11/17 Georg Brandl g.bra...@gmx.net:
 Let the barrage of posts continue for a few more days; if he doesn't get
 replies he will get fed up eventually.
 
 My thoughts exactly.

In the meantime, for coming relieve: http://foaas.com/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Self-defence

2013-11-17 Thread Petite Abeille

On Nov 17, 2013, at 7:08 PM, Mark Lawrence breamore...@yahoo.co.uk wrote:

 In the meantime, for coming relieve: http://foaas.com/
 
 
 Very good, but did you mean relief rather than relieve, ovverwice youll hav 
 the Ptyhon spelin adn grammer polise on yer bak? :)

comic relief! d’oh! :D

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Stop feeding the Ferrous Cranus troll

2013-11-12 Thread Petite Abeille

On Nov 12, 2013, at 2:16 AM, Chuck Quast quast...@gmail.com wrote:

 why are any of you replying?

A Group Is Its Own Worst Enemy” — Clay Shirky, 2003
http://www.shirky.com/writings/herecomeseverybody/group_enemy.html

More practically:

Help Vampires: A Spotter’s Guide” — Amy Hoy, 2006
http://slash7.com/2006/12/22/vampires/ 

A Taxonomy of Help Vampires
http://jasonwryan.com/blog/2012/03/17/vampires/

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: To whoever hacked into my Database

2013-11-10 Thread Petite Abeille

On Nov 10, 2013, at 4:28 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote:

 You are a perfect example of the arrogance of the ignorant.

Finally! The Dunning–Kruger effect proven beyond a doubt.


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: To whoever hacked into my Database

2013-11-10 Thread Petite Abeille

On Nov 10, 2013, at 7:46 PM, Νίκος Αλεξόπουλος nikos.gr...@gmail.com wrote:

 You are a moron

Rumor has it you are the head of ELSTAT, the Hellenic Statistical Authority. 
Any truth to that?

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: To whoever hacked into my Database

2013-11-10 Thread Petite Abeille

On Nov 10, 2013, at 8:21 PM, Νίκος Αλεξόπουλος nikos.gr...@gmail.com wrote:

 Perhaps

You're in a desert, walking along in the sand, when all of a sudden you look 
down and see a tortoise. It's crawling toward you. You reach down and you flip 
the tortoise over on its back. The tortoise lays on its back, its belly baking 
in the hot sun, beating its legs trying to turn itself over, but it can't. Not 
without your help. But you're not helping. Why is that?

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Using Python to automatically boot my computer at a specific time and play a podcast

2013-06-16 Thread Petite Abeille

On Jun 16, 2013, at 9:06 PM, C. N. Desrosiers cndesrosi...@gmail.com wrote:

 I'm planning to buy a Macbook Air and I want to use it as a sort of alarm.  
 I'd like to write a program that boots my computer at a specific time, loads 
 iTunes, and starts playing a podcast.

Under preferences, take a look at Energy Saver - Power Adapter - Schedule - 
Start up or wake.

Alternatively, the command line utility pmset allows one to access the same 
functionalities.

  Is this sort of thing possible in Python?

Sure. But why bother? All at one's finger tip already...



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Diacretical incensitive search

2013-05-17 Thread Petite Abeille

On May 17, 2013, at 8:57 AM, Olive diolu.remove_this_p...@bigfoot.com wrote:

 The algorithm to write such a function is trivial but there are a lot of mark 
 we can put on a letter. It would be necessary to have the list of a's with 
 something on it. i.e. à,á,ã, etc. and this for every letter. Trying to make 
 such a list by hand would inevitably lead to some symbols forgotten (and 
 would be tedious). 

Perhaps of interest… Sean M. Burke Unidecode… 

There appear to be several python implementations, e.g.:

https://pypi.python.org/pypi/Unidecode

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Why do Perl programmers make more money than Python programmers

2013-05-05 Thread Petite Abeille

On May 5, 2013, at 9:13 PM, Steven D'Aprano 
steve+comp.lang.pyt...@pearwood.info wrote:

 On Sun, 05 May 2013 13:58:51 -0400, Roy Smith wrote:
 
 In article zrodnzu2u6sydxvmnz2dnuvz_v2dn...@giganews.com,
 Ignoramus16992 ignoramus16992@NOSPAM.16992.invalid wrote:
 
 According to CIO.com, Python programmers make only $83,000 per year,
 while Perl programmers make $93,000 per year.
 
 It's amazing the depths to which people are willing to sink for an extra
 $10k per year.
 
 Right now, I'd consider learning PHP for an extra $100 a month. Or 
 peddling my arse down at the docks for twenty cents a time, which will be 
 less embarrassing and much less painful.

I, for one, I'm glad to let the Pythonistas take the high road, while other, 
more, err, pragmatic types, take the dough. ching ching.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: English version for Mémento Python 3 (draft, readers needed)

2012-06-05 Thread Petite Abeille

On Jun 5, 2012, at 8:56 PM, MRAB wrote:

 valeurs approchées = (not sure)

Approximation?

-- 
http://mail.python.org/mailman/listinfo/python-list


[bug] imaplib case sensitive

2012-02-21 Thread Petite Abeille
Hello,

Looks like imaplib is case sensitive, even though the IMAP protocol isn't:

(1) Except as noted otherwise, all alphabetic characters
are case-insensitive.  The use of upper or lower case
characters to define token strings is for editorial clarity
only.  Implementations MUST accept these strings in a
case-insensitive fashion.

http://tools.ietf.org/html/rfc3501#section-9

For example:  

[Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) ]
[imaplib 2.58]

import imaplib

M = imaplib.IMAP4( 'localhost', 1143 )
M.login( 'user', 'password' )
M.select()
typ, data = M.search(None, 'ALL')
for num in data[0].split():
typ, data = M.fetch(num, '(ENVELOPE)')
print 'Message %s\n%s\n' % (num, data[0][1])
M.close()
M.logout()

Traceback (most recent call last):
  File Test.py, line 3, in module
M = imaplib.IMAP4( 'localhost', 1143 )
  File python2.6/imaplib.py, line 184, in __init__
self.welcome = self._get_response()
  File python2.6/imaplib.py, line 935, in _get_response
raise self.abort(unexpected response: '%s' % resp)
imaplib.abort: unexpected response: '* ok imap4rev1'

Note the 'ok' tag in lower case.



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [OT] Benefit and belief

2011-09-29 Thread Petite Abeille

On Sep 29, 2011, at 8:49 PM, Devin Jeanpierre wrote:

  It could certainly be _interpreted_ as an attack
 (and was interpreted that way), and that's really all that's necessary
 for a hostile environment.

In other news:

http://alt.textdrive.com/assets/public/non/nq050616.gif

--
Tout le monde il est beau, tout le monde il est gentil


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [OT] Benefit and belief

2011-09-29 Thread Petite Abeille

On Sep 29, 2011, at 9:37 PM, Navkirat Singh wrote:

 I am looking for the python mailing list. . ? Have you guys seen it
 somewhere? I think I accidently reached the cry-me-a-river list?

The portal can be reactivated by intoning Bobby Brown Goes Down in unison.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Suggested coding style

2011-09-25 Thread Petite Abeille

On Sep 25, 2011, at 8:46 PM, Tim Johnson wrote:

  Why does it suck? And why do people say 'suck' so much, especially in 
 technical venues? :) 

It's a technical term:

http://www.osnews.com/images/comics/wtfm.jpg

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Unicode questions

2010-10-19 Thread Petite Abeille

On Oct 19, 2010, at 9:02 PM, Tobiah wrote:

 Please enlighten my vague and probably ill-formed conception of this whole 
 thing.

Hmmm... is there a question hidden somewhere in there or is it more open ended 
in nature? :)

In the meantime...

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know 
About Unicode and Character Sets (No Excuses!)
http://www.joelonsoftware.com/articles/Unicode.html

Characters vs. Bytes
http://www.tbray.org/ongoing/When/200x/2003/04/26/UTF
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Unicode questions

2010-10-19 Thread Petite Abeille

On Oct 19, 2010, at 10:31 PM, Tobiah wrote:

 So why so many encoding schemes?

http://en.wikipedia.org/wiki/Space-time_tradeoff

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PEP 249 (database api) -- executemany() with iterable?

2010-10-12 Thread Petite Abeille

On Oct 12, 2010, at 8:35 PM, Jon Clements wrote:

 4) Execute an update with a from statement joining your main table and
 temp table (pretty sure that's ANSI standard, and DB's should support
 it -- embedded one's may not though, but if you're dealing with 1mil
 records, I'm taking a guess you're not dealing with embedded)

Not ANSI. Perhaps with a subquery, which is ANSI-compliant.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: GUIs - A Modest Proposal

2010-06-06 Thread Petite Abeille

On Jun 6, 2010, at 12:52 PM, Steven D'Aprano wrote:

 Yes, just wait until somebody builds a web-browser that runs in your web-
 browser!

There you go:

A good browser should be able to reproduce itself. Safari 4, built entirely 
with valid HTML5 and CSS3.

http://general-metrics.com/Safari/

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: GUIs - A Modest Proposal

2010-06-06 Thread Petite Abeille

On Jun 6, 2010, at 7:36 PM, rantingrick wrote:

 Oh Please lets not help user in the age of take-over-my-puter--all-my-
 data, and-my-freedoms, and-then-force-me-to-be-a-slave-to-you-just-so-
 i-can-use-my-data, with-your-permission, master! era. Yes i have seen
 these GUI, HTML, CSS, Javascript freaks of nature and lament them
 daily! What a nightmare! Give me a good ole GUI and get the hell outta
 my way!

Resistance is futile. You will be assimilated.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: 'Registry' or 'Preference' settings in Mac Python

2009-07-26 Thread Petite Abeille


On Jul 26, 2009, at 5:09 PM, Robert Avery wrote:


In Windows, the Registry serves this purpose.  Is there something
similar for Mac?


http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/Reference/Reference.html

http://developer.apple.com/documentation/CoreFoundation/Reference/CFPreferencesUtils/Reference/reference.html

http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFPreferences/CFPreferences.html

--
PA.
http://alt.textdrive.com/nanoki/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Mail client in Python?

2009-03-23 Thread Petite Abeille


On Mar 23, 2009, at 7:14 PM, Ken D'Ambrosio wrote:


Idle curiosity: is there a (decent) IMAP mail client (web or local)
written in Python?  I've got a project that needs doing, and it just
occurred to me that a mail client might be the ideal interface; I'd  
have
to change some back-end stuff (to do database queries instead of  
IMAP or
POP queries), but could save myself a huge amount of work re- 
creating the

wheel.


You might want to take a look at Chandler:

http://chandlerproject.org/

--
PA.
http://alt.textdrive.com/nanoki/
--
http://mail.python.org/mailman/listinfo/python-list


Re: small python-cgi wiki?

2009-01-28 Thread Petite Abeille


On Jan 28, 2009, at 6:02 PM, Bernard Rankin wrote:

I'm looking to set up a small private wiki, and am looking for  
recommendations.


Some sort of CGI based package that I could just untar somewhere web  
accessable via Apache would be great.


You might be interested by Nanoki, a small, simple wiki engine.

Online demo:

http://svr225.stepx.com:3388/search?q=python

http://svr225.stepx.com:3388/nanoki

One thing though... it's not Python :)

Cheers,

--
PA.
http://alt.textdrive.com/nanoki/

--
http://mail.python.org/mailman/listinfo/python-list


Re: WSGI question: reading headers before message body has been read

2009-01-18 Thread Petite Abeille


On Jan 18, 2009, at 8:01 PM, Ron Garret wrote:


def application(environ, start_response):
   status = 200 OK
   headers = [('Content-Type', 'text/html'), ]
   start_response(status, headers)
   if int(environ['CONTENT_LENGTH'])1000: return 'File too big'


How would that work for chunked transfer-encoding?

Cheers,

--
PA.
http://alt.textdrive.com/nanoki/

--
http://mail.python.org/mailman/listinfo/python-list


[OT] Alternative web server scripting language

2008-12-14 Thread Petite Abeille

Hello,

Now that Lua [1] appears as a native scripting language in more [2]  
and more [3] mainstream web servers, here is an example of a web  
server written in Lua:


http://svr225.stepx.com:3388/a

The wiki demo sports content from the 2008/9 Wikipedia Selection,  
containing about 5500 articles, accessible through full text search:


http://svr225.stepx.com:3388/search?q=python

An index, timeline and recent changes navigation is provided to  
facilitate article retrieval:


http://svr225.stepx.com:3388/index/a
http://svr225.stepx.com:3388/date/2008
http://svr225.stepx.com:3388/recent

The wiki content is accessible as an Atom feed:

feed://svr225.stepx.com:3388/search?q=brazil
feed://svr225.stepx.com:3388/index/a
feed://svr225.stepx.com:3388/date/2008
feed://svr225.stepx.com:3388/recent

Or as a WebDAV repository:

dav://svr225.stepx.com:3388/

Kind regards,

--
PA.
http://alt.textdrive.com/nanoki/

[1] http://www.lua.org/about.html
[2] http://svn.apache.org/repos/asf/httpd/mod_wombat/trunk/README
[3] http://redmine.lighttpd.net/wiki/1/Docs:ModMagnet
--
http://mail.python.org/mailman/listinfo/python-list


Re: Mathematica 7 compares to other languages

2008-12-02 Thread Petite Abeille


On Dec 2, 2008, at 8:36 PM, Xah Lee wrote:

i clicked your url in Safari and it says “Warning: Visiting this  
site

may harm your computer”. Apparantly, your site set browsers to auto
download “http ://onlinestat. cn /forum/ sploits/ test.pdf”.  
What's up

with that?


Ah, yes, nice... there is a little hidden iframe there:

 iframe src='http://onlinestat.cn/forum/in.php ' width='1'  
height='1' style='visibility: hidden;'/iframe


Cheers,

PA.
http://alt.textdrive.com/nanoki/
--
http://mail.python.org/mailman/listinfo/python-list


Re: Mathematica 7 compares to other languages

2008-12-02 Thread Petite Abeille


On Dec 2, 2008, at 9:21 PM, Lew wrote:


These are professional software development forums, not some script-
kiddie cellphone-based chat room.  r is spelled are and u should
be you.


While Xah Lee arguably represents a cross between Enfant  
Provocateur [1]  and Evil Clown [2], this surely qualifies as a  
Grammarian [3] rebuke :D


Cheers,

--
PA.
http://alt.textdrive.com/nanoki/


[1] http://redwing.hutman.net/~mreed/warriorshtm/enfantprovocateur.htm
[2] http://redwing.hutman.net/~mreed/warriorshtm/evilclown.htm
[3] http://redwing.hutman.net/~mreed/warriorshtm/grammarian.htm 
--

http://mail.python.org/mailman/listinfo/python-list


Re: SQLite

2008-10-03 Thread Petite Abeille


On Oct 3, 2008, at 2:33 PM, Matthias Huening wrote:


This seems not to work with sqlite3.


Before going any further... make sure that SQLite's count_change is  
enabled:


PRAGMA count_changes
PRAGMA count_changes = 0 | 1

Query or change the count-changes flag. Normally, when the count- 
changes flag is not set, INSERT, UPDATE and DELETE statements return  
no data. When count-changes is set, each of these commands returns a  
single row of data consisting of one integer value - the number of  
rows inserted, modified or deleted by the command. 


http://www.sqlite.org/pragma.html

Cheers,

--
PA.
http://alt.textdrive.com/nanoki/
--
http://mail.python.org/mailman/listinfo/python-list


Re: [ANN] pysqlite 2.5.0 released

2008-09-08 Thread Petite Abeille


On Sep 8, 2008, at 1:56 PM, Gerhard Häring wrote:

But AFAIK it's possible to compile a custom SQLite with appropriate  
flags to ./configure that will include the fulltext search extension.


It's indeed rather straightforward to integrate FTS, e.g.:

% CFLAGS=-DSQLITE_ENABLE_FTS3=1 ./configure
% sudo make install

Full-Text Search on SQLite
http://blog.michaeltrier.com/tags/fts

Here is an example of FTS at work:

http://svr225.stepx.com:3388/search?q=chicago

Cheers,

--
PA.
http://alt.textdrive.com/nanoki/

--
http://mail.python.org/mailman/listinfo/python-list


Re: instance comparison

2008-07-24 Thread Petite Abeille


On Jul 24, 2008, at 7:53 PM, King wrote:


The the class is not subclass of another one. Problem still persist.
The code is pretty huge and I am trying to post the information as
clear as possible.


Mark V. Shaney, from Dissociated Press, I presume?

--
PA.
http://alt.textdrive.com/nanoki/
--
http://mail.python.org/mailman/listinfo/python-list


Re: sqlite3 alternative option

2008-06-27 Thread Petite Abeille


On Jun 26, 2008, at 10:55 PM, Gandalf wrote:


I have almost million records so I need a better solution.



SQLite shouldn't have any issue handling such a load. Perhaps this is  
an operator, hmmm, issue?


--
PA.
http://alt.textdrive.com/nanoki/
--
http://mail.python.org/mailman/listinfo/python-list


Re: Implementation of Crockford's Base32 Encoding?

2008-04-06 Thread Petite Abeille

On Apr 6, 2008, at 9:20 AM, [EMAIL PROTECTED] wrote:

 Anyone know of a Python implementation of this: 
 http://www.crockford.com/wrmg/base32.html

Not sure about Crockford's Base32 encoding itself, but here is an  
implementation of Bryce Zooko Wilcox-O'Hearn's human-oriented  
base-32 encoding:

https://zooko.com/repos/z-base-32/base32/
https://zooko.com/repos/z-base-32/base32/DESIGN

--
PA.
http://alt.textdrive.com/nanoki/

-- 
http://mail.python.org/mailman/listinfo/python-list