Re: Questions on Pandas

2015-06-25 Thread Steven D'Aprano
On Fri, 26 Jun 2015 02:34 pm, Tommy C wrote: > Hi there, I have a number of questions related to the Pandas exercises > found from the book, Python for Data Analysis by Wes McKinney. > Particularly, these exercises are from Chapter 6 of the book. It'd be much > appreciated if you could answer the

Re: mutual coaching

2015-06-25 Thread Kev Dwyer
adham...@gmail.com wrote: > hello anyone wants to study python? we can learn together! pm me my name > is adham128 iam at the #programming room Welcome to Python! To improve your chances of finding someone who wants to learn with you, you might try posting your message in the Python Tutor list

Questions on Pandas

2015-06-25 Thread Tommy C
Hi there, I have a number of questions related to the Pandas exercises found from the book, Python for Data Analysis by Wes McKinney. Particularly, these exercises are from Chapter 6 of the book. It'd be much appreciated if you could answer the following questions! 1. [code] Input: pd.read_csv(

Re: Turning string into object (name)

2015-06-25 Thread Chris Angelico
On Fri, Jun 26, 2015 at 12:51 PM, wrote: > def dbconn(): > #Establishes connection to local db > try: > conn = client() > db = conn.db_solar #dbname > collection = db.main # dbcollection / Table > print "Connected to

Turning string into object (name)

2015-06-25 Thread liam . oshea
Hi all, I have something like this: def dbconn(): #Establishes connection to local db try: conn = client() db = conn.db_solar #dbname collection = db.main # dbcollection / Table print "Connected to database successfull

[ANN] PySWITCH 0.2

2015-06-25 Thread Godson Gera
= pyswitch 0.2 = PySWITCH 0.2 is released Please, note that PySWITCH 0.2 is not available on PyPI because of name conflict Major changes to 0.2 *Many new FreeSWITCH API and dialplan commands added Full list of changes can be found at http://pyswitch.sourceforge.net/pages/change

Re: Can anybody explain the '-' in a 2-D creation code?

2015-06-25 Thread Mark Lawrence
On 26/06/2015 02:40, fl wrote: On Thursday, June 25, 2015 at 6:24:07 PM UTC-7, Mark Lawrence wrote: On 26/06/2015 02:07, fl wrote: Hi, I read Ned's tutorial on Python. It is very interesting. On its last example, I cannot understand the '_' in: board=[[0]*8 for _ in range(8)] I know '_'

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Chris Angelico
On Fri, Jun 26, 2015 at 12:24 PM, Mark Lawrence wrote: > On 26/06/2015 03:06, Chris Angelico wrote: >> >> On Fri, Jun 26, 2015 at 11:17 AM, Mark Lawrence >> wrote: Even the famous Enigma machine was a lot more than just letter-for-letter substitution - a double letter in the c

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Mark Lawrence
On 26/06/2015 03:06, Chris Angelico wrote: On Fri, Jun 26, 2015 at 11:17 AM, Mark Lawrence wrote: Even the famous Enigma machine was a lot more than just letter-for-letter substitution - a double letter in the cleartext wouldn't be represented by a double letter in the result - and once the mac

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Chris Angelico
On Fri, Jun 26, 2015 at 11:01 AM, Ian Kelly wrote: > On Thu, Jun 25, 2015 at 6:33 PM, Chris Angelico wrote: >> On Fri, Jun 26, 2015 at 1:26 AM, Jon Ribbens >> wrote: >>> Well, it means you need to send 256 times as much data, which is a >>> start. If you're instead using a 256-byte translation t

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Chris Angelico
On Fri, Jun 26, 2015 at 11:17 AM, Mark Lawrence wrote: >> Even the famous Enigma >> machine was a lot more than just letter-for-letter substitution - a >> double letter in the cleartext wouldn't be represented by a double >> letter in the result - and once the machine's secrets were figured >> out

Re: Can anybody explain the '-' in a 2-D creation code?

2015-06-25 Thread fl
On Thursday, June 25, 2015 at 6:24:07 PM UTC-7, Mark Lawrence wrote: > On 26/06/2015 02:07, fl wrote: > > Hi, > > > > I read Ned's tutorial on Python. It is very interesting. On its last > > example, I cannot understand the '_' in: > > > > > > > > board=[[0]*8 for _ in range(8)] > > > > > > I know

Re: Can anybody explain the '-' in a 2-D creation code?

