Re: Mailing list activity low

2021-10-13 Thread Ken Peng
Maybe bounced by your mail provider. Try changing to another ESP such as gmail. On Wed, Oct 13, 2021 at 1:45 AM Antoon Pardon wrote: > Have I missed something and has the maillinglist been moved. Activity is > very low here, about one message every five days. > > Antoon Pardon. > -- > https://ma

Python 3.73 cannot install py3exiv2

2019-05-01 Thread Ken Martell
in post-processing as well as my own. Any help much appreciated! Thank you Ken Martell This is the error I get : D:\>pip3 install py3exiv2 Collecting py3exiv2   Using cached https://files.pythonhosted.org/packages/eb/c4/675823a2c23d8f138e7dc2b7574d09f26959f641d0b59c3ec7faa65764e5/py3exiv2-0

Re: f-string anomaly

2018-05-14 Thread Ken Kundert
27;.format(d)) print() print('Using f-string:') print(f'Email: {d:{{k}} {{v}}}') print() print('Using f-string:') k=6 v=9 print(f'Email: {d:{{k}} {{v}}}') The result is: NameError: name 'k' is not defined -

Re: f-string anomaly

2018-05-14 Thread Ken Kundert
Lele, I'm afraid I was unclear. The ... in the code snippet was intended to imply that these lines were appended to the end of the original code, where d was defined. -Ken On 05/14/2018 12:30 AM, Lele Gaifax wrote: > Ken Kundert writes: > >> I tried adding k and v to th

Re: f-string anomaly

2018-05-13 Thread Ken Kundert
braces in the format_spec, and the implementation of f-strings should be updated to be consistent with the syntax specification, and with the format method. -Ken On 05/13/2018 07:08 PM, Terry Reedy wrote: > On 5/13/2018 3:22 PM, Ken Kundert wrote: > > Please do not double post. > &g

f-string anomaly

2018-05-13 Thread Ken Kundert
hen used within the template. It appears the error occurs before __format__ is called (there is no output from the print function). Does anybody know why the format() method would work in this case but the f-string would not? Is this a but in f-strings? -Ken -- https://mail.python.org/mailman/listinfo/python-list

f-string anomaly

2018-05-13 Thread Ken Kundert
the template. It appears the error occurs before __format__ is called (there is no output from the print function). Does anybody know why the format() method would work in this case but the f-string would not? Is this a bug in f-strings? -Ken -- https://mail.python.org/mailman/listinfo/python-list

exec and traceback

2018-01-22 Thread ken . py
, I'll just add that for my purposes the data source is trusted. If you really want to talk about the security of using exec and eval, fine, but start another thread (BTW, I've written a simple secure eval()) Thanks in advance, Ken -- https://mail.python.org/mailman/listinfo/python-list

Re: bug in ''.format()

2017-11-02 Thread Ken Kundert
Sure enough. There is it, right there in the documentation. I did not read far enough. My bad. Thanks! -Ken -- https://mail.python.org/mailman/listinfo/python-list

bug in ''.format()

2017-11-02 Thread Ken Kundert
>>> '{:s}'.format('hello') 'hello' My reading of the documentation says I should be able to specify a width when interpolating a string. I have tried this in 2.7.13, 3.6.1 and 3.6.2 and it fails in all of them. Is this a bug or am I confused? -Ken -- https://mail.python.org/mailman/listinfo/python-list

RE: Error

2017-06-28 Thread Ken R. Lewis
downloaded from web sites? Thanks, Ken The error is on this line: data = response.json() Here is the script: #Need to install requests package for python #easy_install requests import requests # Set the request parameters url = 'https://website /file' # Eg. User name="admin", Passw

PEP proposal: sequence expansion support for yield statement: yield *

2016-04-20 Thread Ken Seehart
ional spacing is different: yield* sequence ). Examples: yield *(1,2,3) ... instead of : yield 1; yield 2; yield 3 ... or: for x in (1,2,3): yield x yield *chain(seq1, seq2) ... instead of : for x in chain(seq1, seq2) yield x ~ Ken Seehart -- https://mail.python.org/mailman/listinfo/p

Building a python extension on Windows

