Re: python beginner

2008-07-07 Thread Ken Starks
cna wrote: Hi all and one, how may i learn python. is there any other website except python.org For several video series, follow the link from python.org to the ShowMeDo site. http://www.python.org/doc/av/5minutes/ -- http://mail.python.org/mailman/listinfo/python-list

Re: sage vs enthought for sci computing

2008-07-09 Thread Ken Starks
sturlamolden wrote: On 7 Jul, 22:35, [EMAIL PROTECTED] wrote: Hello, I have recently become interested in using python for scientific computing, and came across both sage and enthought. I am curious if anyone can tell me what the differences are between the two, since there seems to be a lot of

Re: PIL: Transparent PNGs and im.paste: ValueError: bad transparency mask

2008-07-11 Thread Ken Starks
Durand wrote: I posted this too soon. Converting the images to png with image magick's convert did the trick...However, I'm still not sure why I need to convert the images in the first place. Are there different types of PNGs? http://en.wikipedia.org/wiki/Portable_Network_Graphics#Transparency

Re: Dictionary bidirectional

2008-07-14 Thread Ken Starks
Dennis Lee Bieber wrote: On Sun, 13 Jul 2008 16:21:11 -0700 (PDT), Kless <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: I need a dictionary where get the result from a 'key' (on left), but also from a 'value' (on right), how to get it? I know that dictionaries aren't bidirect

Re: Measure class, precision, significant digits, and divmod()

2008-07-15 Thread Ken Starks
Ethan Furman wrote: Hey all. As I have mentioned before, I am making this Measure class for two reasons: experience with unit testing, I like playing with numbers, I am unaware of anything like this having yet been done (okay, three reasons ;). Any and all feedback welcome, particu

Re: How to figure out if the platform is 32bit or 64bit?

2008-07-16 Thread Ken Hartling
ears to be looking at the build executable ... on Windows 64 it returns '32'. Thanks for the suggestions, hopefully we'll come up with a winner. Ken On Tue, Jul 15, 2008 at 1:39 PM, Benjamin Kaplan <[EMAIL PROTECTED]> wrote: > > > On Tue, Jul 15, 2008 at 4:10 PM, <

Eclipse, Pydev, question

2008-07-16 Thread Ken Starks
I have a small project for further development in eclipse, using the pyDev plug-in. I am working on foo.py and bar.pyc is also in the directory. bar.py is not in the directory; it is someone else's (confidential) file, and I don't get the python source. Can I run bar.pyc from eclipse ? -- http:

Re: % sign in python?

2008-07-18 Thread Ken Starks
Terry Reedy wrote: korean_dave wrote: What does this operator do? Specifically in this context test.log( "[[Log level %d: %s]]" % ( level, msg ), description ) (Tried googling and searching, but the "%" gets interpreted as an operation and distorts the search results) Having seen a number

Re: derivative in numpy

2008-07-28 Thread Ken Starks
[EMAIL PROTECTED] wrote: Hi, I am looking to do a simple derivative. I would expect such a function to be available in numpy, but can't find it. I have written my own, but just curious if anybody knows of such function in numpy. Cheers, Kim numpy and much more are wrapped together in 'sage' a

Re: derivative in numpy

2008-07-28 Thread Ken Starks
Ken Starks wrote: [EMAIL PROTECTED] wrote: Hi, I am looking to do a simple derivative. I would expect such a function to be available in numpy, but can't find it. I have written my own, but just curious if anybody knows of such function in numpy. Cheers, Kim numpy and much more are wr

Re: Decimals not equalling themselves (e.g. 0.2 = 0.2000000001)

