Re: How to add a current string into an already existing list

2013-11-04 Thread Nick the Gr33k
Στις 5/11/2013 12:46 πμ, ο/η Denis McMahon έγραψε: On Mon, 04 Nov 2013 19:03:58 +0200, Nick the Gr33k wrote: There is no built in support in the python / mysql system for puttinga list straight into a database, because mysql does not have"collection" record type. Does postgresql has this 'co

Re: Basic Python Questions - Oct. 31, 2013

2013-11-04 Thread E.D.G.
"Jim Gibson" wrote in message news:031120131018099327%jimsgib...@gmail.com... One way to generate plot within a CGI program is this: To start off with, I am not a CGI expert. Also, I have several degrees in the physical sciences and many years of doing computer programming. But the

Re: Algorithm that makes maximum compression of completly diffused data.

2013-11-04 Thread Steven D'Aprano
On Tue, 05 Nov 2013 04:33:46 +, Steven D'Aprano wrote: > On Mon, 04 Nov 2013 14:34:23 -0800, jonas.thornvall wrote: > >> Den måndagen den 4:e november 2013 kl. 15:27:19 UTC+1 skrev Dave Angel: >>> On Mon, 4 Nov 2013 05:53:28 -0800 (PST), jonas.thornv...@gmail.com >>> wrote: > [...] >>> > This

Re: Algorithm that makes maximum compression of completly diffused data.

2013-11-04 Thread Steven D'Aprano
On Mon, 04 Nov 2013 14:34:23 -0800, jonas.thornvall wrote: > Den måndagen den 4:e november 2013 kl. 15:27:19 UTC+1 skrev Dave Angel: >> On Mon, 4 Nov 2013 05:53:28 -0800 (PST), jonas.thornv...@gmail.com >> wrote: [...] >> > This is not the solution but this is why it is working. >> >> > 65536=256

Re: Compiling Python3 for BeagleBone Black (Angstrom distro)

2013-11-04 Thread Terry Reedy
On 11/4/2013 7:23 PM, Travis Griggs wrote: On Nov 4, 2013, at 9:22 AM, Travis Griggs wrote: I'm playing with a BeagleBone Black running the angstrom distro. Of course, stock python is 2.7, I'd rather use python3. There isn't a python3 package available for angstrom. So I downloaded the sour

Re: Trouble with utf-8 values

2013-11-04 Thread Ben Finney
Ulrich Goebel writes: > I have an object (a variable) name This confuses me. Is it an object, a variable, or a name? > which gets its value from a PostgreSQL database via a SELECT > statement, an it sometimes has german special characters as ß, ä, ö... What is the type of that object? You can

Re: Algorithm that makes maximum compression of completly diffused data.

2013-11-04 Thread Dave Angel
On Mon, 4 Nov 2013 14:34:23 -0800 (PST), jonas.thornv...@gmail.com wrote: e is an approximation... and your idea is not general for any n. e is certainly not an approximation, and I never mentioned n. -- DaveA -- https://mail.python.org/mailman/listinfo/python-list

Trouble with utf-8 values

2013-11-04 Thread Ulrich Goebel
Hallo, again: a python beginner problem... but I spent ours to solve it without success. I have an object (a variable) name, which gets its value from a PostgreSQL database via a SELECT statement, an it sometimes has german special characters as ß, ä, ö... Then I would like to insert that

RE: Compiling Python 3.3.2 on CentOS 6.4 - unable to find compiled OpenSSL?

2013-11-04 Thread Joseph L. Casale
> Any thoughts on what we're doing wrong? Building them yourself:) Try iuscommunity.org for prebuilt packages... -- https://mail.python.org/mailman/listinfo/python-list

Compiling Python 3.3.2 on CentOS 6.4 - unable to find compiled OpenSSL?

2013-11-04 Thread Victor Hooi
Hi, We have a machine running CentOS 6.4, and we're attempting to compile Python 3.3.2 on it: # cat /etc/redhat-release CentOS release 6.4 (Final) We've compiled openssl 1.0.1e 11 by hand on this box, and installed it into /usr/local/: # openssl OpenSSL> versio

Re: Compiling Python3 for BeagleBone Black (Angstrom distro)

2013-11-04 Thread Travis Griggs
On Nov 4, 2013, at 9:22 AM, Travis Griggs wrote: > I'm playing with a BeagleBone Black running the angstrom distro. Of course, > stock python is 2.7, I'd rather use python3. There isn't a python3 package > available for angstrom. So I downloaded the source and compiled. It seemed to > work pr

Re: Python Practice Problems

2013-11-04 Thread alex23
On 4/11/2013 12:06 PM, yungwong@gmail.com wrote: Hi, who has some problems to practice using Python? Try http://projecteuler.net/ -- https://mail.python.org/mailman/listinfo/python-list