2015-10-27 Thread Ken Brooks
project somehow hopelessly out of date? And more to the point, can someone direct me to a nice, fresh example project that will build a little Python extension on Windows? Thanks, Ken ? -- https://mail.python.org/mailman/listinfo/python-list

Printing to printer, windows 7

2015-02-16 Thread ken . hessel
Would seem to be a simple problem. I just want to print to my printer instead of the console using Python 2.7, Windows 7. Hours of looking through FAQ's and Google haven't yielded a solution. Any suggestions appreciated -- -- https://mail.python.org/mailman/listinfo/python-list

Re: Trees

2015-01-21 Thread Ken Seehart
and a library (even the standard library) doesn't have to expose which one was picked as long as the performance is good. -- Devin On Tue, Jan 20, 2015 at 12:15 PM, Ken Seehart wrote: Exactly. There are over 23,000 different kinds of trees. There's no way you could get all of them to f

Re: Trees

2015-01-20 Thread Ken Seehart
Exactly. There are over 23,000 different kinds of trees. There's no way you could get all of them to fit in a library, especially a standard one. Instead, we prefer to provide people with the tools they need to grow their own trees. http://caseytrees.org/programs/planting/ctp/ http://www.ncsu.

Re: Command Line Inputs from Windows

2015-01-03 Thread Ken Stewart
y, my computer still boots after mucking around in the registry. I haven't yet investigated the launcher suggested by Chris and Mark. That may well be the proper solution. At the moment it looks like the Python installer didn't create these registry entries properly in Windows 7. Tha

Command Line Inputs from Windows

2015-01-02 Thread Ken Stewart
I’ve tried writing the script using only commands, without the accouterments of a full program (without the def statement and without the if __name__ == ‘__main__’ …) to no avail. I’m out of ideas. Any suggestions? Ken Stewart -- https://mail.python.org/mailman/listinfo/python-list

Re: A computer programmer, web developer and network admin resume

2013-05-22 Thread Ken Bolton
On Wed, May 22, 2013 at 7:25 PM, Gregory Ewing wrote: > Tim Chase wrote: > >> So a pirate programmer walks into a bar with a bird on his shoulder. >> The bird repeatedly squawks "pieces of nine! pieces of nine!". The >> bartender looks at him and asks "what's up with the bird?" to which >> the pi

Re: Static Maps from Lat Long data in XLS file