2015-06-25 Thread André Roberge
On Thursday, 25 June 2015 22:07:42 UTC-3, fl wrote: > Hi, > > I read Ned's tutorial on Python. It is very interesting. On its last > example, I cannot understand the '_' in: > > > > board=[[0]*8 for _ in range(8)] > > > I know '_' is the precious answer, but it is still unclear what it is >

Re: Can anybody explain the '-' in a 2-D creation code?

2015-06-25 Thread Mark Lawrence
On 26/06/2015 02:07, fl wrote: Hi, I read Ned's tutorial on Python. It is very interesting. On its last example, I cannot understand the '_' in: board=[[0]*8 for _ in range(8)] I know '_' is the precious answer, but it is still unclear what it is in the above line. Can you explain it to me

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Mark Lawrence
On 26/06/2015 01:33, Chris Angelico wrote: On Fri, Jun 26, 2015 at 1:26 AM, Jon Ribbens wrote: There are only 256 possible values for n, one of which doesn't transform the data at all (ROT-0). If you're thinking of attacking this by pencil and paper, 255 transformations sounds like a lot. For a

Can anybody explain the '-' in a 2-D creation code?

2015-06-25 Thread fl
Hi, I read Ned's tutorial on Python. It is very interesting. On its last example, I cannot understand the '_' in: board=[[0]*8 for _ in range(8)] I know '_' is the precious answer, but it is still unclear what it is in the above line. Can you explain it to me? Thanks, -- https://mail.pyth

Re: converting boolean filter function to lambda

2015-06-25 Thread Mark Lawrence
On 26/06/2015 01:57, Ethan Furman wrote: On 06/25/2015 05:09 PM, Mark Lawrence wrote: On 26/06/2015 00:59, Chris Angelico wrote: On Fri, Jun 26, 2015 at 1:59 AM, Ethan Furman wrote: My attempt at a lambda function fails: filter(lambda p: (p in c for c in contacts), main) # ['291.792.9001', '

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Ian Kelly
On Thu, Jun 25, 2015 at 6:33 PM, Chris Angelico wrote: > On Fri, Jun 26, 2015 at 1:26 AM, Jon Ribbens > wrote: >>> There are only 256 possible values for n, one of which doesn't transform the >>> data at all (ROT-0). If you're thinking of attacking this by pencil and >>> paper, 255 transformation

Re: converting boolean filter function to lambda

2015-06-25 Thread Ethan Furman
On 06/25/2015 05:09 PM, Mark Lawrence wrote: On 26/06/2015 00:59, Chris Angelico wrote: On Fri, Jun 26, 2015 at 1:59 AM, Ethan Furman wrote: My attempt at a lambda function fails: filter(lambda p: (p in c for c in contacts), main) # ['291.792.9001', '291.792.9000'] Besides using a lambda ;)

mutual coaching

2015-06-25 Thread adhamyos
hello anyone wants to study python? we can learn together! pm me my name is adham128 iam at the #programming room -- https://mail.python.org/mailman/listinfo/python-list

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Chris Angelico
On Fri, Jun 26, 2015 at 1:26 AM, Jon Ribbens wrote: >> There are only 256 possible values for n, one of which doesn't transform the >> data at all (ROT-0). If you're thinking of attacking this by pencil and >> paper, 255 transformations sounds like a lot. For a computer, that's barely >> harder th

Re: converting boolean filter function to lambda

2015-06-25 Thread Mark Lawrence
On 26/06/2015 00:59, Chris Angelico wrote: On Fri, Jun 26, 2015 at 1:59 AM, Ethan Furman wrote: My attempt at a lambda function fails: filter(lambda p: (p in c for c in contacts), main) # ['291.792.9001', '291.792.9000'] Besides using a lambda ;) , what have I done wrong? This looks like a

Re: converting boolean filter function to lambda

2015-06-25 Thread Chris Angelico
On Fri, Jun 26, 2015 at 1:59 AM, Ethan Furman wrote: > My attempt at a lambda function fails: > > filter(lambda p: (p in c for c in contacts), main) > # ['291.792.9001', '291.792.9000'] > > Besides using a lambda ;) , what have I done wrong? This looks like a job for a list comprehension! (Cue t

Re: Could you give me the detail process of 'make_incrementor(22)(33)'?

