Re: calling a simple PyQt application more than once

2012-05-20 Thread Jonathan
Hello Jabba, Did you ever find a solution to the problem? If so, can you please post it? Thanks, Jonathan -- View this message in context: http://python.6.n6.nabble.com/calling-a-simple-PyQt-application-more-than-once-tp4335946p4975385.html Sent from the Python - python-list mailing list

Re: sudoku dictionary attack

2005-06-20 Thread Jonathan
[EMAIL PROTECTED] wrote: > Thought I'd offer a method for solving all possible 9x9 sudoku puzzles > in one go. It'll takes a bit of time to run however (and 9x9 seems to > be about as big as is reasonably possible before combinatorial > explosion completely scuppers this type of program)... > > B

Re: New user's initial thoughts / criticisms of Python

2013-11-09 Thread Jonathan
On Saturday, November 9, 2013 8:27:02 AM UTC-5, Joshua Landau wrote: > `select` is quite an odd statement, in that in most cases it's just a > weaker variant of `if`. By the time you're at the point where a > `select` is actually more readable you're also at the point where a > different control f

Getting ASCII encoding where unicode wanted under Py3k

2013-05-13 Thread Jonathan Hayward
27;' edit_table += '' if russian != None: edit_table += '''''' % locals() edit_table += '\n' edit_table += '' edit_table += '''''' % locals() edit_table += ''

New line conversion with Popen attached to a pty

2013-06-21 Thread Jonathan Harden
ne conversion would be incorrect, and what I could do to fix it? In fact if anyone even has any pointers to where this might be going wrong I'd be very helpful, I've done a lot of hours of fiddling with this and googling to no avail. Thanks, Jonathan #!/usr/bin/env python2.6.4 impo

Looking for a name for a deployment framework...

2013-06-24 Thread jonathan . slenders
e and supports introspection. It supports parallel deployments, and interactivity. And it has a nice commandline shell with autocompletion for traversing the deployment tree. The repository: https://github.com/jonathanslenders/python-deployer/tree/refactoring-a-lot-v2 Suggestions welcome :) Jon

Re: Looking for a name for a deployment framework...

2013-06-24 Thread jonathan . slenders
Thanks everyone, I'll think about it. The main reason is that I'm working on the documentation, and this a a good opportunity to think about the naming. python-deploy-framework or python-deployer could be too boring. -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a name for a deployment framework...

2013-06-25 Thread jonathan . slenders
Le mardi 25 juin 2013 06:38:44 UTC+2, Chris Rebert a écrit : > Er, Salt is likewise written in Python. You're right. Salt is also Python, excuse me, and it's very powerful as well. -- http://mail.python.org/mailman/listinfo/python-list

Re: Is Django v1.3 documentation the newest version?

2012-07-02 Thread Jonathan Harris
Hello It isn't Having been frustrated with out of date books, specifically the Apress published 'Definitive Guide To Django', I've downloaded the Kindle edition of Django 1.4 documentation It's a good tutorial J On Mon, Jul 2, 2012 at 11:00 AM, levi nie wrote: > Is Django v1.3 documentation t

Re: psphere: how to make thread safe

2012-08-26 Thread jonathan . kinred
On Wednesday, 22 August 2012 22:03:48 UTC+10, sajuptpm wrote: > Hi, > > > > psphere: Python interface for the VMware vSphere Web Services SDK > > > > I already developed an app using https://bitbucket.org/jkinred/psphere. But > getting lot of errors since psphere is not thread safe (I think

Re: psphere: how to make thread safe

2012-08-26 Thread jonathan . kinred
On Sunday, 26 August 2012 22:45:25 UTC+10, jonatha...@gmail.com wrote: > On Wednesday, 22 August 2012 22:03:48 UTC+10, sajuptpm wrote: > > > Hi, > > > > > > > > > > > > psphere: Python interface for the VMware vSphere Web Services SDK > > > > > > > > > > > > I already developed an

Re: Hiring Python Developer @ CA, USA

2012-09-18 Thread Jonathan Holloway
Incidentally and I know this is region specific, but what's the average salary approximately in the US/UK for a Senior Python programmer? ITJobsWatch in the UK says - http://www.itjobswatch.co.uk/jobs/uk/python.do Is that about right? Jon. On 18 September 2012 08:40, Paul Rudin wrote: > nithi

Re: Experimental Python-based shell

2012-10-03 Thread Jonathan Hayward
tion is a bit crude, but it is reasonably powerful. I have other things on the agenda, like making it able to run scripts and doing fuzzy matching, but for now those are the main two attractions. On Wed, Oct 3, 2012 at 8:52 AM, Amirouche Boubekki < amirouche.boube...@gmail.com> wrote: > H

Re: Experimental Python-based shell

2012-10-03 Thread Jonathan Hayward
12 at 11:25 AM, Amirouche Boubekki < amirouche.boube...@gmail.com> wrote: > > > 2012/10/3 Jonathan Hayward > >> The chief benefit besides the searching, so far, is that you can use Py3k >> mixed with shell commands as the scripting language--so script in Python >>

Re: Newby Python help needed with functions

2011-06-03 Thread Jonathan Gardner
dict.get(inp, None) That returned value is actually callable! That is, you can then do something like: fn("This is the input string") Of course, as you already know, you should test fn to see if it is None. If so, they typed in an option you don't recognize. Secondly

Re: Functional style programming in python: what will you talk about if you have an hour on this topic?

2011-07-14 Thread Jonathan Hartley
On Jul 13, 1:39 pm, Anthony Kong wrote: > (My post did not appear in the mailing list, so this is my second try. > Apology if it ends up posted twice) > > Hi, all, > > If you have read my previous posts to the group, you probably have some idea > why I asked this question. > > I am giving a few

Re: Functional style programming in python: what will you talk about if you have an hour on this topic?

2011-07-14 Thread Jonathan Hartley
On Jul 14, 4:32 am, Gregory Ewing wrote: > Anthony Kong wrote: > > So I have picked this topic for one of my presentation. It is because > > functional programming technique is one of my favorite in my bag  of python > > trick. > > I'm not sure it's a good idea to emphasise functional > programmi

Re: Can someone help please

2011-07-22 Thread Jonathan Hartley
Hey! Is Billy a responder, rather than the OP? Sorry then! My previous point is entirely nullified. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can someone help please

2011-07-22 Thread Jonathan Hartley
Hey Billy. That may not be the important part of the code, but the many people giving up their free time to read it and help you don't know that. It's probably most helpful to give them a working example so as not to waste their time. Just sayin for future, is all. :-) Best regards,

Writing a MUD Console

2011-07-22 Thread Jonathan Gardner
character's name. 1 Traceback (most recent call last): File "./telnetsubprocess.py", line 17, in cmd = raw_input() EOFError Connection closed by foreign host. Any ideas on what is going on here? -- Jonathan Gardner jgard...@jonathangardner.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing a MUD Console

2011-07-22 Thread Jonathan Gardner
whirl! > That code is surprisingly simple. Let me write one that uses asyncore so that the looping can incorporate other async processes as well. -- Jonathan Gardner jgard...@jonathangardner.net -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP for module naming conventions

2011-03-17 Thread Jonathan Gossage
I have found this approach problematic if you have packages separately developed and maintained in different directory trees, resulting in more than one PYTHONPATH entry with the same root metapackage name. What happens is that only the first entry in the PYTHONPATH containing the metapackage name

Re: Validating Command Line Options

2011-03-23 Thread Jonathan Gossage
See inline comments On Wed, Mar 23, 2011 at 2:13 PM, Alex Willmer wrote: > On Mar 23, 3:20 pm, T wrote: > > Thanks! argparse is definitely what I need..unfortunately I'm running > > 2.6 now, so I'll need to upgrade to 2.7 and hope that none of my other > > scripts break. > > Argparse was a thi

Re: Vectors

2011-04-25 Thread Jonathan Hartley
On Apr 20, 2:43 pm, Andreas Tawn wrote: > > Algis Kabaila writes: > > > > Are there any modules for vector algebra (three dimensional > > > vectors, vector addition, subtraction, multiplication [scalar > > > and vector]. Could you give me a reference to such module? > > > NumPy has array (and mat

Re: Development tools and practices for Pythonistas

2011-05-06 Thread Jonathan Hartley
.net/docs/pph/ Also, where I work we have tried many IDEs, but happily and productively use GVim and very little else, so don't feel you *have* to use an IDE. Best regards, Jonathan Hartley -- http://mail.python.org/mailman/listinfo/python-list

lightweight way to create new projects from templates

2011-05-11 Thread Jonathan Hartley
ample, G{author} will be replaced with the value for 'author' supplied either on the command-line: $ genesis myproj author=Jonathan Or in your ~/.genesis/config file (a python file read using 'exec'): author = 'Jonathan' * The default template should embody go

Re: lightweight way to create new projects from templates

2011-05-12 Thread Jonathan Hartley
Hey Chris, Thanks for the thoughts. I must confess I had already given up on a 'single file' approach, because I want to make it easy for people to create their own templates, so I have to handle copying a template defined by creating a new directory full of diles. If I'm already handling this

Re: Lies in education [was Re: The "loop and a half"]

2017-10-11 Thread Jonathan Cast
C is the same as its declaration, but with the variable name deleted. So: char (*(*[3])())[5] That is, an array of 3 pointers to functions that return pointers to arrays of 5 characters. Jonathan -- https://mail.python.org/mailman/listinfo/python-list

Seeking deeper understanding of python equality (==)

2022-05-06 Thread Jonathan Kaczynski
ot@919d94c98191:/# apt-get --yes install python3 root@919d94c98191:/# cat >play.py <play.py < //play.py(5)() -> x == y (Pdb) s --Call-- > /usr/lib/python3.10/uuid.py(239)__eq__() -> def __eq__(self, other): Thank you, Jonathan -- https://mail.python.org/mailman/listinfo/python-list

Re: Seeking deeper understanding of python equality (==)

2022-05-13 Thread Jonathan Kaczynski
d on the left operand. If that method > doesn't exist or returns NotImplemented, it then looks for a dunder > method on the right operand. reads like the contents of the do_richcompare function. What I think I'm missing is how do the dunder methods relate to the tp_richcompare functio

Re: Seeking deeper understanding of python equality (==)

2022-05-14 Thread Jonathan Kaczynski
I'm still wondering how Py_TYPE(v)->tp_richcompare resolves to __eq__ on a user-defined class. Conversely, my understanding is, for a type defined in cpython, like str, there is usually an explicitly defined tp_richcompare function. Thank you, Jonathan On Fri, May 13, 2022 at 8:23 PM

Re: Seeking deeper understanding of python equality (==)

2022-05-17 Thread Jonathan Kaczynski
I have a great idea of what's going on, now. I appreciate you all. My goal now is to be able to work with the debugger, like Erik is, so that next time I am able to perform this investigation in-full. Should I create a new thread for this question? Thank you, Jonathan On Sat, May 14, 2022

Persistent Error: Python was not found

2022-08-14 Thread Jonathan Owah
Good day, Great job on making Python easily accessible. I'm using a Windows 10, 64gb HP EliteBook. I've been trying to configure my laptop to run python scripts. This is the error I keep getting: Python was not found; run without arguments to install from the Microsoft Store, or disable this sho

Re: Persistent Error: Python was not found

2022-08-15 Thread Jonathan Owah
and didn't work because the tutorial was done on a MacBook, while I'm using a Windows device. Thanks for your help, Regards On Mon, Aug 15, 2022 at 8:14 AM Eryk Sun wrote: > On 8/13/22, Jonathan Owah wrote: > > > > I've been trying to configure my laptop to run

OT: Accessibility: Jana Schroeder's Holman Prize Application

2021-05-10 Thread Jonathan Fine
//tinyurl.com/blindcodersurvey Finally, The Holman Prize: https://holman.lighthouse-sf.org/ best regards Jonathan -- https://mail.python.org/mailman/listinfo/python-list

Using PIP in Python 3.10 on Windows 10

2022-01-14 Thread Jonathan Gossage
thon installed at c:\Program Files\Python3.10 whereas it has actually been installed at D:\Users\jgoss\AppData\local\python\python3.10. It seems that the launcher has not been updated to the latest installation location for python and that it also needs to handle a non-default install location. The

Re: Why not allow empty code blocks?

2016-07-24 Thread Jonathan Hayward
about: > > Use syntax highlighting, use a smart editor, use a version control system, > use a linter, use 'tabnanny', use tool X, Y or Z to get around the > problems, use obscure language options.. > > The thing is, if everyone does depend more on such tools, then it reall

Boolean comparison & PEP8

2019-07-28 Thread Jonathan Moules
Hi List, Lets say I want to know if the value of `x` is bool(True). My preferred way to do it is: if x is True:     pass Because this tests both the value and the type. But this appears to be explicitly called out as being "Worse" in PEP8: """ Don't compare boolean values to True or False usin

Re: Python/SQLite best practices

2019-08-05 Thread Jonathan Moules
Some gotcha tips from using SQLite with Python that I've encountered. You may already know some/all of these: * SQLite doesn't have a "Truncate" function - simply delete the file if possible for larger datasets. * Explicitly committing is good because the default python sqlite3 library does it

Re: Python/SQLite best practices

2019-08-06 Thread Jonathan Moules
* To be reliably INSERTed Byte data should be first converted to sqlite3.Binary(my_data) explicitly Interesting. Is that Python 2 specific, or also in Python 3. Because the latter would surprise me (not saying it isn't the case). Only tried on Python 3. I'm inserting raw byte versions of web

Re: [Python-Dev] [RELEASE] Python 3.7.7rc1 is now available for testing

2020-03-04 Thread Jonathan Goble
On Wed, Mar 4, 2020 at 1:02 PM Ned Deily wrote: > Details here: > > > https://discuss.python.org/t/python-3-7-7rc1-is-now-available-for-testing/3638 "Assuming no critical problems are found prior to *2020-02-10*..." I would like to know how you expect people to travel back in time to report pr

Asynchronous generators

2020-06-23 Thread Jonathan Gossage
-- I am attempting to learn how to use asyncio and I have been unable to find any documentation or Internet posts that give information on the principles underlying asyncio, let alone any examples showing how asynchronous generators should be used. I have built a toy program to test trying to read

Function type in typing

2020-07-08 Thread Jonathan Gossage
. -- Jonathan Gossage -- https://mail.python.org/mailman/listinfo/python-list

Typing modules

2020-07-20 Thread Jonathan Gossage
I have the following code and I would like to type the variable *contents*: contents: something = importlib._import_module(name) I have been unable to find out what *something* should be. -- Jonathan Gossage -- https://mail.python.org/mailman/listinfo/python-list

Re: how to keep collection of existing instances and return one on instantiation

2005-10-05 Thread Jonathan LaCour
7;s no self... > > Oops, you forgot to return object.__new__(cls, x) in the case the object isn't in the cache. That should fix it. Jonathan http://cleverdevil.org -- http://mail.python.org/mailman/listinfo/python-list

C replacement for Queue module

2005-10-21 Thread Jonathan Ellis
twice as fast? 5x as fast? thanks, -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: C replacement for Queue module

2005-10-21 Thread Jonathan Ellis
[EMAIL PROTECTED] wrote: > does collections.deque have a blocking popleft()? If not, it's not very > suitable to replace Queue.Queue. It does not. -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get started in GUI Programming?

2005-11-26 Thread Jonathan Gardner
I would argue with your assertion that either TKinter of PyGTK are the best. There are several other good alternatives, including wxPython and PyQt, which are very comparable, if not better. I would strongly suggest starting with PyQt. It's my personal favorite. I wrote a short tutorial on the Pyt

Re: How can I do this in Python?

2005-11-27 Thread Jonathan Gardner
I don't know what engine you are using. Basically all you have to do is render the login form at the url of the page that needs the login. You're going to have to hook in the authentication code before you render the page normally. For instance, this is a common way I've been doing it in various en

What could 'f(this:that=other):' mean?

2005-01-05 Thread Jonathan Fine
> # etc So to write this using the suggested syntax one has: > def return_dict(data:dict=None): > # oops! So now some final comments. 1. I have no opinion yet about optional static typing. 2. Calls of function f() should outnumber definitions of f(). (I'm not totall

Re: What could 'f(this:that=other):' mean?

2005-01-05 Thread Jonathan Fine
Jeff Shannon wrote: Jonathan Fine wrote: Giudo has suggested adding optional static typing to Python. (I hope suggested is the correct word.) http://www.artima.com/weblogs/viewpost.jsp?thread=85551 An example of the syntax he proposes is: > def f(this:that=other): > print this I&#

Re: HTML purifier using BeautifulSoup?

2005-01-07 Thread Jonathan Clark
Dan Stromberg wrote: > Has anyone tried to construct an HTML janitor script using BeautifulSoup? > > My situation: > > I'm trying to convert a series of web pages from .html to palmdoc format, > using plucker, which is written in python. The plucker project suggests > passing html through "tidy",

Re: What could 'f(this:that=other):' mean?

2005-01-07 Thread Jonathan Fine
Jonathan Fine wrote: I'll post some usage examples later today, I hope. Well, here are some examples. A day later, I'm afraid. ** Pipelines and other composites This is arising for me at work. I produce Postscript by running TeX on a document. And then running dvips on the output of T

Re: What could 'f(this:that=other):' mean?

2005-01-07 Thread Jonathan Fine
Jeff Shannon wrote: Jonathan Fine wrote: The use of *args and **kwargs allows functions to take a variable number of arguments. The addition of ***nsargs does not add significantly. I've posted usage examples elsewhere in this thread. I think they show that ***nsargs do provide a benefi

Re: What could 'f(this:that=other):' mean?

2005-01-11 Thread Jonathan Fine
ot, at this time, wishing to promote my suggestion. If I were, I would be well advised to find usage cases. Rather, I simply wish to point out that the f(this:that=other) syntax may have uses, other than optional static typing. And this I've done. So for me the thread is closed. Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: how to write a tutorial

2005-01-24 Thread Jonathan Burd
Xah Lee wrote: adding to my previosu comment... *plonk* -- "Women should come with documentation." - Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to do a series of regexp checks with groups

2005-01-24 Thread Jonathan Fine
__name__ == '__main__': doit('add this that') doit('times this that') === Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: gnuplot on Canvas widget

2005-01-27 Thread Jonathan Ellis
widget with an > image in it? Thanks. >From my experience, the Gnuplot module isn't designed to be used in "headless" mode -- it can save to the usual formats, but you have to render everything in an x11 window interactively first. It might not be hard to modify t

Converting TeX tokens into characters

2005-06-28 Thread Jonathan Fine
humans, it should also have a line length limit. Does anyone know of such a writer? Or something close? Or any projects that could use such a writer? -- Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: pexpect question....

2005-07-04 Thread Jonathan Ellis
ie nicely instead of trying to find better ways kill it. -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: threads and sleep?

2005-07-05 Thread Jonathan Ellis
ultiple processes is an acceptable workaround; if not, good luck with the rewrite in Java or something else with real thread support. (IIRC Jython doesn't have a GIL; that might be an option too.) Python is a great tool but if you really need good threading support you will have to look elsewhere. -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: threads and sleep?

2005-07-05 Thread Jonathan Ellis
Unless you're doing anything that would require distributed locking. Many if not most such projects do, which is why almost everyone prefers to use threads on an SMP machine instead of splitting it across multiple smaller boxes. -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: threads and sleep?

2005-07-06 Thread Jonathan Ellis
Peter Hansen wrote: > Jonathan Ellis wrote: > > Peter Hansen wrote: > >>Or investigate the use of Irmen's Pyro package and how it could let you > >>almost transparently move your code to a *multi-process* architecture > > > > Unless you're doin

Re: calling python procedures from tcl using tclpython

2005-07-09 Thread Jonathan Ellis
ed to use exec instead of eval. Eval works with expressions; for statements you need exec. I blogged a brief example of tclpython over here: http://spyced.blogspot.com/2005/06/tale-of-wiki-diff-implementation.html -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Yet Another Python Web Programming Question

2005-07-09 Thread Jonathan Ellis
nion that > web programming should feel no different from desktop programming. If you're coming from a PHP background, you'll find Spyce's learning curve even shallower. http://spyce.sourceforge.net -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading variables from a forked child (Python C/API)

2005-07-15 Thread Jonathan Conrad
#ifdef def Donn Cave wrote: > Quoth MrEntropy <[EMAIL PROTECTED]>: > > | I'm having a little trouble getting an idea running. I am writing a C > | program which is really a frontend to a Python program. Now, my C > | program starts up, does some initialisation like initialisation of it's >

Re: What module to use to get a file from a website?

2005-07-16 Thread Jonathan Conrad
from os import system system ("start http://www.python.org/";) -- http://mail.python.org/mailman/listinfo/python-list

ANN: Spyce 2.0.3

2005-07-22 Thread Jonathan Ellis
Demos and downloads are available at http://spyce.sourceforge.net/. Changelog is at http://svn-hosting.com/svn/spyce/trunk/spyce/CHANGES. Jonathan Ellis http://spyced.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

datagram queue length

2005-08-10 Thread Jonathan Ellis
his magic 64 number comes from, so I can increase it? Illustration follows. -Jonathan # # start this, then immediately start the other # _on another machine_ import socket, time sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.bind(('', 3001)) time.sleep(5) while True:

Re: Django Vs Rails

2005-09-15 Thread Jonathan Ellis
://skunkweb.sourceforge.net/pydo2.html) is a Python ORM tool that does this well (*cough* better than sqlobject *cough*). -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Re: web scrapping - POST and auto-login

2005-09-19 Thread Jonathan Ellis
author. This will be _much_ easier than doing it by hand. -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Unable to run IDLE Under Windows

2005-02-06 Thread Jonathan Polley
lassName="Idle") File "c:\python20\lib\lib-tk\Tkinter.py", line 1482, in __init__ self.tk = _tkinter.create(screenName, baseName, className) TclError: unknown color name "white " C:\Python20\Tools\idle> Thanks in advance, Jonathan Polley jwpolley rockwel

Re: Unable to run IDLE Under Windows

2005-02-07 Thread Jonathan Polley
is string comes > from some per-user configuration that may well explain your problem. > > Ciao, MM Where do I have to go in order to fix it? It follows them from computer to computer... Thanks, Jonathan Polley -- http://mail.python.org/mailman/listinfo/python-list

Non-blocking input on windows, like select in Unix

2005-03-01 Thread Jonathan Fine
he process of reading what might be a prompt string. This will of course increase performance in the limiting case of when there are zero prompt strings, and expensive system calls. This problem of non-blocking input on Windows seems to arise often. I hope my remarks might be helpful to others.

Re: Non-blocking input on windows, like select in Unix

2005-03-01 Thread Jonathan Fine
Paul Rubin wrote: Jonathan Fine <[EMAIL PROTECTED]> writes: My question is this: Under Windows, is it possible to read as many bytes as are available from stdout, without blocking? I think Windows implements non-blocking i/o calls. However the traditional (to some) Python or Java appro

Re: Non-blocking input on windows, like select in Unix

2005-03-02 Thread Jonathan Fine
fraca7 wrote: Jonathan Fine a écrit : Paul Rubin wrote: As I recall, some posts to this list say that Windows provides non-blocking i/o for sockets but not for files. No, Windows does provide non-blocking I/O for regular files, but it's a completely different mechanism than the one us

Re: how to handle repetitive regexp match checks

2005-03-18 Thread Jonathan Giddy
GiddyJP wrote: # do this once import Trespass pattern = Trespass.Pattern() pattern.addRegExp(r'struct {', 1) pattern.addRegExp(r'typedef struct {', 2) pattern.addRegExp(r'something else', 3) Minor correction... in this module { always needs to be escaped if not indicating a

Re: cookie lib policy how-tp?

2004-12-07 Thread Jonathan Ellis
ep should be to identify yourself as IE. opener = urllib2.build_opener(...) opener.addheaders = [("User-Agent", "whatever IE calls itself these days")] -Jonathan -- http://mail.python.org/mailman/listinfo/python-list

Simple Python + Tk text editor

2005-04-13 Thread Jonathan Fine
Hi I'm looking for a simple Python + Tk text editor. I want it as a building block/starting point. I need basic functions only: open a file, save a file, new file etc. It has to be open source. Anyone know of a candidate? -- Jonathan http://qatex.sourceforge.org -- http://mail.python.org/ma

Re: Simple Python + Tk text editor

2005-04-13 Thread Jonathan Fine
Paul Rubin wrote: Jonathan Fine <[EMAIL PROTECTED]> writes: I'm looking for a simple Python + Tk text editor. I want it as a building block/starting point. Something wrong with IDLE? Thanks for this suggestion. For some reason, I did not think of IDLE as an editor. Must have been a

Re: Simple Python + Tk text editor

2005-04-14 Thread Jonathan Fine
l in simple contexts. So what I'm really wanting to do is provide a component for projects such as e:doc. Any, this might be a bit off-topic. And thanks again for the link. -- Jonathan http://qatex.sourceforge.net -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with unpack hex to decimal

2005-04-17 Thread Jonathan Brady
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > > I was looking at this: > http://docs.python.org/lib/module-struct.html > and tried the following > import struct struct.calcsize('h') > 2 struct.calcsize('b') > 1 struct.calcsize('bh') > 4 > > I would hav

1993 Van Rossum Python Web Robot

2005-04-19 Thread Jonathan Vance
I am looking for a python robot that Van Rossum released with python 0.9.8. It may have been the first web robot (see http://www.webhistory.org/www.lists/www-talk.1993q1/0060.html). I've had no luck finding the code for the robot or the 0.9.8 tarball. Can anyone help me out? Thanks. -- http://

New user group: Rochester, MN, USA

2016-01-20 Thread Jonathan Hartley
http://www.meetup.com/PyRochesterMN First meeting planned for Thu 28th January 2016 -- Jonathan Hartley tart...@tartley.com +1 507-513-1101 -- https://mail.python.org/mailman/listinfo/python-list

Confirm: About python Registration

2016-03-04 Thread Jonathan Qin
Dear Manager, (Please forward this to your CEO, because this is urgent. Thanks!) This is Jonathan Qin---the manager of domain name registration and solution center in China. On February 29th, 2016, we received an application from Baiyao Holdings Ltd requested “python” as their internet keyword

Python implementations in JavaScript

2015-02-14 Thread Jonathan Hayward
What is the relative maturity of different Python implementations in JavaScript? Are any of the implementations ready to rely on? -- [image: Christos Jonathan Seth Hayward] <http://jonathanscorner.com/> Jonathan S. Hayward, a full stack web developer with Python/Django and AngularJS/

Re: Python implementations in JavaScript

2015-02-16 Thread Jonathan Hayward
@all, thanks. I think I have Brython to try out first and others to maybe fall back on, which is the kind of information I wanted. Thanks, On Mon, Feb 16, 2015 at 3:59 PM, Jonathan Hayward < jonathan.hayw...@pobox.com> wrote: > @all, thanks. I think I have Brython to try out first a

Re: Examples of modern GUI python programms

2014-03-31 Thread Jonathan Harden
On 31 Mar 2014 00:21, "D. Xenakis" wrote: > ... Snip ... > What i need is to develop an android looking program (entirelly in python) for windows, but dunno if this is possible (most propably is), and which tool between those would help me most: tkinter - wxpython - pyqt - pygtk . > > Any exampl

Aide pour bien démarrer en Python

2013-09-27 Thread jonathan . corriveau
Je sais qu'il y a plein d'information à lire un peu partout, mais j'ai vraiment du mal à voir pourquoi Python est si fantastique... Je m'explique Pour moi python c'est un langage de script très cryptique avec des noms de méthodes courts, pas claire, dans une identation pas toujours facile à

Why is array.array('u') deprecated?

2015-05-08 Thread jonathan . slenders
Why is array.array('u') deprecated? Will we get an alternative for a character array or mutable unicode string? Thanks! Jonathan -- https://mail.python.org/mailman/listinfo/python-list

Re: Why is array.array('u') deprecated?

2015-05-08 Thread jonathan . slenders
Le vendredi 8 mai 2015 12:29:15 UTC+2, Steven D'Aprano a écrit : > On Fri, 8 May 2015 07:14 pm, jonathan.slenders wrote: > > > Why is array.array('u') deprecated? > > > > Will we get an alternative for a character array or mutable unicode > > string? > > > Good question. > > Of the three main

Re: Why is array.array('u') deprecated?

2015-05-08 Thread jonathan . slenders
> Can you expand a bit on how array("u") helps here? Are the matches in the > gigabyte range? I have a string of unicode characters, e.g.: data = array.array('u', u'x' * 10) Then I need to change some data in the middle of this string, for instance: data[50] = 'y' Then I want to u

Re: Why is array.array('u') deprecated?

2015-05-08 Thread jonathan . slenders
, match=b'y'> > >>> data[101] = "z" > >>> re.search(b"y", data) > <_sre.SRE_Match object; span=(400, 401), match=b'y'> > >>> re.search(b"yz", data) > >>> re.search(b"y\0\0\0z", data) > <_sre.SRE_Match object; span=(400, 405), match=b'y\x00\x00\x00z'> > > but if that is good enough you can use a bytearray in the first place. Maybe I'll try that. Thanks for the suggestions! Jonathan -- https://mail.python.org/mailman/listinfo/python-list

How do I check if a string is a prefix of any possible other string that matches a given regex.

2014-10-07 Thread jonathan . slenders
n regex describes, and if at some point all the input characters are consumed, it's a match. (We don't have to run the regex until the end.) But I cannot find any library that does it... Thanks a lot, if anyone knows the answer to this question! Cheers, Jonathan -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I check if a string is a prefix of any possible other string that matches a given regex.

2014-10-07 Thread jonathan . slenders
> > Logically, I'd think it should be possible by running the input string > > against the state machine that the given regex describes, and if at some > > point all the input characters are consumed, it's a match. (We don't have > > to run the regex until the end.) But I cannot find any librar

Re: How do I check if a string is a prefix of any possible other string that matches a given regex.

2014-10-08 Thread jonathan . slenders
Le mercredi 8 octobre 2014 01:40:11 UTC+2, MRAB a écrit : > If you're not interested in generating an actual regex, but only in > > matching the prefix, then it sounds like you want "partial matching". > > > > The regex module supports that: > > > > https://pypi.python.org/pypi/regex Wow, t

Re: How to structure packages

2011-09-08 Thread Jonathan Hartley
On Thursday, September 8, 2011 1:29:26 AM UTC+1, Steven D'Aprano wrote: > Steven D'Aprano wrote: > > Other than that, is there any justification > for this rule? Any Java fans want to defend this? > > If "one class per file", why not "one method per class" too? Why is the > second rule any more si

Re: cause __init__ to return a different class?

2011-09-15 Thread Jonathan Hartley
Perhaps a more idiomatic way of achieving the same thing is to use a factory function, which returns instances of different classes: def PersonFactory(foo): if foo: return Person() else: return Child() Apologies if the code is messed up, I'm posting from Google g

Re: executing arbitrary statements

2011-10-02 Thread Jonathan Hartley
On Saturday, October 1, 2011 8:06:43 AM UTC+1, Chris Rebert wrote: > On Fri, Sep 30, 2011 at 11:31 PM, Jason Swails wrote: > > I'm probably missing something pretty obvious, but I was wondering if there > > was a way of executing an arbitrary line of code somehow (such as a line of > > code based

Re: executing arbitrary statements

2011-10-03 Thread Jonathan Hartley
Fair points Steven. Thanks for further refining my initial refinement. :-) -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   >