Re: ValueError: zero length field name in format - Running under Python 2.7.3?

2013-11-04 Thread Victor Hooi
Hi, You're right - it was sudo playing up with the virtualenv. The script was in /opt, so I was testing with sudo to get it to run. I should have setup a service account, and tested it with that =). $ python sync_bexdb.py 2.7.3 (default, Jan 7 2013, 11:52:52) [GCC 4.4.6 20120305 (Red Hat 4.4.6

Re: zero argument member functions versus properties

2013-11-04 Thread Peter Cacioppi
Ian said : "Since the compiler generally can't predict what the types of objects will be, the bytecode that it generates can't depend on those types." very nice, the py is strong with you. Thanks, Pete -- https://mail.python.org/mailman/listinfo/python-list

Re: ValueError: zero length field name in format - Running under Python 2.7.3?

2013-11-04 Thread Chris Angelico
On Tue, Nov 5, 2013 at 9:33 AM, Victor Hooi wrote: > However, when I run this line, I get the following error: > > Traceback (most recent call last): > File "my_script.py", line 25, in > LOG_FILENAME = > 'my_something_{}.log'.format(datetime.now().strftime('%Y-%d-%m_%H.%M.%S'))

Re: How to add a current string into an already existing list

2013-11-04 Thread Denis McMahon
On Mon, 04 Nov 2013 19:03:58 +0200, Nick the Gr33k wrote: > Please since this column you mentioned is able to store a Python's list > datatype could you tell me what needs alternation in: We've already told you, there is NO mysql datatype that can store a python list directly. There are ways of

ValueError: zero length field name in format - Running under Python 2.7.3?

2013-11-04 Thread Victor Hooi
Hi, I have a Python script that's using a format string without positional specifiers. I.e.: LOG_FILENAME = 'my_something_{}.log'.format(datetime.now().strftime('%Y-%d-%m_%H.%M.%S')) I'm running this from within a virtualenv, running under Python 2.7.3. $ python -V Python 2.7.3

Re: Algorithm that makes maximum compression of completly diffused data.

2013-11-04 Thread jonas . thornvall
Den måndagen den 4:e november 2013 kl. 15:27:19 UTC+1 skrev Dave Angel: > On Mon, 4 Nov 2013 05:53:28 -0800 (PST), jonas.thornv...@gmail.com > > wrote: > > > Den lördagen den 2:e november 2013 kl. 22:31:09 UTC+1 skrev Tim > > Roberts: > > > > Here's another way to look at it. If f(x) is smal

Re: Python Practice Problems

2013-11-04 Thread Amirouche Boubekki
https://github.com/amirouche/1001-Projects 2013/11/4 Terry Reedy > On 11/4/2013 12:28 AM, memilanuk wrote: > >> On 11/03/2013 06:06 PM, yungwong@gmail.com wrote: >> >>> Hi, who has some problems to practice using Python? >>> Thx a lot! >>> >>> >> http://projecteuler.net/ is always a good be

Re: Python and Google App intergration

2013-11-04 Thread Amirouche Boubekki
Héllo, Look for Google Apps APIs. I'm not sure what you want to do is possible, at least manipulating the spreadsheet is doable from Pythonl: http://stackoverflow.com/questions/2377301/how-to-write-a-python-script-to-manipulate-google-spreadsheet-data 2013/11/4 > I don't know Python well. O

Re: Compiling Python3 for BeagleBone Black (Angstrom distro)

2013-11-04 Thread Amirouche Boubekki
Hi Travis, I see, looking at ./configure --help | less, that I could provide > --disable-FEATURE and --without-PACKAGE directives to my ./configure > invocation. But what I don't see is how to generate a list of what > FEATURES/PACKAGES I could put there for consideration of omission. Is there > s

Auto-authorization for Google Drive using Python in Mac OS X

2013-11-04 Thread Pratik Mehta
I have written Python code for Google Drive which uploads the image files to my drive app. I have three queries. Here is my code: #!/usr/bin/python import httplib2 import pprint from apiclient.discovery import build from apiclient.http import MediaFileUpload from oauth2client.client import OAut

Re: [Python-ideas] os.path.join

2013-11-04 Thread Serhiy Storchaka
04.11.13 20:01, Mark Lawrence написав(ла): On 04/11/2013 17:34, Ethan Furman wrote: On 11/04/2013 09:29 AM, random...@fastmail.us wrote: I did, incidentally, notice a bug in macpath's *split* function; macpath.split(':foo::bar') should return (':foo::','bar') rather than (':foo:','bar'). Ope

Re: [Python-ideas] os.path.join