2008-08-04 Thread Ken Starks
CNiall wrote: I am very new to Python (I started learning it just yesterday), but I have encountered a problem. I want to make a simple script that calculates the n-th root of a given number (e.g. 4th root of 625--obviously five, but it's just an example :P), and because there is no nth-root

Re: Keg - A python web framework

2008-08-05 Thread Ken Starks
Daniel Fetchinson wrote: I've been working on a python web framework which I think might be of interest to you. Details may be found at http://code.google.com/p/keg/wiki/Concept. All suggestions or comments will be greatly appreciated. I fail to see what the advantages of your framework are o

Re: Suggestions for creating a PDF table

2008-08-08 Thread Ken Starks
le of the kind of LaTeX source you would ideally like ? If not, your problem is with LaTeX itself, which has if anything __too_many__ ways of controlling tables rather than inadequate ways. If so, we may be able to help with the rather arcane transformation into TeXML format. As for all the temp

Re: Replace value of node using getElementsByTagName

2008-08-10 Thread Ken Starks
Ouray Viney wrote: Xml 8.4.27.5 python from xml.dom import minidom xmldoc = minidom.parse('C:\TestProfile.xml') xmldoc ibNodeList = xmldoc.getElementsByTagName("ib") firstChild = xmldoc.firstChild for node in xmldoc.getElementsByTagName('ib'): # visit every node print node.toxml()

Re: Looking out a module for Subversion

2008-08-12 Thread Ken Starks
Dudeja, Rajat wrote: Hi, I'm new to Python. I only have read "Byte of Python" by Swaroop C H just to be familiar with sytax of python. I've installed Python 2.5 from Active State and using its PythonWin Editor / interpreter. This, unfortunaltely, does not help in debugging. I'm looking for an o

Re: You advice please

2008-08-13 Thread Ken Starks
Hussein B wrote: Hey, I'm a Java/Java EE developer and I'm playing with Python these days. I like the Python language so much and I like its communities and the Django framework. My friends are about to open a Ruby/Rails shop and they are asking me to join them. I don't know what, sure I'm not le

Re: How do I organize my Python application code?

2008-08-14 Thread Ken Starks
Fredrik Lundh wrote: Dudeja, Rajat wrote: And my problem is that I don't have an understanding of how the code in Python is generally organized, in case my code spans multiple files, modules, etc. I've been using C/C++ althrough my life on Linux and Visaul Studio, so the way their code is organ

Re: Real Time Midi File Playback - Reading and Writing midi at the same time

2008-05-04 Thread Ken Starks
Gilly wrote: Hi I am trying to create an application that uses some form of input to create a midi file. I would like for this to be a 'real time' process. In other words, I want to be able to begin playing the midi file before I finish writing it, and continue writing as it plays. I would reall

Script using generators produces different results when invoked as a CGI

2008-05-04 Thread Barclay, Ken
ipt I was testing with. It's using hard-coded values in place of ones I'll be getting from an HTML form (generated with HTMLgen) presented to the user. There are no exceptions or errors of any kind. Any pointers on what might be happening here would be welcome! Thanks Ken #!/usr/loc

Authoring SOAP and WSDL

2008-05-10 Thread Ken Starks
I would like to write SOAP services in python, and have an environment that will then generate a matching WSDL for me automatically. Does such a thing exist in python? Thanks in advance. Ken. -- http://mail.python.org/mailman/listinfo/python-list

Re: Filling in Degrees in a Circle (Astronomy)

2008-08-23 Thread Ken Starks
tom wrote: Both scipy and matplotlib are not part of the standard Python distribution so they would need to be installed separately. Scipy is useful for scientific data analysis, and matplotlib is useful for making plots. For a review of a really nice looking wrapper around lots of open

Re: Best way to set/get an object property

2008-08-25 Thread Ken Seehart
This is probably what you want: http://www.python.org/download/releases/2.2/descrintro/#property Available in Python 2.2 or later. Enjoy, Ken Seehart Hussein B wrote: Hey, I noted that Python encourage the usage of: -- obj.prop = data x = obj.prop -- to set/get an object's property

Re: Python String Immutability Broken!

2008-08-25 Thread Ken Seehart
will not get correct results. Trying to change the length of the string will cause disasters. Lengthening a string will corrupt memory, and shortening the string will not shorten it but rather embed '\0' in it. Ken Hendrik van Rooyen wrote: Patrick Maupin wrote: Very enterta

Re: Python String Immutability Broken!

2008-08-25 Thread Ken Seehart
bus structure. And I would also like to know if there is a better way of doing this. Yes, there is a better way. Use a character array instead of a string. http://python.net/crew/theller/ctypes/tutorial.html#arrays ... - Ken -- http://mail.python.org/mailman/listinfo/python-list

Private attribute

2008-08-25 Thread Ken Starks
return 0.8 def __setattr__(self,attrname,value): if attrname == 'gridsize': pass else: self.__dict__[attrname]=value ##### Cheers, Ken. -- http://mail.python.org/mailman/listinfo/python-list

Re: Private attribute

2008-08-25 Thread Ken Starks
Ken Starks wrote: I have a class with an attribute called 'gridsize' and I want a derived class to force and keep it at 0.8 (representing 8mm). Is this a correct, or the most pythonic approach? def __getattr__(self,attrname): if attrname ==

Re: Private attribute

2008-08-25 Thread Ken Starks
André wrote: On Aug 25, 3:47 pm, Ken Starks <[EMAIL PROTECTED]> wrote: I have a class with an attribute called 'gridsize' and I want a derived class to force and keep it at 0.8 (representing 8mm). Is this a correct, or the most pythonic approach?

Re: Private attribute

2008-08-25 Thread Ken Starks
Marc 'BlackJack' Rintsch wrote: On Mon, 25 Aug 2008 21:44:49 +0100, Ken Starks wrote: def __getattr__(self,attrname): if attrname == 'gridsize': return 0.8 def __setattr__(self,attrname,value): if a

SocketServer and long-polling connections

2008-08-25 Thread Ken Seehart
than that and it seems to block on opening more connections until one of the other connections releases. Is it possible that the limit may actually be imposed by the client in some bizarre way? In this case all of the clients are local, and are multiple instances of the same mozilla activex DLL

SocketServer max connections

2008-08-25 Thread Ken Seehart
other connections releases. - Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: Private attribute

2008-08-26 Thread Ken Starks
Steven D'Aprano wrote: def SomeClass(object): _gridsize = 0.8 The leading underscore tells callers that they change the attribute at their own risk. An even more Pythonic approach is to write your class that makes no assumptions about gridsize, and thus explicitly supports any reaso

Re: [Q] How to ignore the first line of the text read from a file

2008-08-28 Thread Ken Starks
[EMAIL PROTECTED] wrote: Hello, I am new to Python and have one simple question to which I cannot find a satisfactory solution. I want to read text line-by-line from a text file, but want to ignore only the first line. I know how to do it in Java (Java has been my primary language for the last c

Re: [1,2,3] exactly same as [1,2,3,] ?

2008-08-29 Thread Ken Starks
[EMAIL PROTECTED] wrote: x=[1,2,3] and x=[1,2,3,] are exactly the same, right? I'm generating some python data, and it's less error prone to not treat the last element specially, but I want to be sure I'm generating an equivalent data structure. Many TIA! Mark >>> x=[1,2,3,] >>> repr(x) [1,2

Re: class definition syntax

2008-08-29 Thread Ken Starks
harryos wrote: hi i have seen some class definitions like class MyClass(object): def __init__(self): what does the object keyword inside the braces in MyClass() mean? Has it got any significance? thanks in advance harry It is a syntax used for 'new type' classes, not so new a

Re: How to check is something is a list or a dictionary or a string?

2008-08-30 Thread Ken Starks
George Sakkis wrote: On Aug 29, 12:16 pm, [EMAIL PROTECTED] wrote: Hi, How to check if something is a list or a dictionary or just a string? Eg: for item in self.__libVerDict.itervalues(): self.cbAnalysisLibVersion(END, item) where __libVerDict is a dictionary that holds values as

Re: How to check is something is a list or a dictionary or a string?

2008-08-30 Thread Ken Starks
, but completely reimplemented (currently mostly in Python). Also, binary files use bytes instead of strings. * The StringIO and cStringIO modules are gone. Instead, import io.StringIO or io.BytesIO. * '\U' and '\u' escapes in raw strings are not treated specially. On

Re: Writing to ms excel

2008-08-30 Thread Ken Starks
Marin Brkic wrote: Hello all, please, let me apologize in advance. English is not my first language (not even my second one), so excuse any errors with which I'm about to embarass myself in front of the general public. Second, I'm relatively new to python, so sorry if this seems like a stupid qu

Re: Writing to ms excel

2008-08-31 Thread Ken Starks
John Machin wrote: On Aug 31, 11:32 am, Marin Brkic <[EMAIL PROTECTED]> wrote: Is there a way to access google groups through a similiar interface program as a newsreader. I don't know (question has never arisen before). Never used them before, and getting a lot of messages to my email e

Re: Writing to ms excel

2008-08-31 Thread Ken Starks
o what to do with it. You can set up your Browser to open it is MS Excel (whichever one you have), Open Office, Gnumeric, or whatever. Most of them will cope with it perfectly, and will be able to save it locally in their most up-to-the-minute variation, if that is what you want. Cheers, Ken. -- ht

Re: max(), sum(), next()

2008-09-05 Thread Ken Starks
David C. Ullrich wrote: In article <[EMAIL PROTECTED]>, Mensanator <[EMAIL PROTECTED]> wrote: On Sep 3, 2:18 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: Empty Python lists [] don't know the type of the items it will contain, so this sounds strange: sum([]) 0 Becaus

Re: max(), sum(), next()

2008-09-05 Thread Ken Starks
David C. Ullrich wrote: I don't see why you feel the two should act the same. At least in mathematics, the sum of the elements of the empty set _is_ 0, while the maximum element of the empty set is undefined. And both for good reason: (i) If A and B are disjoint sets we certainly want to ha

Re: max(), sum(), next()

2008-09-05 Thread Ken Starks
David C. Ullrich wrote: In article <[EMAIL PROTECTED]>, Ken Starks <[EMAIL PROTECTED]> wrote: David C. Ullrich wrote: I don't see why you feel the two should act the same. At least in mathematics, the sum of the elements of the empty set _is_ 0, while the maximum element of

Re: max(), sum(), next()

2008-09-06 Thread Ken Starks
castironpi wrote: On Sep 5, 9:20 pm, "Manu Hack" <[EMAIL PROTECTED]> wrote: On Fri, Sep 5, 2008 at 1:04 PM, castironpi <[EMAIL PROTECTED]> wrote: On Sep 5, 3:28 am, "Manu Hack" <[EMAIL PROTECTED]> wrote: On Thu, Sep 4, 2008 at 4:25 PM, castironpi <[EMAIL PROTECTED]> wrote: On Sep 4, 2:42 pm,

Re: max(), sum(), next()

2008-09-06 Thread Ken Starks
castironpi wrote: On Sep 5, 9:20 pm, "Manu Hack" <[EMAIL PROTECTED]> wrote: On Fri, Sep 5, 2008 at 1:04 PM, castironpi <[EMAIL PROTECTED]> wrote: On Sep 5, 3:28 am, "Manu Hack" <[EMAIL PROTECTED]> wrote: On Thu, Sep 4, 2008 at 4:25 PM, castironpi <[EMAIL PROTECTED]> wrote: On Sep 4, 2:42 pm,

Newbie question...

2008-09-29 Thread Ken D'Ambrosio
4 0 0 7 7 5 1 6 9 1 8 8 4 - / + b u f f e r s / c a c h e : 2 9 1 0 5 2 2 2 4 9 4 0 Why are there spaces between everything? And how do I keep it from happening? *confused* Thanks much, -Ken ** Posted from http://ww

Re: Weirdness comparing strings

2008-09-30 Thread Ken Seehart
__cmp__ or __eq__. Trivial example of default comparison: >>> class C: ... pass ... >>> c = C() >>> d = C() >>> c==d False >>> c==c True See http://docs.python.org/ref/customization.html for more details. Ken Mr.SpOOn wrote

Advice for a replacement for plone.

2008-09-30 Thread Ken Seehart
tty good job at some of this, but I haven't found a good online wysiwyg editor for the page owner to modify content. Thanks for any ideas. Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question...

2008-09-30 Thread Ken Seehart
Ken D'Ambrosio wrote: First, apologies for such a newbie question; if there's a better forum (I've poked around, some) feel free to point it out to me. Anyway, a mere 25-odd years after first hearing about OOP, I've finally decided to go to it, by way of Python. But this

Re: Registration Code

2006-04-03 Thread Ken Seehart
your application. You may choose to include hardware serial numbers, for example. - 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

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

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

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

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: 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.

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: 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

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

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

Re: regex to match python string literal syntax

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

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

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

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.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

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

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.

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. --

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

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'

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 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: 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: 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

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

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

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

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: 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: 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: 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

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

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

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

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: 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

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-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-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: 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: 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: 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: 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

<    1   2   3   4