2015-06-25 Thread Ian Kelly
On Thu, Jun 25, 2015 at 2:53 PM, fl wrote: > Hi, > > I read a tutorial on lambda on line. I don't think that I am clear about > the last line in its example code. It gives two parameters (22, 23). > Is 22 for n, and 23 for x? Or, it creates two functions first. Then, > each function gets 22 while

Re: Reference Counting Irregularity

2015-06-25 Thread Ian Kelly
On Thu, Jun 25, 2015 at 12:49 PM, Eric Edmond wrote: > Hi, > > I have been writing a C++ extension for Python recently, and am currently > fixing the reference counting throughout the extension. As I am very new to > this topic, my question may have a simple answer, but I was unable to find > any

Could you give me the detail process of 'make_incrementor(22)(33)'?

2015-06-25 Thread fl
Hi, I read a tutorial on lambda on line. I don't think that I am clear about the last line in its example code. It gives two parameters (22, 23). Is 22 for n, and 23 for x? Or, it creates two functions first. Then, each function gets 22 while the other function gets 23? Please help me on this i

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Randall Smith
On 06/24/2015 08:33 PM, Dennis Lee Bieber wrote: On Wed, 24 Jun 2015 13:20:07 -0500, Randall Smith declaimed the following: On 06/24/2015 06:36 AM, Steven D'Aprano wrote: I don't understand how mangling the data is supposed to protect the recipient. Don't they have the ability unmangle the da

Reference Counting Irregularity

2015-06-25 Thread Eric Edmond
Hi, I have been writing a C++ extension for Python recently, and am currently fixing the reference counting throughout the extension. As I am very new to this topic, my question may have a simple answer, but I was unable to find any mention of the behavior online. When using the PyObject_GetIt

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Randall Smith
On 06/24/2015 11:27 PM, Devin Jeanpierre wrote: On Wed, Jun 24, 2015 at 9:07 PM, Steven D'Aprano wrote: But just sticking to the three above, the first one is partially mitigated by allowing virus scanners to scan the data, but that implies that the owner of the storage machine can spy on the f

Re: Could you explain "[1, 2, 3].remove(2)" to me?

2015-06-25 Thread Jussi Piitulainen
fl writes: > aa=[1, 2, 3].remove(2) > > I don't know where the result goes. Could you help me on the question? That method modifies the list and returns None (or raises an exception). Get a hold on the list first: aa=[1, 2, 3] *Then* call the method. Just call the method, do not try to store t

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Randall Smith
Thanks Jon. I couldn't have answered those questions better myself, and I wrote the software in question. I didn't intend to describe the entire system, but rather just enough of it to present the issue at hand. You seem to understand it quite well. I'm now using a randomly generated 256 by

enumerate XML tags (keys that will become headers) along with text (values) and write to CSV in one row (as opposed to "stacked" values with one header)

2015-06-25 Thread kbtyo
My question can be found here: http://stackoverflow.com/questions/31058100/enumerate-column-headers-in-csv-that-belong-to-the-same-tag-key-in-python Here is an additional sample sample of the XML that I am working with: 0 0 0 0

Re: Could you explain "[1, 2, 3].remove(2)" to me?

2015-06-25 Thread Ian Kelly
On Thu, Jun 25, 2015 at 12:14 PM, fl wrote: > Hi, > > I see a code snippet online: > > [1, 2, 3].remove(42) I don't know where you pulled this from, but if this is from a tutorial then it doesn't seem to be a very good one. This constructs a list containing the elements 1, 2, and 3, and attempts

Could you explain "[1, 2, 3].remove(2)" to me?

2015-06-25 Thread fl
Hi, I see a code snippet online: [1, 2, 3].remove(42) after I modify it to: [1, 2, 3].remove(2) and aa=[1, 2, 3].remove(2) I don't know where the result goes. Could you help me on the question? Thanks, -- https://mail.python.org/mailman/listinfo/python-list

Re: windows and file names > 256 bytes

2015-06-25 Thread random832
On Thu, Jun 25, 2015, at 09:35, Michael Torrie wrote: > The OP mentions that even when he manually supplies extended paths, > os.mkdir, os.getsize, and shutil.rmtree return errors for him in Python > 2.7. So there's more to this problem. The byte versions of the underlying OS APIs use a 256-chara

Re: windows and file names > 256 bytes

2015-06-25 Thread Terry Reedy
On 6/25/2015 5:16 AM, Steven D'Aprano wrote: On Thursday 25 June 2015 18:00, Albert-Jan Roskam wrote: Hi, Consider the following calls, where very_long_path is more than 256 bytes: [1] os.mkdir(very_long_path) [2] os.getsize(very_long_path) [3] shutil.rmtree(very_long_path) I am using Python