2013-05-21 Thread Ken Bolton
amp;size=600x600&sensor=false I was able to use curl to grab the images you linked. I believe you can use urllib (or, better, requests - http://docs.python-requests.org/en/latest/) to get and save the images. hth. best, ken -- http://mail.python.org/mailman/listinfo/python-list

Re: Yet another attempt at a safe eval() call

2013-03-14 Thread Ken Seehart
exercises left to the reader. Something vaguely like this: /pseudocode:/ def safe_eval(s, symbols={}): while search(s, r'\w+'): replace match with '('+repr(symbols[match])+')' in s return ast.literal_eval(s) - Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: wiki.python.org

2013-01-09 Thread Ken
ice and could not get there, so I would say it is a problem on the server's end. Ken -- Corruption is not the #1 priority of the Police Commissioner. His job is to enforce the law and fight crime. -- P. B. A. President E. J. Kiernan -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes free memory which is allocated in C DLL

2012-10-27 Thread zlchen . ken
On Sunday, October 28, 2012 6:26:28 AM UTC+8, Nobody wrote: > On Sat, 27 Oct 2012 07:42:01 -0700, zlchen.ken wrote: > > > > > I have a DLL which written in C language, one of the function is to > > > allocate a structure, fill the members and then return the pointer of > > > the structure. >

Re: ctypes free memory which is allocated in C DLL

2012-10-27 Thread Ken Chen
On Saturday, October 27, 2012 10:56:54 PM UTC+8, Chris Angelico wrote: > On Sun, Oct 28, 2012 at 1:42 AM, wrote: > > > Hi Guys, > > > > > > I have a DLL which written in C language, one of the function is to > > allocate a structure, fill the members and then return the pointer of the > > st

ctypes free memory which is allocated in C DLL

2012-10-27 Thread zlchen . ken
Hi Guys, I have a DLL which written in C language, one of the function is to allocate a structure, fill the members and then return the pointer of the structure. After Python called this function, and done with the returned structure, I would like to free the returned structure. How can I achie

Re: How to correctly pass “pointer-to-pointer” into DLL via ctypes?

2012-10-27 Thread zlchen . ken
On Thursday, November 18, 2010 8:03:57 PM UTC+8, Grigory Petrov wrote: > Hello. > > I have a DLL that allocates memory and returns it. Function in DLL is like > this: > > void Foo( unsigned char** ppMem, int* pSize ) > { >   * pSize = 4; >   * ppMem = malloc( * pSize ); >   for( int i = 0; i < *

Re: Boolean function on variable-length lists

2012-09-12 Thread Ken Seehart
Putting a few of peoples ideas together... gt = lambda x: lambda y: x>y eq = lambda x: lambda y: x==y def constrain(c,d): return all({f(x) for f, x in zip(c, d)}) constraints = [gt(2), eq(1)] data0 = [1,1] data1 = [3,1] print constrain(constraints, data0) print constrain(constraints, da

Re: avoid the redefinition of a function

2012-09-12 Thread Ken Seehart
Use lambda expressions to define some constraints: gt = lambda x: lambda y: x>y eq = lambda x: lambda y: x==y constraints = [gt(2), eq(1)] data = [3,1] for i,c in enumerate(constraints): print c(data[i]) On 9/12/2012 5:56 AM, Jabba Laci wrote: > Hi, > > I have an installer script t

Numerical Linear Algebra in arbitrary precision

2012-02-15 Thread Ken
em to find much info on built in functions except for LU decomposition/solve. Appreciate any comments. Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: dpkg

2011-08-26 Thread Ken Watford
On Fri, Aug 26, 2011 at 10:43 AM, Verde Denim wrote: > Looking for this with find / -name libclntsh.so.11.1 -print produces > /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1 > > I'm confused as to why Python doesn't see it... Try running "sudo ldconfig". -- http://mail.python.org/mailman/lis

Re: Replacement for the shelve module?

2011-08-19 Thread Ken Watford
On Fri, Aug 19, 2011 at 11:31 AM, Forafo San wrote: > Folks, > What might be a good replacement for the shelve module, but one that > can handle a few gigs of data. I'm doing some calculations on daily > stock prices and the result is a nested list like: For what you're doing, I would give PyTabl

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

2011-08-05 Thread Ken Watford
On Fri, Aug 5, 2011 at 3:37 PM, Jack Bates wrote: > 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? If using PyPy instead of CPython is an option, the "thunk" object space's "become" function can

Re: Wondering in the Python Forrest

2011-07-30 Thread Ken Watford
On Sat, Jul 30, 2011 at 7:13 AM, ray wrote: > I found that structured data could be presented in Python using a module in > wxPython. > > Where am I?  I do not know the relationships between the Pythons.  I > feel that I am missing something.  I started with Python as it has so > much functionalit

Re: perceptron feed forward neural networks in python

2011-07-11 Thread Ken Watford
On Mon, Jul 11, 2011 at 2:31 PM, Igor Begić wrote: > Hi, > I,m new to Python and i want to study and write programs about perceptron > feed forward neural networks in python. Does anyone have a good book or link > for this? Try Stephen Marsland's "Machine Learning: An Algorithmic Perspective". Al

Re: LDAP: How get all users belongs to a group.

2011-06-23 Thread Ken Watford
On Thu, Jun 23, 2011 at 9:14 AM, sajuptpm wrote: > Hi, > How get all users belongs to a group using python ldap module. Depends on what you mean by "users" and "group", what information you already have, and what information you want to get. I'll assume you mean posix accounts and groups, and tha

Re: something about performence

2011-06-21 Thread Ken Seehart
On 6/20/2011 11:56 PM, king6c...@gmail.com wrote: > Thanks for your reply,Ken :) > I found the two files ends with the same id……so I am lazy^-^ > I tried psyco,and unfortunately it costs nearly the same time as before. > Is it true that we can only get str from files in Python? >

Re: something about performence

2011-06-20 Thread Ken Seehart
On 6/20/2011 10:31 PM, Ken Seehart wrote: > On 6/20/2011 7:59 PM, king6c...@gmail.com wrote: >> Hi, >> I have two large files,each has more than 2 lines,and each >> line consists of two fields,one is the id and the other a value, >> the ids are sorted. >

Re: something about performence

2011-06-20 Thread Ken Seehart
canf can be handled by regular expressions, but that would clearly useless for you, and just slow you down more since it does not perform the int conversion for you. Your code appears to have a bug: I would expect that the last entry will be lost unless both files end with the same index value. Be sure to test your code on a few short test files. I recommend psyco to make the whole thing faster. Regards, Ken Seehart -- http://mail.python.org/mailman/listinfo/python-list

Re: I think I found a mistake in the official language reference documentation -- or I am missing somethig???

2011-04-27 Thread Ken Watford
On Wed, Apr 27, 2011 at 4:02 PM, Igor Soares wrote: > Reading the section "6.11. The import statement" > http://docs.python.org/py3k/reference/simple_stmts.html#the-import-statement > > I found: > """ > Import statements are executed in two steps: (1) find a module, and > initialize it if necessar

Re: Function __defaults__

2011-04-25 Thread Ken Seehart
On 4/25/2011 4:59 AM, Colin J. Williams wrote: On 24-Apr-11 13:07 PM, Ken Seehart wrote: On 4/24/2011 2:58 AM, Steven D'Aprano wrote: Consider this in Python 3.1: def f(a=42): ... return a ... f() 42 f.__defaults__ = (23,) f() 23 Is this an accident of implementation, or can I

Re: Function __defaults__

2011-04-24 Thread Ken Seehart
Gotta love that email latency. :-D Ken On 4/24/2011 2:47 PM, Daniel Kluev wrote: On Mon, Apr 25, 2011 at 8:21 AM, Ken Seehart wrote: Good point, Benjamin. I didn't think of testing on Jython before answering. For practical purposes it's a really good idea to test obscure featur

Re: Function __defaults__

2011-04-24 Thread Ken Seehart
;>> So it works correctly in Jython 2.x. Conclusion: Not an implementation detail, and safe to use. Ken On 4/24/2011 10:18 AM, Daniel Kluev wrote: http://docs.python.org/dev/reference/datamodel.html Callable types ... Special attributes: ... __defaults__A tuple containing default argume

Re: Function __defaults__

2011-04-24 Thread Ken Seehart
Good point, Benjamin. I didn't think of testing on Jython before answering. For practical purposes it's a really good idea to test obscure features against all potential target platforms. In this case, I would argue that**Benjamin's test demonstrates a bug in Jython. One could counter by p

Re: Function __defaults__

2011-04-24 Thread Ken Seehart
s (in python 2.x), which has been around, documented and stable for quite a while. So it's probably just as safe as any other monkey patching technique. :) Best of luck, Ken -- http://mail.python.org/mailman/listinfo/python-list

Dump interpreter history?

2011-03-25 Thread Ken D'Ambrosio
r. Can this be done? Thanks! -Ken -- http://mail.python.org/mailman/listinfo/python-list

Regex in if statement.

2011-03-20 Thread Ken D'Ambrosio
Hey, all -- I know how to match and return stuff from a regex, but I'd like to do an if, something like (from Perl, sorry): if (/MatchTextHere/){DoSomething();} How do I accomplish this in Python? Thanks! -Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon

2011-03-11 Thread Ken Seehart
On 3/11/2011 7:45 AM, Rita wrote: http://us.pycon.org/2010/ http://us.pycon.org/2009/ Try the wayback machine: http://replay.waybackmachine.org/20100701160843/http://us.pycon.org/2010/about/ -- http://mail.python.org/mailman/listinfo/python-list

Re: factorial of negative one (-1)

2010-11-01 Thread Ken Watford
On Mon, Nov 1, 2010 at 5:42 AM, Hrvoje Niksic wrote: > > Printing out further digits (without quotes) is not pointless if you > want to find out the exact representation of your number in python's > floating point, for educational purposes or otherwise.  Python has a > little-known but very instru

Re: Python3: API Documentation generator

2010-09-27 Thread Ken Watford
On Mon, Sep 27, 2010 at 1:15 PM, Tim Diels wrote: > On 27/09/2010 09:02, Chris Rebert wrote: >> >> On Sun, Sep 26, 2010 at 11:56 PM, Tim Diels  wrote: >>> >>>  Hi all >>> >>> I've just switched to python3 and it turns out my current API >>> documentation >>> generator (epydoc) no longer works. I a

Re: Down with tinyurl! (was Re: importing excel data into a python matrix?)

2010-09-19 Thread Ken Watford
On Sun, Sep 19, 2010 at 9:16 AM, Aahz wrote: > In article , > geremy condra   wrote: >>On Wed, Sep 1, 2010 at 4:35 PM, patrick mcnameeking >> wrote: >>> >>> I've been working with Python now for about a year using it primarily for >>> scripting in the Puredata graphical programming environment. I'

Re: Exposing buffer interface for non-extension types?

2010-07-20 Thread Ken Watford
On Tue, Jul 20, 2010 at 9:26 PM, Robert Kern wrote: > On 7/20/10 8:38 PM, Ken Watford wrote: >> >> On Tue, Jul 20, 2010 at 6:58 PM, Stefan Behnel >>  wrote: >>> >>> Ken Watford, 21.07.2010 00:09: >>>> >>>> Is there any way to ex

Re: Exposing buffer interface for non-extension types?

2010-07-20 Thread Ken Watford
On Tue, Jul 20, 2010 at 8:28 PM, Carl Banks wrote: > On Jul 20, 3:09 pm, Ken Watford wrote: >> Is there any way to expose the PEP 3118 buffer interface for objects >> that aren't extension types? >> >> Currently, I can expose the NumPy array interface (using

Re: Exposing buffer interface for non-extension types?

2010-07-20 Thread Ken Watford
On Tue, Jul 20, 2010 at 6:58 PM, Stefan Behnel wrote: > Ken Watford, 21.07.2010 00:09: >> >> Is there any way to expose the PEP 3118 buffer interface for objects >> that aren't extension types? > > Given that it's a pure C-level interface, I don'

Exposing buffer interface for non-extension types?

2010-07-20 Thread Ken Watford
Is there any way to expose the PEP 3118 buffer interface for objects that aren't extension types? Currently, I can expose the NumPy array interface (using either __array_interface__ or __array_struct__) for any class, extension or otherwise. But I can't find any reference to python-side interfacin

ANN: PiCloud's Python Platform is now open to the Public!

2010-07-19 Thread Ken Elkabany
ities, PiCloud enables you to develop faster, easier, and smarter. Common use cases for our platform: * Scientific computing * Simulations * Video and image encoding * Statistical analysis of data sets * Real-time data processing * Charts and graphs generation Cheers, Ken Elkabany PiCloud, Inc. --

Re: rstrip()

2010-07-16 Thread Ken Watford
On Fri, Jul 16, 2010 at 12:58 PM, Jason Friedman wrote: > $ python > Python 2.6.4 (r264:75706, Dec  7 2009, 18:43:55) > [GCC 4.4.1] on linux2 > Type "help", "copyright", "credits" or "license" for more information. "x.vsd-dir".rstrip("-dir") > 'x.vs' > > I expected 'x.vsd' as a return value.

N00b question: matching stuff with variables.

2010-06-28 Thread Ken D'Ambrosio
ng it to give a hint of what I'm trying to do. What's the correct Python-esque way to go about this? Thanks! -Ken -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- http://mail.python.org/mailman/listinfo/python-list

ANN: PiCloud cloud library 1.9 release

2010-06-06 Thread Ken Elkabany
image encoding * Statistical analysis of data sets * Real-time data processing * Charts and graphs generation Cheers, Ken Elkabany PiCloud, Inc. -- http://mail.python.org/mailman/listinfo/python-list

python urllib mechanize post problem

2010-05-23 Thread ken
hello ALL im making some simple python post script but it not working well. there is 2 part to have to login. first login is using 'http://mybuddy.buddybuddy.co.kr/userinfo/ UserInfo.asp' this one. and second login is using 'http://user.buddybuddy.co.kr/usercheck/ UserCheckPWExec.asp' i can lo

mechanize.browser() click or submit related problem

2010-04-12 Thread ken
Hello All. im making some website login function with mechanize.browser() module. but problem is i can't send submit or click submit button with mechanize click() function, it not working. how can i submit button or click() function make it work? i can make it work mechanize.Request and mechanize.u

IMAP mail filters tool

2010-03-04 Thread Ken Seehart
g rule o X-Launchpad-Bug: "product=phatch; milestone=..." yields a new folder "Bugs/Phatch" with a corresponding rule o X-Bugzilla-Product: "Shrubbery" yields a new folder "Bugs/Shrubbery" with a corresponding rule Thanks, Ken -- http://mail.python.org/mailman/listinfo/python-list

ANN: PiCloud cloud library 1.8 release

2010-02-18 Thread Ken Elkabany
nd smarter. Common use cases for our platform: * Crawling the web * Manipulating images and videos * Generating charts and graphs * Statistical analysis of data sets * Real-time data processing Cheers, Ken Elkabany PiCloud, Inc. -- http://mail.python.org/mailman/listinfo/python-list

Re: python and http POST

2010-02-11 Thread Ken Seehart
"Use tamperdata to view and modify HTTP/HTTPS headers and post parameters... " https://addons.mozilla.org/en-US/firefox/addon/966 Enjoy, Ken galileo228 wrote: Hey All, Been teaching myself Python for a few weeks, and am trying to write a program that will go to a url, enter a str

Re: regex to match python string literal syntax

2010-02-10 Thread Ken Seehart
ile(r""" \""" [^"\\]* (?: (?: \\. | "(?!"") ) [^"\\]* )* (?: \""" )? | " [^"\\\n]* (?: \\. [^"\\\n]* )* "? | ''' [^'\\]* (?: (?: \\. | '(?!'') ) [^'\\]* )* (?:

regex to match python string literal syntax

2010-02-10 Thread Ken Seehart
rrectly matches quote containing newline/) Anyone know a regular expression that correctly matches python string literals? Thanks in advance, Ken -- http://mail.python.org/mailman/listinfo/python-list

Buffered streaming

2009-11-26 Thread Ken Seehart
I need to create a pipe where I have one thread (or maybe a generator) writing data to the tail while another python object is reading from the head. This will run in real time, so the data must be deallocated after it is consumed. Reading should block until data is written, and writing shoul

Re: Help with database planning

2009-11-14 Thread Ken Seehart
Oops, forgot the blank arg. Anyway, this is of course untested code... # Only one of the following is used. The other two are blank. concept = models.ForeignKey(Concept, blank=True) slot = models.ForeignKey(Slot, blank=True) filler = models.ForeignKey(Filler, blank=True) Ken Seehart

Re: Help with database planning

2009-11-14 Thread Ken Seehart
Good idea to use Django. I've just started using it and I really like it. However, I should give you a heads-up: You will probably want to use a Django migration tool (I'm using South) because the alternative is basically to rebuild your database each time your model changes. Unfortunately,

Re: Authentication session with urllib2

2009-11-11 Thread Ken Seehart
Jon Clements wrote: On 11 Nov, 07:02, Ken Seehart wrote: I'm having some difficulty implementing a client that needs to maintain an authenticated https: session. I'd like to avoid the approach of receiving a 401 and resubmit with authentication, for two reasons: 1.

Authentication session with urllib2

2009-11-10 Thread Ken Seehart
his happen in python 2.5.2? Keep in mind that this only needs to work with a particular server which I control. It does not need to function as a general purpose browser. The server is powered by Django. - Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: PiCloud Beta Release

2009-11-09 Thread Ken Elkabany
On Thu, Nov 5, 2009 at 3:19 PM, Jacob Shaw wrote: > On Nov 1, 5:13 pm, Ken Elkabany wrote: >> Hello, >> >> PiCloud has just released a Python library, cloud, which allows you to >> easily offload the execution of a function to a cluster of servers >> running

Request for Beta Testers

2009-10-19 Thread Ken Elkabany
is of data sets * Real-time data processing Best, Ken Elkabany -- http://mail.python.org/mailman/listinfo/python-list

POST value related question

2009-10-12 Thread ken
hello i have some problem to send POST value by use mechanize. i can't write my article to my blog site. here is full source. and what i want to do is, im posting my article to my blog site. thanks in advance. # -*- coding: cp949 -*- import mechanize import cookielib # Browser

POST value related question

2009-10-12 Thread ken
hello i have some problem to send POST value by use mechanize. i can't write my article to my blog site. here is full source. and what i want to do is, im posting my article to my blog site. thanks in advance. # -*- coding: cp949 -*- import mechanize import cookielib # Browser br = mechanize.Bro

Rules regarding a post about a commercial product

2009-10-07 Thread Ken Elkabany
/), I wanted to ask one last time to make sure that such a post would be appropriate. Thanks, Ken -- http://mail.python.org/mailman/listinfo/python-list

Rules governing a post about a commercial product

2009-10-07 Thread Ken Elkabany
/), I wanted to ask one last time to make sure that such a post would be appropriate. Thanks, Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: possible attribute-oriented class

2009-09-07 Thread Ken Newton
On Mon, Sep 7, 2009 at 6:02 PM, Jan Kaliszewski wrote: ... > > I think it depends how often people need to implement such boiler-plate > code for themselves. Now I see that this thread is not very popular, so > indeed maybe you are right... Though it'd be nice to have OOTB such > a factory in `coll

Re: possible attribute-oriented class

2009-09-04 Thread Ken Newton
ded in C/C++. The C interface is a reason that it would be nice to see this as a basic type rather than an add-on module.  Having an API pre-defined on the C side for this would also be directly useful in my case. Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: possible attribute-oriented class

2009-09-04 Thread Ken Newton
I like this version very much. I'm ready to put this into practice to see how it works in practice. A minor point: I envision this to be used in a context where all key values are strings (legal attribute identifiers). But constructing an AttrClass from a dict or setting values directly with the

Re: possible attribute-oriented class

2009-09-03 Thread Ken Newton
On Thu, Sep 3, 2009 at 4:30 PM, Steven D'Aprano < st...@remove-this-cybersource.com.au> wrote: > On Thu, 03 Sep 2009 15:46:01 -0700, Ken Newton wrote: > > > I have created the following class definition with the idea of making a > > clean syntax for non-programme

possible attribute-oriented class

2009-09-03 Thread Ken Newton
5 print atr print print repr(atr) print print atr.fourth.aaa = test() gives the following output: { second : 2 fifth : 5 fourth : { aaa : AAA bbb : BBB} third : three first : 1} AttrClass({'second': 2, 'fifth': 5, 'fourth': AttrClass({'aaa': 'AAA', 'bbb': 'BBB'}), 'third': 'three', 'first': 1}) AAA Ken Newton -- http://mail.python.org/mailman/listinfo/python-list

Re: cgi and POST

2009-08-28 Thread Ken Seehart
D'Arcy J.M. Cain wrote: On Fri, 28 Aug 2009 13:59:57 -0700 Ken Seehart wrote: Using cgi, how do I get the /data /(not the uri arguments) originating from a POST that did not originate from a form. You don't care where it came from. Just treat it exactly as if it came f

cgi and POST

2009-08-28 Thread Ken Seehart
I can't seem to find an answer to this simple question on the web, and the documentation doesn't seem to indicate how to do this... On the client I have: urllib.urlopen(uri, data) This does a POST, but it's not obvious to me how this maps onto the various cgi examples which assume that

decorators - would be nice if...

2009-07-14 Thread Ken Seehart
seem to be a good way to use multiple metaclasses in a class hierarchy, and more generally you can't stack them on top of each other (you can only have one metaclass per class)). Thoughts? - Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: XML(JSON?)-over-HTTP: How to define API?

2009-07-03 Thread Ken Dyck
On Jul 2, 6:17 pm, Allen Fowler wrote: > Since I need to work with other platforms, pickle is out...  what are the > alternatives?  XML? JSON? Don't forget YAML (http://yaml.org). Libraries available for Python and .NET, among others. -Ken -- http://mail.python.org/mailman/list

Re: Why is it that str.replace doesn't work sometimes?

2009-06-24 Thread Ken Dyck
double backslash in the string literal to indicate that you mean a literal backslash, not an escape character (eg. '\\title') The official documentation, including a list of the special escape sequences, is here: http://docs.python.org/reference/lexical_analysis.html#string-literals -Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: Regarding Python is scripting language or not

2009-06-17 Thread Ken Seehart
benefiting from scripting capabilities: Django comes to mind. There are hundreds of others out there, but instead of listing them, I think I will get back to programming. Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: unsuccessful post request hangs, what gives?

2009-06-15 Thread Ken Seehart
how us the relevant code? - Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: xmlrpclib and generators

2009-06-10 Thread Ken Seehart
Hendrik van Rooyen wrote: Ken Seehart wrote: 8< implementation -- The practical constraints of my specific application are: 1. The rpc server is a highly specialized slave system that does heavy duty work. 2. The rpc client is itself a web server t

xmlrpclib and generators

2009-06-10 Thread Ken Seehart
It would be really cool if an rpc call could return a generator. I know that there are a few reasons why one would not expect it to be part of the library (e.g. the client would need to receive asynchronous messages, and it's not part of the rpc standard), however below I show a possible imple

Unbuffered keyboard input?

2009-06-09 Thread Ken D'Ambrosio
I need to have some non-buffered keyboard interaction with a Python script (on Linux). Back in the day, I fired up Curses to do this in Perl. Any idea if that's still how I have to fly? Or is there a different mechanism? Thanks! -Ken -- This message has been scanned for viruse

Re: multi-core software

2009-06-07 Thread Ken T.
On Mon, 08 Jun 2009 02:39:40 +0100, Jon Harrop wrote: > Ken T. wrote: >> On Sun, 07 Jun 2009 11:16:46 -0400, Lew wrote: >>> So the good old days are a matter of degree and self-deception - it >>> was easier to fool ourselves then that we could at least guess timings

Re: multi-core software

2009-06-07 Thread Ken T.
ution. As I recall I could get exact timings on my 6502 based Commodore 64. The issues you speak of simply weren't issues. -- Ken T. http://www.electricsenator.net Never underestimate the power of stupid people in large groups. -- http://mail.python.org/mailman/listinfo/python-list

Re: Browser based Canvas UI?

2009-05-30 Thread Ken Seehart
CTO wrote: On May 30, 4:12 am, Ken Seehart wrote: A couple years ago I stumbled upon an interesting technology but I can't seem to find it, and I can remember what it is called. Unfortunately this makes it difficult to search for. I am am aware of several partial matches (items that

Re: How does Python's OOP feel?

2009-05-30 Thread Ken Seehart
vantages, but on the whole, I like it. What else can I say? See also: http://www.ferg.org/projects/python_java_side-by-side.html Ken -- http://mail.python.org/mailman/listinfo/python-list

Browser based Canvas UI?

2009-05-30 Thread Ken Seehart
uirements 1,2,3) - Seems quite magical since I didn't know the necessary graphical raw materials existed in javascript - I think it's based on Ajax, but I can't seem to find a relevant python demo of it due to too much clutter in my google searches Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: What text editor is everyone using for Python

2009-05-26 Thread Ken Seehart
retty good. http://www.notepad.org/ :-) Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: large array in a single line

2009-05-26 Thread Ken Seehart
y a list of strings. There is no return value. (The name is intended to match readlines(); writelines() does not add line separators.) So you are asking it to effectively concatenate the characters in your string, (which gives you back your original string), and write the result. Si

Re: What text editor is everyone using for Python

2009-05-26 Thread Ken Seehart
ger is way more powerful in the Pro version. Of course, favorites are ultimately determined by religious preference. Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: What is the difference between init and enter?

2009-05-26 Thread Ken Seehart
t. The __init__ method is called when the object is initialized, but the __enter__ method is called when the context is entered (i.e. when the 'with' statement is invoked). Ken -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   >