indows terminal software, to talk to COM3,
to keep the port artificially busy for the purposes
of testing.
If things were working well in your case, you *might*
see something of this form. If not, you'd instead
see the name of the process that has "stolen" the
com port.
virtualbox.exe pid: 1234 ComputerName\UserID
E0: File (---) \Device\VCP0
HTH,
Paul
--
http://mail.python.org/mailman/listinfo/python-list
Adam wrote:
"Paul" wrote in message
news:jseu9c$sp3$1...@dont-email.me...
Adam wrote:
"John Nagle" wrote in message
news:jse604$1cq$1...@dont-email.me...
On 6/26/2012 9:12 PM, Adam wrote:
Host OS:Ubuntu 10.04 LTS
Guest OS:Windows XP Pro SP3
I am able to
panel for the driver, that maps a virtual COM port,
to a COM port number, like COM3 and COM4 in this case.
Paul
--
http://mail.python.org/mailman/listinfo/python-list
Hello. I converted doctests into DocTestSuite() to use with unittest. And try
it under Python 3.
And, sure, I get errors with unmatched exceptions details (mismatched name of
exception class: a.b.c.MyError instead of MyError). So, I have 2 questions:
1) how to turn on option IGNORE_EXCEPTION_DE
class FontSpec:
"""Wrapper for something like 'Arial 10 bold #red'
"""
tkf = None # Tk Font
spec = "" # specification
tkspec = "" # specification for Tk
family = None
size = 0
color = "black"
weight = "normal"
slant = "roman"
underline = 0
overstrike
have a nice day! :)
>
> Basti
>
> signature.asc
> < 1KViewDownload
Hi,
If you are trying to digitize data from the graph, you could try
Dagra: http://www.BlueLeafSoftware.com/Products/Dagra/
There is a Python library for reading the files it produces.
hth
paul
--
http://mail.python.org/mailman/listinfo/python-list
from random import randint
rolls = [randint(1, 6) for x in range(50)]
print("Average: %s" % (sum(rolls) / len(rolls)))
print("Most Common: %s" % max(rolls, key=rolls.count))
--
https://mail.python.org/mailman/listinfo/python-list
incorrect results (which could be hard to spot as being
incorrect) is much more dangerous. Also, checking that the list is in
ascending order need only be done once, and seems like it would be
inexpensive.
Thanks,
Paul
--
https://mail.python.org/mailman/listinfo/python-list
n 400 times.
If verification was added, then the the code would do an O(n log n)
operation 400 times, plus an O(n) operation done *one* time. So, I'm not
sure that this would be a significant efficiency hit (except in rare cases).
2) Paul Moore wrote:
> So the people who *really* need cum_weigh
forgot to edit the subject. Sorry.
paul c.
On Mon, May 14, 2018 at 12:02 PM, Paul wrote:
> Hello all,
>Thanks for the thoughtful (and non-snarky) replies.
>
> First, a suggestion for a documentation change:
>
> To this paragraph:
>
> *If neither weights nor c
Top posting saves a huge amount of useless scrolling time. Is it frowned
upon on this list?
On Thu, May 17, 2018, 7:26 AM Tobiah wrote:
> Top posting is awesome for the reader plowing through
> a thread in order. In that case the cruft at the bottom
> is only for occasional reference.
>
> Ok,
wrote:
> > Is it frowned
> > upon on this list?
>
> Trimming your replies saves even more. Yes, it is.
>
> ChrisA
> -
>
kk.
Thanks
Paul
>
>
--
https://mail.python.org/mailman/listinfo/python-list
e insisted
on, bottom posting. If someone's late to a thread they can read from it
the bottom up. But, for everyone who has been keeping up, not having to
scroll is a big advantage.
I'm not suggesting that the convention on this list be changed, but it's
by no means the only opti
>
>
> This works for me: mytuplestring.replace("0","")
>
> Your regex will also eliminate non-leading zeros.
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, May 20, 2018, 5:53 PM Paul wrote:
> This works for me: mytuplestring.replace("0","")
>
>>
>>> Your regex will also eliminate non-leading zeros.
>>
>>
> If you Google
>
> regex tester
>
> you will find several useful sit
Thomas Jollans wrote:
> On 2018-05-20 23:54, Paul wrote:
> > you will find several useful sites where you can test regexes.
>
> What's the benefit of those compared to simply trying out the regex in a
> Python console?
>
Possibly nothing. But there are obvious bene
How would one make a multi-dimensional list now, with truly-separate sub
lists? Is there just no way to do it with the replication operator? IE,
would I just have to do
X = [[], [], [], [], []]
or perhaps write a function to insert new sub lists into a list, or...?
Thanks
> Pau
how often would people here have needed this new operator, if it had
existed?
--
https://mail.python.org/mailman/listinfo/python-list
ge' specifications is required. I.E., I can specify
'range' outside body, or 'range' as part of body, or both, but I must have
'range' someplace. This is a bit confusing to me ( as opposed to my usual
understanding of "required"). Also, w
oops, please ignore the bit before "update(spreadsheetId=*, range=*, ..."
On Sun, May 27, 2018 at 9:17 PM, Paul wrote:
> hi,
>I'm using the Google Sheets API (the client library rather than the
> RESTful interface) and I'm confused about the meaning of the syn
I see it on the mailing list.
Paul C
On Wed, May 30, 2018, 10:07 AM Rob Gaddi
wrote:
> On 05/30/2018 09:34 AM, Paul Rubin wrote:
> > I think Usenet posts are no longer getting forwarded to the mailing
> > list, but now I wonder if this is getting out at all, even to usenet.
>
In the US, at least, spaces should sort before letters.
MRAB brought up an important point. It depends on your purpose, of course,
but having all the capitalized-beginning items appear separately from all
of the lower-cased-beginning items can be very annoying to a user.
--
https://mail.python.or
guess? E.G., what if I attach a malicious
file labeled as .asc?
[Peter, I am not suggesting anything about you! ;). ]
Paul C.
--
https://mail.python.org/mailman/listinfo/python-list
ps://github.com/Abdur-rahmaanJ
>
> On Fri, 1 Jun 2018, 01:49 Paul, wrote:
>
>> I have heard that attachments to messages are not allowed on this list,
>> which makes sense. However I notice that messages from Peter do have an
>> attachment, i.e., a signature.asc fi
er away from the
tenuous connection it has with Python, related discussions on type
safety, private/protected/public, using Python in Mozilla, and the
disappearance of the Bastion module notwithstanding.
Paul
--
http://mail.python.org/mailman/listinfo/python-list
http://wiki.python.org/moin/SummerOfCode
And I hope that the latter project is reviewing some of the other work,
if only to avoid the "framework proliferation" that people keep
complaining about.
Paul
--
http://mail.python.org/mailman/listinfo/python-list
untested, ugly, but something like this would sort all the files in the
directory on os.path.getctime (not using os.walk() though). I'm sure
there is probably better ways to do it :)
filelist = []
def walkdir(currdir):
for files in os.listdir(currdir):
path = os.path.join(currdir, fil
Another option is to implement the needed python code in COM server and
call that from C#. A simple example of python COM server can be seen
about halfway down the page here
http://www.oreilly.com/catalog/pythonwin32/chapter/ch12.html
--
http://mail.python.org/mailman/listinfo/python-list
or my purposes.
It would be great if people can use this as a starting point to develop
further features. I'd also be very interested in feedback about whether
the code does the right sequence of calls to start a daemon.
Best wishes,
Paul
--
http://mail.python.org/mailman/listinfo/python-list
mments?
How long should I hope this sort will take? It will sound weird, but I
actually have 12 different key maps and I want to sort this with
respect to each map, so I will have to sort 12 times.
Paul
--
http://mail.python.org/mailman/listinfo/python-list
I really do need to sort. It is complicated and I haven't said why, but
it will help in finding similar keys later on. Sorry I can't be more
precise, this has to do with my research.
Your two other suggestions with itertools and operator are more useful,
but I was mostly wondering about performanc
I really do need to sort. It is complicated and I haven't said why, but
it will help in finding similar keys later on. Sorry I can't be more
precise, this has to do with my research.
Your two other suggestions with itertools and operator are more useful,
but I was mostly wondering about performanc
The reason I am not telling you much about the data is not because I am
afraid anyone would steal my ideas, or because I have a non-disclosure
agreement or that I don't want to end up pumping gas.
It is just that it is pretty freaking damn hard to even explain what is
going on. Probably a bit harde
Thanks! I definitely didn't want to go into any elaborate programming
for this, and the Unix sort is perfect for this.
It sorted a tenth of my data in about 8 min, which is entirely
satisfactory to me (assuming it will take ~ 20 times more to do the
whole thing).
Your answer greatly helped!
Hello,
I am trying to make up a catalogue of my books.
I found tools on isbntools.com in python. YAY i thought.
Something happens! But I cant seem to get the part to download the books
information from amazon.com working correctly. It connects, but I think the
regular expressions used in the co
should cough out the same info, as you entered in
the first place. That was one of my test cases,
when porting the code maybe 30 years ago. (And
no, I didn't keep a copy of the code. We didn't
do stuff like that back then. I didn't even have
a computer at home back then.)
Paul
--
https://mail.python.org/mailman/listinfo/python-list
I'm wondering what the best solution for this problem is.
I've got a wxpython app, in one part a user makes some selections then opens a
dialog to select where to output. At which point the app starts a thread
processing their selection while they're choosing an output location, hopefully
ready
Tim Golden timgolden.me.uk> writes:
>
> On 07/10/2011 09:29, Paul wrote:
> > I'm wondering what the best solution for this problem is.
> >
> > I've got a wxpython app, in one part a user makes some selections then
> > opens
a
> > dialog to sele
Basically there can be quite a big job to do based on the user selection and
I've pipelined it so after the user selects the output location the next job
can
get started so long as the first job (preparing the data) has been running for
5
or so seconds roughly. Its just a lot nicer to have this
Tim Golden timgolden.me.uk> writes:
>
> On 07/10/2011 11:15, Paul wrote:
> > My first thought was to use a flag but wouldn't the new thread see the
cancel
> > flag and stop as well? I could set it back but then any other threads might
have
> > been busy and n
r.write('new rss_ticker(%s, %s, %s)\n' % (rsspath, titleintro,
tickeropt))
scripter.write('\n')
return scripter.getvalue()
I'm still curious what all this StringIO stuff is for ;)
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
l name 'self' is not defined
> Script terminated.
This has nothing to do with wx, you just don't use "self" if you're
_calling_ a method. So:
def create_grid():
win = Grid_MegaExample.MegaTable(data, colnames, pugins)
win.Show(True)
should get you to the ne
','.join("?"*len(vals))+")"
>>> print sql
'select * from table where value in (?,?,?,?,?)'
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
ition allows this, you better do so or you'll get fired.
Use chalk so you can wipe it off the case if your boss changes his/her
mind. Disclaimer: I haven't tested this and the DC might get unstable or
crash...
scnr
Paul
--
http://mail.python.org/mailman/listinfo/python-list
block ?-)
>
The error will remain unnoticed and the argument might survive another
few function calls but eventually fails deep down somewhere with:
TypeError: cannot concatenate 'str' and 'list' objects
then you have to examine the traceback and hope the real error
Andrew schrieb:
> Hello Everyone
[snipped stuff]
Sorry not being helpful, but I suggest you post a minimal sample of your
code demonstrating your program.
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
rg/pipermail/python-ideas/2007-May/000807.html
>
> In the thread, I don't really make a proposal, so much
> as a problem statement, but my radical idea is that
> lists of dictionaries fit the relational model
> perfectly, so why not allow some kind of native SQL
>
27;d
need e.g. mod_proxy + CherryPy on a high port as a long running process.
That's just not possible in most shared hosting envs, plus you'd have to
monitor cherrypy and whatnot.
Don't get me wrong, I'm not defending PHP but from a deployment POV
python is definitely more complex.
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
Greg Copeland schrieb:
> On Aug 21, 9:40 pm, Bikal KC <[EMAIL PROTECTED]> wrote:
>> Greg Copeland wrote:
>>> I'm having a brain cramp right now. I can't see to recall the name of
>> Is your cramp gone now ? :P
>
>
> I wish. If anyone can remember the name of this module I'd realy
> appreciate i
euid() to my uid, it fails.
What do I need to do to get this to work?
Many thanks,
Paul
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 26, 5:20 pm, Bjoern Schliessmann wrote:
> paul wrote:
> > If I put these back in and try to run the daemon, the script fails
> > when I try to connect to the serial port, with this error:
> > serial.serialutil.SerialException: Could not open port: [Errno 13]
> &g
is a mysqlism
>
> I've tried
>cursor.execute("select * from debtor where key
> is not null ")
FROM sqlite_master SELECT name WHERE type='table';
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
Paul McGuire schrieb:
> What does Python have that C++ doesn't?
> - The biggie: dynamic typing (sometimes called "duck typing").
> Dynamic typing is a huge simplifier for development:
> . no variable declarations
> . no method type signatures
> . no inte
(compactLogin)
you haven't imported compactLogin but dvlogin from the compactLogin
namespace. Try:
import compactLogin
...do something with compactLogin.dvlogin...
reload(compactLogin)
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
s.stdout
> (or why can I set it without any error but nothing changes?)
AFAIK you can't. If the terminal is limited to ascii it won't be able to
display anything else; it might not even have the right font, so how are
you supposed to fix that? The .encode(encoding, "replace"
;> ls = [1,2,3].reverse()
>>>> ls
>>>>
>>>> print [1,2,3].reverse()
> None
> I mean, why ls is empty after assignment?
That's what "in-place" means, [].reverse() changes the list in-place and
does not return the list to the caller.
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
asier: If you like XML, use genshi. If you plan
to generate something else than HTML, use cheetah. Use google or
whatever search engine you prefer to find those packages.
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
Jean-Paul Calderone schrieb:
> It could ask the application. On the other hand, maybe asyncore remains in
> a perfectly consistent state even after it raises this exception, and it is
> already "asking" by letting this exception propagate up: if the application
> is free t
pts can't work on that.
What do you mean by "that"? I just use the 2.5 icons with 2.4 and all my
scripts are happy ;)
thanks
Paul
--
http://mail.python.org/mailman/listinfo/python-list
ware developers should pay their bills
and further ignore some of his drivel.
> I have version 1.2.5.
> I use Eclipse 'cos it's simply great!!
> If somebody could tell me some alternative...
The author of pydev-extension provides pydev FOR FREE!! If you want
pydev-extensio
ds are calling
external programs (slow) or using some IPC method (socket, xmlrpc, corba).
>
> I really like Python for a number of reasons, and would like to avoid
> Java.
Have you looked at jython?
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
thinking of "unicode objects" and
"strings" as seperate types (which they are). So there is no such thing
like "unicode string" and you always need to think about when to
encode() your unicode objects. However, this will change in py3k...,
what's the new rule of thumb?
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
greg schrieb:
> paul wrote:
>> However, this will change in py3k...,
>> what's the new rule of thumb?
[snipp]
> So you won't be able to get away with ignoring encoding
> issues in py3k. On the plus side, it should all be handled
> in a much more consistent
e you can tell the caller right
away she's doing something wrong.
greetings
Paul
BTW: are type annotations to be backported to 2.x?
--
http://mail.python.org/mailman/listinfo/python-list
Chris Mellon schrieb:
> On Dec 6, 2007 5:52 AM, paul <[EMAIL PROTECTED]> wrote:
>> function or method. I hope type annotations in py3k will allow for
>> something like constraints in C# where you can tell the caller right
>> away she's doing something wrong.
&g
l /IM explorer.exe')
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
s?
This might be worth looking at: http://www.rexx.com/~dkuhlman/#generateDS
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
version and is highly experimental. Let me
know if it works for you and whether you have any problems.
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 10, 7:37 am, Tim Roberts wrote:
> PJ wrote:
>
> >I have a simple web server using BaseHTTPServer, and the def do_POST
> >(self) function works fine for regular forms that are submitted to it,
> >but when I send anAJAXPOST to it it does nothing (I've tried to just
> >get it to print to che
the local connection) - does anyone
have any hints/tips for speeding it up?
Thanks,
Paul
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 15, 8:46 pm, Steve Holden wrote:
> Paul wrote:
> > Hi,
> > I currently have a webserver using BaseHttpServe that serves images
> > like this:
> > if self.path.endswith(".jpg"):
> > print(curdir + sep + self.path)
> >
print "\tValue(s): %s" ", ".join(value)
print
the ", ".join(value) creates a string from a list, check the docs for
dictionaries for other syntax elements.
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
e.setdefault( k, [] ).append( v )
In Perl, the code looks like this:
$h{ $key } = $value ;
Whats wrong with:
mytable[key] = value
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
Phillip B Oldham schrieb:
Are there any FOSS Python Single-Sign-on Servers?
[snip]
I've searched around but can only seem to find OpenID servers, which
will probably be too "open" for our needs.
So if it is not OpenID, which protocol are you going to implement?
cheers
tly-not-sortable-list-type diskussion and the endless
repetition of the greatest of all after-the-fact theories ever "duck
typing".
cheers
Paul
BTW: Back to Java? No, not really.
--
http://mail.python.org/mailman/listinfo/python-list
class User(object):
def __init__(self, uid):
self.uid = uid
self.__dict__.update(yaml.load(str('uid')+'.yaml'))
def save(self):
f=open(str(self.uid)+'.yaml')
yaml.dump(self.__dict__, f)
is there a better way to persist usin
}
def start(type, id):
func = start_methods.get(type, None)
if func:
func(id)
else:
raise ...
Or maybe look at trac's (http://trac.edgewall.com) use of Components and
Interfaces. Very lightweight and modular. You can start reading here:
http://trac.edgewall.org/browser/trunk/tr
.compile([^anothercharset]
self.type = "IBM029"
errs = self.(self.type).findall(aCardImage)
same here, or use a class/module-level dict like
symbol_table = {
'IBM029': re.compile([^...]),
'IBM026': re.compile([^...])
}
and symbol_table[self.type].findall(someth
ork. Perhaps I am just not able to understand exactly what is going
on here.
Can anyone offer some assistance?
Thank you,
Paul
--
http://mail.python.org/mailman/listinfo/python-list
We found a quick workaround to make import work with paths. We just
append the folder we want to the system's path:
sys.path.append( moduleFolder )
If anyone has a better solution, that would be great. Until then, this
is ugly, but it works.
--
http://mail.python.org/mailman/listi
gert schrieb:
I would like to read the following from a text file
Hi gert,
I'm puzzled, what is wrong with using wsgi as advertised? Just import
your code and insert it in the wsgi chain no?
cheers
Paul
from json import loads
from gert.db import Db
def application(environ, res
Dave Challis schrieb:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Ah thanks, vars(...) was exactly what I was after. I'd come across
dir() before, but this returns more than I need.
It seems vars() misses class attributes tho...
cheers
Paul
--
http://mail.python.org/mailman/lis
Have you shown this stuff to the google AppEngine folks!
Thats being touted as the thing that'll make web-2 easy
but you have to write code (Python) which will turn off 99% of
possible users.
What made Hypercard really great (and Supercard on DOS, and the new
clones like Revolution) is that it w
Something like this?
class User:
def __init__(self, name):
self.name = name
def __str__(self):
return self.name
n = 10
users = []
for i in range(n):
users.append(User('user%d' % i))
print users[9]
print users[4]
Cheers,
Pau
e you're running in the "same origin" javascript security
restriction enforced by the browser. That is, the origin of your
javascript is file://... and you're trying to access
http://localhost:8765. This is not allowed.
hth
Paul
--
http://mail.python.org/mailman/listinfo/python-list
also a good
example how code benefits from interfaces wrt. structuring and
documentation.
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
seem covered in any documentation that i could find.
Whats wrong with this page?
http://www.cherrypy.org/wiki/StaticContent
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
or am I missing something
Pythonic?
I'd say so. In a function/method body I do reuse generic names like
data,counter,etc. but I never change say an instance variable to another
type (except from None). Principle of least surprise applies here.
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
rg/simple/Recur/
cheers
Paul
--
http://mail.python.org/mailman/listinfo/python-list
Larry Bates schrieb:
> paul wrote:
>> Maryam Saeedi schrieb:
>>> Hi,
>>>
>>> I was wondering if you know how can I run a python code once every five
>>> minutes for a period of time either using python or some other program
>>> like
>
an do this with inotify. It's an event based notification
mechanism for linux kernel 2.6.13 and up. It has python bindings
available (google for pyinotify).
You will receive events like IN_OPEN,IN_CLOSE,etc. and keep track of
opened files this way.
hth
Paul
--
http://mail.python.org/mai
I have been experiencing strange thread behavior when I pass a message
received via a Queue to a wx.PostEvent method (from wxPython). The
relevant code in the thread is:
def run(self):
while self.is_running:
task = self.queue.get()
wx.PostEvent(self.app.handle_task, task)
sel
On Dec 3, 2:03 pm, Mike Driscoll wrote:
> On Dec 3, 3:42 pm, paul wrote:
>
>
>
>
>
> > I have been experiencing strange thread behavior when I pass a message
> > received via a Queue to a wx.PostEvent method (from wxPython). The
> > relevant code
been renamed to getPageText().
Try:
text = PAMIE('http://www.cnn.com').getPageText()
cheers
Paul
and following is orginal source until i was found in internet.
from BeautifulSoup import BeautifulSoup
from PAM30 import PAMIE
url = 'http://www.cnn.com'
ie = PAMIE(url)
bs = B
elca schrieb:
Hi,
thanks a lot.
studying alone is tough thing :)
how can i improve my skill...
1. Stop top-posting.
2. Read documentation
3. Use the interactive prompt
cheers
Paul
paul kölle wrote:
elca schrieb:
Hello,
Hi,
following is script source which can beautifulsoup and
ue
after each function call. The module import is created at C++ object
constructor and then Py_DECREF'd in the desctuctor
Anyone else had issues of this kind? My next try will be to use
sub-interpreters per thread.
Thanks,
Paul.
--
http://mail.python.org/mailman/listinfo/python-list
nd what is going
on a bit more. Can anyone shed any further light?
Regards,
Paul.
On Tue, Feb 2, 2010 at 11:59 AM, Gabriel Genellina
wrote:
> En Mon, 01 Feb 2010 18:21:56 -0300, Paul escribió:
>
>
> I'm extending some old Visual Studio 6 code to add embedded python
>> sc
I have a problem with embedding Python into a C extension in Windows
Vista. I have implemented a timer routine in C as an extension, which
I can import into Python 2.6.5 and run. Each timer interval, the
extension calls a C CALLBACK function. I want to be able to have this
CALLBACK function call a
The python-announce-list-ow...@python.org suggested you might have a
solution to my problem.
Please help if you can.
Thanks,
Paul
Original Message
Subject: Re: [ANN] Pyjamas 0.5 Web Widget Set and python-to-javascript
Compiler released
Date: Thu, 10 Jun 2010 17:43:48
I have a problem with threading using the Python/C API. I have an
extension that implements a timer, and the C++ timer callback function
calls a Python function. The relevant code looks like this:
static PyObject *timer_setmodname( PyObject *pSelf, PyObject *pArgs )
{
char *b;
PyA
1 - 100 of 9128 matches
Mail list logo