2013-11-04 Thread Mark Lawrence
On 04/11/2013 17:34, Ethan Furman wrote: On 11/04/2013 09:29 AM, random...@fastmail.us wrote: I did, incidentally, notice a bug in macpath's *split* function; macpath.split(':foo::bar') should return (':foo::','bar') rather than (':foo:','bar'). Open a bug report. :) http://bugs.python.org

Re: [Python-ideas] os.path.join

2013-11-04 Thread Ethan Furman
On 11/04/2013 09:29 AM, random...@fastmail.us wrote: I did, incidentally, notice a bug in macpath's *split* function; macpath.split(':foo::bar') should return (':foo::','bar') rather than (':foo:','bar'). Open a bug report. :) http://bugs.python.org -- ~Ethan~ -- https://mail.python.org/mai

Re: [Python-ideas] os.path.join

2013-11-04 Thread rusi
On Monday, November 4, 2013 9:47:18 PM UTC+5:30, Chris Angelico wrote: > Blargh, wrong list. It should have been private anyway. Kindly take no > notice of the man behind the 3AM clock... > > > ChrisA Ive got a little list Ive got a little list For Australians of all kinds Ive got a little list

Re: [Python-ideas] os.path.join

2013-11-04 Thread random832
On Mon, Nov 4, 2013, at 11:07, Chris Angelico wrote: > Then os.path.join is probably the wrong tool for the job. Do you want > to collapse "/foo/bar" + "../quux" into "/foo/quux"? That rewrites the > first. If not, don't use a function that does that. Try simple string > concatenation instead. >>>

Compiling Python3 for BeagleBone Black (Angstrom distro)

2013-11-04 Thread Travis Griggs
I'm playing with a BeagleBone Black running the angstrom distro. Of course, stock python is 2.7, I'd rather use python3. There isn't a python3 package available for angstrom. So I downloaded the source and compiled. It seemed to work pretty well. I used the basic approach outlined in the REAMDE:

Re: How to add a current string into an already existing list

2013-11-04 Thread Nick the Gr33k
Στις 3/11/2013 2:16 μμ, ο/η Roy Smith έγραψε: In article , Gregory Ewing wrote: Nick the Gr33k wrote: I just want a mysql column type that can be eligible to store an array of elements, a list that is, no need for having a seperate extra table for that if we can have a column that can store

Re: [Python-ideas] os.path.join

2013-11-04 Thread Ethan Furman
On 11/04/2013 08:07 AM, Chris Angelico wrote: On Tue, Nov 5, 2013 at 2:29 AM, anatoly techtonik wrote: Right. But I am working more with URL paths nowadays. In there if I want to join two paths, no matter if 2nd starts with slash or not, I don't really expect the 2nd to rewrite the first. The

Re: [Python-ideas] os.path.join

2013-11-04 Thread Chris Angelico
Blargh, wrong list. It should have been private anyway. Kindly take no notice of the man behind the 3AM clock... ChrisA On Tue, Nov 5, 2013 at 3:07 AM, Chris Angelico wrote: > On Tue, Nov 5, 2013 at 2:29 AM, anatoly techtonik wrote: >> Right. But I am working more with URL paths nowadays. In th

Re: [Python-ideas] os.path.join

2013-11-04 Thread Chris Angelico
On Tue, Nov 5, 2013 at 2:29 AM, anatoly techtonik wrote: > Right. But I am working more with URL paths nowadays. In there if I > want to join two paths, no matter if 2nd starts with slash or not, I > don't really expect the 2nd to rewrite the first. Then os.path.join is probably the wrong tool fo

Re: Slicing with negative strides

2013-11-04 Thread Steven D'Aprano
On Mon, 04 Nov 2013 00:15:40 +0100, Martin Manns wrote: > On 29 Oct 2013 05:22:00 GMT > Steven D'Aprano wrote: > >> Does anyone here use slices (or range/xrange) with negative strides >> other than -1? > > I have used negative strides for comparing discrete sequences e. g. for > turbulence anal

Re: Algorithm that makes maximum compression of completly diffused data.

2013-11-04 Thread rusi
On Monday, November 4, 2013 7:57:19 PM UTC+5:30, Dave Angel wrote: > On Mon, 4 Nov 2013 05:53:28 -0800 (PST), Jonas wrote: > > Well let me try to explain why it is working and i have implemented one. > > I only need to refresh my memory it was almost 15 years ago. > > This is not the solution but t

Re: Algorithm that makes maximum compression of completly diffused data.