Re: Python realted to question

2015-06-25 Thread Terry Reedy
On 6/25/2015 2:49 AM, 문건희 wrote: Two raspberryPi2 Model B was connected to a socket to communicate with each other. I want to send the video by using the communication. Method of transmitting a text file is known. However, the video file is not sent. What are the symptoms of 'not sent'? What

Re: To write headers once with different values in separate row in CSV

2015-06-25 Thread kbtyo
Okay, so I have gone back to the drawing board and have the following predicament (my apologies, in advance for the indentation): Here is my sample: 0 0 0 0 0 0

Re: converting boolean filter function to lambda

2015-06-25 Thread Peter Otten
Ethan Furman wrote: > I have the following function: > > def phone_found(p): >for c in contacts: > if p in c: >return True >return False > > with the following test data: > > contacts = ['672.891.7280 x999', '291.792.9000 x111'] > main = ['291.792.9001', '291.792.9000'] >

Re: converting boolean filter function to lambda

2015-06-25 Thread Ian Kelly
On Thu, Jun 25, 2015 at 9:59 AM, Ethan Furman wrote: > I have the following function: > > def phone_found(p): > for c in contacts: > if p in c: > return True > return False > > with the following test data: > > contacts = ['672.891.7280 x999', '291.792.9000 x111'] > main = ['291.792.

Re: Could you explain why this program runs?

2015-06-25 Thread Mark Lawrence
On 25/06/2015 16:20, fl wrote: Hi, I download and install pyPDF2 library online. It says the test can run by: python -m unittest Tests.tests The -m flag says run unittest as a script which then calls Tests.tests. You can find out what all flags do by typing at the command prompt. python --

converting boolean filter function to lambda

2015-06-25 Thread Ethan Furman
I have the following function: def phone_found(p): for c in contacts: if p in c: return True return False with the following test data: contacts = ['672.891.7280 x999', '291.792.9000 x111'] main = ['291.792.9001', '291.792.9000'] which works: filter(phone_found, main) # ['291.79

Re: Could you explain why this program runs?

2015-06-25 Thread fl
On Thursday, June 25, 2015 at 8:20:52 AM UTC-7, fl wrote: > Hi, > > I download and install pyPDF2 library online. It says the test can run by: > > > python -m unittest Tests.tests > > > tests.py is under folder PyPDF2-master\Tests\ > > > The above command line does run and give output messag

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Jon Ribbens
On 2015-06-25, Steven D'Aprano wrote: > On Thu, 25 Jun 2015 08:03 pm, Jon Ribbens wrote: >> That won't stop virus scanners etc potentially making their own minds >> up about the file. > > *shrug* Sure, but I was specifically referring to the risk of the malware > being executed, not being detected

Could you explain why this program runs?

2015-06-25 Thread fl
Hi, I download and install pyPDF2 library online. It says the test can run by: python -m unittest Tests.tests tests.py is under folder PyPDF2-master\Tests\ The above command line does run and give output message, but I don't understand why it run after I read tests.py: ///

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Steven D'Aprano
On Thu, 25 Jun 2015 08:03 pm, Jon Ribbens wrote: > On 2015-06-25, Steven D'Aprano > wrote: >> On Thursday 25 June 2015 14:27, Devin Jeanpierre wrote: >>> If it's encrypted malware, and you can't decrypt it, there's no threat. >> >> If the *only* threat is that the sender will send malware, you ca

Re: windows and file names > 256 bytes

2015-06-25 Thread Tim Golden
On 25/06/2015 14:35, Michael Torrie wrote: > On 06/25/2015 06:34 AM, Tim Golden wrote: >> On 25/06/2015 13:04, Joonas Liik wrote: >>> It sounds to me more like it is possible to use long file names on windows >>> but it is a pain and in python, on windows it is basically impossible. >> >> Certainly

Re: windows and file names > 256 bytes

2015-06-25 Thread Michael Torrie
On 06/25/2015 06:34 AM, Tim Golden wrote: > On 25/06/2015 13:04, Joonas Liik wrote: >> It sounds to me more like it is possible to use long file names on windows >> but it is a pain and in python, on windows it is basically impossible. > > Certainly not impossible: you could write your own wrapper

Re:

2015-06-25 Thread Michael Torrie
On 06/24/2015 09:56 AM, Knss Teja via Python-list wrote: > I WANT TO install 4.3 version ... but the MSI file is giving a DLL error .. > what should I do :/ > please use REPLY ALL .. so that I get the mail to my gmail inbox No idea what you mean about wanting to get mail to your gmail inbox... I

Re: windows and file names > 256 bytes

2015-06-25 Thread Chris Angelico
On Thu, Jun 25, 2015 at 9:06 PM, Mark Lawrence wrote: >> 2. Is this a bug in Python? I would prefer if Python dealt with the gory >> details of Windows' silly behavior. > > > I don't see why Python should work around any particular limitation of any > given OS. Check out the multiprocessing modul

Re: Windows install error

2015-06-25 Thread Laura Creighton
In a message of Thu, 25 Jun 2015 11:58:09 +0100, Mark Lawrence writes: >On 24/06/2015 16:56, Knss Teja via Python-list wrote: >> I WANT TO install 4.3 version ... but the MSI file is giving a DLL error >> .. what should I do :/ >> please use REPLY ALL .. so that I get the mail to my gmail inbox >>

Re: windows and file names > 256 bytes

2015-06-25 Thread Tim Golden
On 25/06/2015 13:04, Joonas Liik wrote: > It sounds to me more like it is possible to use long file names on windows > but it is a pain and in python, on windows it is basically impossible. Certainly not impossible: you could write your own wrapper function: def extended_path(p): return r"\\?

Re: windows and file names > 256 bytes

2015-06-25 Thread Joonas Liik
It sounds to me more like it is possible to use long file names on windows but it is a pain and in python, on windows it is basically impossible. So shouldn't it be possible to maniulate these files with extended names.. I mean even if you had to use some special function to ask for long names it

Re: windows and file names > 256 bytes

2015-06-25 Thread Mark Lawrence
On 25/06/2015 09:00, Albert-Jan Roskam wrote: Hi, Consider the following calls, where very_long_path is more than 256 bytes: [1] os.mkdir(very_long_path) [2] os.getsize(very_long_path) [3] shutil.rmtree(very_long_path) I am using Python 2.7 and [1] and [2] fail under Windows XP [3] fails under

Windows install error

2015-06-25 Thread Mark Lawrence
On 24/06/2015 16:56, Knss Teja via Python-list wrote: I WANT TO install 4.3 version ... but the MSI file is giving a DLL error .. what should I do :/ please use REPLY ALL .. so that I get the mail to my gmail inbox I'll assume that you mean 3.4.x. Please give the x, your Windows version and

Re: windows and file names > 256 bytes

2015-06-25 Thread Chris Angelico
On Thu, Jun 25, 2015 at 8:10 PM, Tim Golden wrote: >> Are there any times when you *don't* want Windows to use the >> extended-length path? > > Yes: when you're passing a relative filepath. Which could pretty much be > any time. As you might imagine, this has come up before -- there's an > issue o

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Devin Jeanpierre
On Thu, Jun 25, 2015 at 2:57 AM, Chris Angelico wrote: > On Thu, Jun 25, 2015 at 7:41 PM, Devin Jeanpierre > wrote: >>> I know that the OP doesn't propose using ROT-13, but a classical >>> substitution cipher isn't that much stronger. >> >> Yes, it is. It requires the attacker being able to see s

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Joonas Liik
Personally, i have had AVG give at least 2 false positives (fyi one of them was like python2.6) as long as antivirus software can give so many false positives i would thing preventing your AV from nuking someone elses data is a reasonable thing. -- https://mail.python.org/mailman/listinfo/python-

Re: windows and file names > 256 bytes

2015-06-25 Thread Tim Golden
On 25/06/2015 10:23, Chris Angelico wrote: > On Thu, Jun 25, 2015 at 7:16 PM, Steven D'Aprano > wrote: >>> 2. Is this a bug in Python? I would prefer if Python dealt with the gory >>> details of Windows' silly behavior. >> >> I would say that it is a bug that it doesn't work with extended-length p

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Jon Ribbens
On 2015-06-25, Steven D'Aprano wrote: > On Thursday 25 June 2015 14:27, Devin Jeanpierre wrote: >> If it's encrypted malware, and you can't decrypt it, there's no threat. > > If the *only* threat is that the sender will send malware, you can mitigate > around that by dropping the file in an unenc

Re: 404 Error when using local CGI Server

2015-06-25 Thread Chris Angelico
On Thu, Jun 25, 2015 at 3:48 AM, Charles Carr wrote: > I am running a local cgi server from python on a windows 7 computer. > Whenever I try to serve the output of a cgi file by entering the following > into my browser: http://localhost:8080/filename.py , I get a 404 error > message that the file

ANN: eGenix mxODBC 3.3.3 - Python ODBC Database Interface

2015-06-25 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mxODBC Python ODBC Database Interface Version 3.3.3 mxODBC is our commercially supported Python extension providing

Python realted to question

2015-06-25 Thread 문건희
Hello,   I'm Korean and Software Developer.   I have a question.   Two raspberryPi2 Model B was connected to a socket to communicate with each other.   I want to send the video by using the communication.   Method of transmitting a text file is known. However, the video file is n

[no subject]

2015-06-25 Thread Knss Teja via Python-list
I WANT TO install 4.3  version ... but the MSI file is giving a DLL error .. what should I do :/ please use REPLY ALL .. so that I get the mail to my gmail inbox-- https://mail.python.org/mailman/listinfo/python-list

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Chris Angelico
On Thu, Jun 25, 2015 at 7:41 PM, Devin Jeanpierre wrote: >> I know that the OP doesn't propose using ROT-13, but a classical >> substitution cipher isn't that much stronger. > > Yes, it is. It requires the attacker being able to see something about > the ciphertext, unlike ROT13. But it is reasona

404 Error when using local CGI Server

2015-06-25 Thread Charles Carr
I am running a local cgi server from python on a windows 7 computer. Whenever I try to serve the output of a cgi file by entering the following into my browser: http://localhost:8080/filename.py , I get a 404 error message that the file was not found. I'm positive that the files I am trying to serv

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Devin Jeanpierre
On Thu, Jun 25, 2015 at 2:25 AM, Steven D'Aprano wrote: > On Thursday 25 June 2015 14:27, Devin Jeanpierre wrote: >> The original post said that the sender will usually send files they >> encrypted, unless they are malicious. So if the sender wants them to >> be encrypted, they already are. > > Th

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Steven D'Aprano
On Thursday 25 June 2015 14:27, Devin Jeanpierre wrote: > On Wed, Jun 24, 2015 at 9:07 PM, Steven D'Aprano > wrote: >> But just sticking to the three above, the first one is partially >> mitigated by allowing virus scanners to scan the data, but that implies >> that the owner of the storage machi

Re: windows and file names > 256 bytes

2015-06-25 Thread Chris Angelico
On Thu, Jun 25, 2015 at 7:16 PM, Steven D'Aprano wrote: >> 2. Is this a bug in Python? I would prefer if Python dealt with the gory >> details of Windows' silly behavior. > > I would say that it is a bug that it doesn't work with extended-length paths > (those starting with \\?\) but may or may no

Re: windows and file names > 256 bytes

2015-06-25 Thread Steven D'Aprano
On Thursday 25 June 2015 18:00, Albert-Jan Roskam wrote: > Hi, > > Consider the following calls, where very_long_path is more than 256 bytes: > [1] os.mkdir(very_long_path) > [2] os.getsize(very_long_path) > [3] shutil.rmtree(very_long_path) > > I am using Python 2.7 and [1] and [2] fail under W

windows and file names > 256 bytes

2015-06-25 Thread Albert-Jan Roskam
Hi, Consider the following calls, where very_long_path is more than 256 bytes: [1] os.mkdir(very_long_path) [2] os.getsize(very_long_path) [3] shutil.rmtree(very_long_path) I am using Python 2.7 and [1] and [2] fail under Windows XP [3] fails under Win7 (not sure about XP). It throws: “WindowsEr

Re: Looking for people who are using Hypothesis and are willing to say so

2015-06-25 Thread David MacIver
Actually one of the things that's helped the most in the course of designing Hypothesis is the realisation that types are something of a red herring for this sort of testing. Thinking purely in terms of custom generators helps a lot, because it means you can do things like specify size bounds on li

Re: Pure Python Data Mangling or Encrypting

2015-06-25 Thread Steven D'Aprano
On Thursday 25 June 2015 14:07, Steven D'Aprano wrote: >> You got it. I didn't want to explain any more than necessary. But yes, >> the recipient just stores the data for the end-user. > > Trust me. That's not all they are doing. Hmm, sorry, that's a glib answer. What I meant to say is, you c