2013-11-04 Thread Dave Angel
On Mon, 4 Nov 2013 05:53:28 -0800 (PST), jonas.thornv...@gmail.com wrote: Den lördagen den 2:e november 2013 kl. 22:31:09 UTC+1 skrev Tim Roberts: > Here's another way to look at it. If f(x) is smaller than x for every x, > that means there MUST me multiple values of x that produce the

Re: Algorithm that makes maximum compression of completly diffused data.

2013-11-04 Thread jonas . thornvall
Den måndagen den 4:e november 2013 kl. 14:53:28 UTC+1 skrev jonas.t...@gmail.com: > Den lördagen den 2:e november 2013 kl. 22:31:09 UTC+1 skrev Tim Roberts: > > > jonas.thornv...@gmail.com wrote: > > > > > > > > > > > > > >Well then i have news for you. > > > > > > > > > > > > Well,

Re: Algorithm that makes maximum compression of completly diffused data.

2013-11-04 Thread jonas . thornvall
Den lördagen den 2:e november 2013 kl. 22:31:09 UTC+1 skrev Tim Roberts: > jonas.thornv...@gmail.com wrote: > > > > > >Well then i have news for you. > > > > Well, then, why don't you share it? > > > > Let me try to get you to understand WHY what you say is impossible. Let's > > say you d

Re: Algorithm that makes maximum compression of completly diffused data.

2013-11-04 Thread Tim Chase
On 2013-11-03 19:40, Mark Janssen wrote: > But you cheated by using a piece of information from "outside the > system": length. A generic compression algorithm doesn't have this > information beforehand. By cheating with outside information, you can perfectly compress any one data-set down to 1 b

Re: install package from github repository

2013-11-04 Thread Chris Angelico
On Mon, Nov 4, 2013 at 8:56 PM, C. Ng wrote: > Hi, > > I have cloned someone's repository on my local drive using git command: > git clone http://github.com/xxx.git > > But I don't find any setup.py file. How do I install the package xxx? So that > I can 'import xxx' in my python script. Does th

Re: Automation

2013-11-04 Thread Denis McMahon
On Sun, 03 Nov 2013 23:32:46 +, Denis McMahon wrote: > On Sun, 03 Nov 2013 14:19:48 -0200, Renato Barbosa Pim Pereira wrote: > >> I have one .xls file with the values of PV MV and SP, I wanna to >> calculate Kp Ki Kd with python from this file, can anyone give me any >> suggestion about how c

Re: install package from github repository

2013-11-04 Thread Amirouche Boubekki
create a setup.py and install it 2013/11/4 C. Ng > Hi, > > I have cloned someone's repository on my local drive using git command: > git clone http://github.com/xxx.git > > But I don't find any setup.py file. How do I install the package xxx? So > that I can 'import xxx' in my python script. >

install package from github repository

2013-11-04 Thread C. Ng
Hi, I have cloned someone's repository on my local drive using git command: git clone http://github.com/xxx.git But I don't find any setup.py file. How do I install the package xxx? So that I can 'import xxx' in my python script. Many thanks. -- https://mail.python.org/mailman/listinfo/pyt

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-11-04 Thread Antoon Pardon
Op 04-11-13 10:07, Ben Finney schreef: > Antoon Pardon writes: > >> This is a typical: "Heads, I win, Tail, you lose" situation that is >> being set up. > > If you see a discussion as a zero-sum game – like a coin toss, where one > person's win can only be at the expense of someone else's loss –

Re: Python Practice Problems

2013-11-04 Thread Terry Reedy
On 11/4/2013 12:28 AM, memilanuk wrote: On 11/03/2013 06:06 PM, yungwong@gmail.com wrote: Hi, who has some problems to practice using Python? Thx a lot! http://projecteuler.net/ is always a good bet Also www.checkio.org -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/p

Re: Automation

2013-11-04 Thread Mark Lawrence
On 04/11/2013 00:16, bob gailer wrote: Let's remember that it is the job of the OP to explain his problem so we can offer solutions. It's also the job of the responder to help if possible, e.g. by providing some context with their messages, which is clearly absent above. -- Python is the se

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-11-04 Thread Ben Finney
Antoon Pardon writes: > This is a typical: "Heads, I win, Tail, you lose" situation that is > being set up. If you see a discussion as a zero-sum game – like a coin toss, where one person's win can only be at the expense of someone else's loss – then I fear this isn't going to be productive. Su

Re: Possibly better loop construct, also labels+goto important and on the fly compiler idea.

2013-11-04 Thread Antoon Pardon
Op 03-11-13 23:11, Ben Finney schreef: > Antoon Pardon writes: > >> Op 03-11-13 06:17, Steven D'Aprano schreef: >>> I'm trying hard to give up threads like this, where people debate >>> the subjective tone of an email and ever more pedantic arguments >>> about the precise wording. Even when all p