hello i have this api
PREF0 short usb_tc08_get_single (
short handle,
float * temp,
short * overflow_flags,
short units);
this is a sample program made in c
int main(void)
{
short handle = 0; /* The handle to a TC-08 returned by
usb_tc08_open_unit() */
char selectio
It seems that some TypeError messages have changed between versions
2.5 and 2.6, e.g.:
from math import radians
radians ()
in 2.5, this leads to "radians () takes exactly 1 argument (0 given)"
whereas in 2.6, the message is now: "radians () takes exactly one
argument (0 given)"
I agree that the
On 22 Apr 2009, at 07:50, Martin v. Löwis wrote:
If the locale's encoding is UTF-8, the file system encoding is set to
a new encoding "utf-8b". The UTF-8b codec decodes non-decodable bytes
(which must be >= 0x80) into half surrogate codes U+DC80..U+DCFF.
Forgive me if this has been covered.
Hi,
how can i list all the variables that i am using?
--
http://mail.python.org/mailman/listinfo/python-list
I'm trying to get to grips with the multiprocessing module, having
only used ParallelPython before.
based on this example:
http://docs.python.org/library/multiprocessing.html#using-a-pool-of-workers
what happens if I want my "f" to take more than one argument? I want
to have a list of tuples of
Sion Arrowsmith:
> The keys aren't integers, though, they're strings.
You are right, sorry. I need to add an int() there.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Dale Amon wrote:
The point I take away from this is that packages and
modules have dotted names, but Classes do not and there
is no way to do exactly what I wanted to do.
Nope. You have not been clear with what you want, and part
of the lack of clarity is your imprecision about names.
If
On Apr 29, 5:18 am, bruno wrote:
> It seems that some TypeError messages have changed between versions
> 2.5 and 2.6, e.g.:
>
> from math import radians
> radians ()
>
> in 2.5, this leads to "radians () takes exactly 1 argument (0 given)"
> whereas in 2.6, the message is now: "radians () takes ex
I've needed an attribute accessible dict, so I created this.
Are there any obviously stupid shortcomings?
class AttrDict(dict):
def __getattr__(self, name):
try:
return self[name]
except KeyError, e:
raise AttributeError(e)
--
дамјан ( http://softver.org.m
Hello,
why can't I use this pattern
good = re.compile("^[A-ZÄÖÜ].*")
in python3. According to the documentation, patterns may be unicode
strings.
I get this error message:
Traceback (most recent call last):
File "./get.py", line 8, in
for line in sys.stdin:
File "/usr/lib64/python3.0/
[John Machin]
> > 'NEAR_DIST'], [('N', 9, 0), ('N', 9, 0), ('F', 19, 11)], [53, 55, '
>
> The data type code for the offending column is "F" which is not in the
> bog-standard dBase III set of C, N, D, and L. The code that you have used
> merely
> returns unchanged the character string that finds
> This module asks the socket module for AF_BLUETOOTH... in the socket
> module there is no such thing as AF_BLUETOOTH. Could it be that the
> person that made PyOBEX modified his socket module and forgot to give
> his socket module? Or am I missing something? Maybe AF_BLUETOOTH
> stands for someth
I want to use the multiprocessing.Pool object to run multiple tasks in
separate processes.
The problem is that I want to call an external C function (from a
shared library, with help from ctypes) and this function tends to
crash (SIGSEGV,SIGFPE,etc.) on certain data sets (the purpose of this
thing
Hi,
For those of you that are using GitHub, you might want to check out a
package that
I've written in Python. It is a command-line interface to the recently
released GitHub Issues API v2.
You can find it here:
http://github.com/jsmits/github-cli
Here are some examples of what you can do:
ghi li
On Apr 28, 11:49 pm, David Bolen wrote:
> Vsevolod writes:
> > On Apr 27, 11:31 pm, David Bolen wrote:
> >> I'm curious - do you know what happens if threading is implemented as
> >> a native OS thread and it's stuck in an I/O operation that is blocked?
> >> How does the Lisp interpreter/runtime
I was exploring techniques for implementing method_missing in Python.
I've seen a few posts out there on the subject... One tricky aspect is
if it's possible to not just intercept a method_missing call, but
actually dynamically add a new function to an existing class. I
realized you can modify the
@Ben - no hard feelings. I do think your post was unfair and would
give people a wrong impression of the site. Plus the lateness of the
day etc.. had soured my mood somewhat. But the point stands, there
were misconceptions I felt the need to address.
@Banibrata - the wxpython set is my responsibil
On Apr 28, 5:39 pm, Li Wang wrote:
> 2009/4/29 Tim Chase :
>
> >> I want to concatenate two bits string together: say we have '1001' and
> >> '111' which are represented in integer. I want to concatenate them to
> >> '100' (also in integer form), my method is:
> >> ('1001' << 3) | 111
> >> whi
On Apr 29, 8:37 am, Filip Gruszczyński wrote:
> One of the Python Zen rules is Explicit is better implicit. And yet
> it's ok to do:
>
> if x:
> do_sth
>
> when x is string or list. Since it's very comfy, I've got nothing
> against though. I am just curious, why is it so?
It also works for num
On 29Apr2009 23:41, Barry Scott wrote:
> On 22 Apr 2009, at 07:50, Martin v. Löwis wrote:
>> If the locale's encoding is UTF-8, the file system encoding is set to
>> a new encoding "utf-8b". The UTF-8b codec decodes non-decodable bytes
>> (which must be >= 0x80) into half surrogate codes U+DC80..U
On Wed, 29 Apr 2009 12:44:12 +0100, Simon Strobl
wrote:
why can't I use this pattern
good = re.compile("^[A-ZÄÖÜ].*")
in python3. According to the documentation, patterns may be unicode
strings.
I get this error message:
Traceback (most recent call last):
File "./get.py", line 8, in
Simon Strobl wrote:
Hello,
why can't I use this pattern
good = re.compile("^[A-ZÄÖÜ].*")
in python3. According to the documentation, patterns may be unicode
strings.
I get this error message:
Traceback (most recent call last):
File "./get.py", line 8, in
for line in sys.stdin:
File
Hello,
why can't I use this statement in python3:
good = re.compile("^[A-ZÄÖÜ].*")
According to the documentation, patterns can be unicode strings.
I get this error message:
Traceback (most recent call last):
File "./get.py", line 8, in
for line in sys.stdin:
File "/usr/lib64/python3.
On Apr 28, 10:07 am, Jeroen Ruigrok van der Werven wrote:
> -On [20090427 20:31], prueba...@latinmail.com (prueba...@latinmail.com) wrote:
>
> >./Modules/ld_so_aix xlc_r -q64 -bI:Modules/python.exp build/
> >temp.aix-5.3-3.1//ptst/Python-3.1a2/Modules/_tkinter.o build/
> >temp.aix-5.3-3.1//ptst/Py
In message , Jorgen Grahn
wrote:
> I am asking because people who like databases tend to overestimate the
> time it takes to parse text.
And those of us who regularly load databases from text files, or unload them
in the opposite direction, have a good idea of EXACTLY how long it takes to
pars
If you store a large number of integers (keys and values) in a
dictionary, do the Python internals perform integer compression to
save memory and enhance performance? Thanks
Dinesh
--
http://mail.python.org/mailman/listinfo/python-list
Dinesh:
> If you store a large number of integers (keys and values) in a
> dictionary, do the Python internals perform integer compression to
> save memory and enhance performance? Thanks
Define what you mean with "integer compression" please. It has several
meanings according to the context. For
Can jinja templates contain arbitrary python code?
In mako, I could do (for example):
from mako.template import Template
mytemplate = Template('''
<%!
from math import sin, pi
%>
hello ${name}!
${x}**2 = ${x**2}
% for i in xrange (10):
w[${i}] = ${sin (pi/4*i)}
% endfor
''')
d = {'na
On Wed, Apr 29, 2009 at 9:29 AM, wrote:
...
> To reiterate, I responded to this thread because I think Ben's posting
> gave an unfair impression of the site and i felt the need to address
> some misconceptions. I am sorry you failed to find the videos, but
> many tens of thousands are found every
On Wed, 29 Apr 2009 12:25:46 -0700, Iamanalien wrote:
> Hi,
>
> how can i list all the variables that i am using?
You can't.
What you can do though is list all the available names that Python knows
about, whether you are using them or not, by using the dir() or vars()
functions.
--
Steven
Well, I've managed to get close to what I want,
and just so you can see:
#!/usr/bin/python
import sys
sys.path.extend (['../lib', '../bin'])
from VLMLegacy.CardReader import CardReader
rdr = CardReader ("../example/B767.dat","PRINTABLE")
iotypes = ["WINGTL","VLMPC","VLM4997"]
for iotype in
On Apr 29, 3:49 am, mattia wrote:
> Are you aware of any python module that automatically gives you a
> screenshot of a web page?
PIL comes to mind
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Apr 29, 2009 at 04:06:23PM -0700, Scott David Daniels wrote:
> Dale Amon wrote:
>>
>> The point I take away from this is that packages and
>> modules have dotted names, but Classes do not and there
>> is no way to do exactly what I wanted to do.
> Nope. You have not been clear with w
[bearophileh...@lycos.com]
> But some other times you may accept to change the class and the set/
> dict, making it tell apart the keys only when they are different
> object:
>
> class Some(object):
> def __init__(self, y):
> self._y = y
> def __eq__(self, other):
> return s
On Wed, 29 Apr 2009 17:35:28 +0200, Marco Mariani wrote:
> Bruno Desthuilliers wrote:
>
>> Lawrence D'Oliveiro a écrit :
>
What is the rationale for considering all instances true of a user-
defined type?
>>>
>>> It's a stupid idea,
>>
>> Nope, it's a very sensible default (given you
En Wed, 29 Apr 2009 05:05:52 -0300, luca72 escribió:
can you explain how to use this function :
this is the api documentation :
PREF0 short usb_tc08_get_single (
short handle,
float * temp,
short * overflow_flags,
short units);
This is the sample made in c:
int main(void)
{
2009/4/29 Дамјан Георгиевски :
> I've needed an attribute accessible dict, so I created this.
> Are there any obviously stupid shortcomings?
If you know the attribute names ahead of time, you might consider
using a namedtuple instead.
See http://docs.python.org/library/collections.html#collections
>
> rows = fh.read().split()
> coords = numpy.array(map(int, rows[1::3]), dtype=int)
> points = numpy.array(map(float, rows[2::3]), dtype=float)
> chromio.writelines(map(chrommap.__getitem__, rows[::3]))
>
My original version is about 15 seconds. This version is about 9. The
chunks version posted
On Apr 30, 3:32 am, Thomas Heller wrote:
> I'm very happy to see that these frameworks deliver ~10 pages per second
> (cherrypy) or ~3.5 pages per second (webpy) out of the box on a system
> that is 50 times slower than a typical desktop PC. Of course these
> were very short pages.
I was remiss
On Apr 28, 7:22 am, "Colin J. Williams" wrote:
> Lie Ryan wrote:
>
> I'm puzzled by the last sentence:
>
> *** Python 2.6.2 (r262:71605, Apr 14
> 2009, 22:40:02) [MSC v.1500 32 bit
> (Intel)] on win32. ***
>
> >>> bool(0)
> False
> >>> bool(-1)
> True
> >>> bool(-100)
> True
>
> Colin W.
What's w
2009/4/29 David Robinow
> On Wed, Apr 29, 2009 at 9:29 AM, wrote:
> ...
> > To reiterate, I responded to this thread because I think Ben's posting
> > gave an unfair impression of the site and i felt the need to address
> > some misconceptions. I am sorry you failed to find the videos, but
> >
On Apr 29, 6:46 am, Bruno Desthuilliers wrote:
> Filip Gruszczyński a écrit :
>
> > One of the Python Zen rules is Explicit is better implicit. And yet
> > it's ok to do:
>
> > if x:
> > do_sth
>
> > when x is string or list. Since it's very comfy, I've got nothing
> > against though. I am just
En Wed, 29 Apr 2009 18:15:07 -0300, Martin v. Löwis
escribió:
I can not find any directions
on how to install the version of Python build using Microsoft's
compiler.
What *is* supported is creating an MSI installer out of your build
tree. See Tools/msi for details.
Also, see this recent t
May I ask for help with Sage problems here? I
did not find a usenet Sage support group. If so,
here is a session I imitated from the tutorial.
The "load command failed. I logged output with
"logstart", then quit, started, executed "load",
and "load" failed to work.
___
On Wednesday 29 April 2009 07:42, alejandro wrote:
> So I should connect trough pybluez and send with obex??
Yes, or you could try lightblue:
http://lightblue.sourceforge.net/
I've updated PyOBEX to try and be a bit more flexible when it comes to
Bluetooth socket implementations, so you might
Carl Banks wrote:
On Apr 29, 6:46 am, Bruno Desthuilliers wrote:
Filip Gruszczyński a écrit :
One of the Python Zen rules is Explicit is better implicit. And yet
it's ok to do:
if x:
do_sth
when x is string or list. Since it's very comfy, I've got nothing
against though. I am just curious,
Neal Becker wrote:
> Can jinja templates contain arbitrary python code?
>
> In mako, I could do (for example):
>
> from mako.template import Template
>
> mytemplate = Template('''
> <%!
> from math import sin, pi
> %>
> hello ${name}!
> ${x}**2 = ${x**2}
> % for i in xrange (10):
>
Dale Amon wrote:
The point I take away from this is that packages and
modules have dotted names, but Classes do not and there
is no way to do exactly what I wanted to do.
The dot syntax would have been quite nice (I quite like the
"::" syntax in Perl) and would have made the code much
clearer.
Hola
La notebook de Ariel esta en el placard, atrás de Walter.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
Um, that's the limit of what I'm familiar with, I'm afraid. I'd have
to experiment.
On Apr 28, 10:44 am, Way wrote:
> Thanks a lot for the reply. I am not familiar with multi-process in
> Python. I am now using something like:
snip
> However, in this case, Process5's stdout cannot be passed to
>
casevh wrote:
On Apr 28, 5:39 pm, Li Wang wrote:
2009/4/29 Tim Chase :
I want to concatenate two bits string together: say we have '1001' and
'111' which are represented in integer. I want to concatenate them to
'100' (also in integer form), my method is:
('1001' << 3) | 111
which
On Wed, Apr 29, 2009 at 10:02:46PM -0400, Dave Angel wrote:
> The dot syntax works very
> predictably, and quite flexibly. The problem was that by using the same
> name for module and class, you didn't realize you needed to include both.
It is one of the hazards of working in many very differ
Thank you for your post. I checked and it seems that the library I
use (matplotlib) will only plot in a counter-clockwise direction
starting at "east". I can rotate the data so that the plot looks
correct, however since the library still wants to plot counter-
clockwise, it attempts to connect th
Marco Mariani wrote:
djc wrote:
Python 2.5.2 (r252:60911, Oct 5 2008, 19:29:17)
geohash(37.421542, -122.085589, b'2005-05-26-10458.68')
^
SyntaxError: invalid syntax
The byte type is new in 2.6
--
http://mail.py
Is anyone using telnetlib in python-3.0? If so are you having any
success? Using the example at the bottom of the telnetlib doc page I
cannot seem to get any joy at all. I can make a connection, but write
(command) seems to do nothing.
Thanks,
Rowland
--
http://mail.python.org/mailman/listinfo
Paul Franz wrote:
I have looked and looked and looked. But I can not find any directions
on how to install the version of Python build using Microsoft's
compiler. It builds. I get the dlls and the exe's. But there is no
documentation that says how to install what has been built. I have read
e
En Wed, 29 Apr 2009 15:27:48 -0300, mrstevegross
escribió:
I was exploring techniques for implementing method_missing in Python.
I've seen a few posts out there on the subject... One tricky aspect is
if it's possible to not just intercept a method_missing call, but
actually dynamically add a
>> I've needed an attribute accessible dict, so I created this.
>> Are there any obviously stupid shortcomings?
>
> If you know the attribute names ahead of time, you might consider
> using a namedtuple instead.
> See
> http://docs.python.org/library/collections.html#collections.namedtuple
I do u
Dale Amon wrote:
On Wed, Apr 29, 2009 at 10:02:46PM -0400, Dave Angel wrote:
Please don't sink to exec or eval to solve what is really a
straightforward problem.
I do not really see any other way to do what I want. If
there is a way to get rid of the exec in the sample code
I have used, I wou
Bret Fledderjohn wrote:
2009/4/29 David Robinow mailto:drobi...@gmail.com>>
On Wed, Apr 29, 2009 at 9:29 AM, mailto:ky...@showmedo.com>> wrote:
...
> To reiterate, I responded to this thread because I think Ben's
posting
> gave an unfair impression of the site and i felt
En Wed, 29 Apr 2009 22:06:26 -0300, Michael Press
escribió:
May I ask for help with Sage problems here? I
did not find a usenet Sage support group.
I think you'll get more responses here:
news://news.gmane.org/gmane.comp.mathematics.sage.general
--
Gabriel Genellina
--
http://mail.python
> How do get a printable unicode version of these path strings if they
> contain none unicode data?
Define "printable". One way would be to use a regular expression,
replacing all codes in a certain range with a question mark.
> I'm guessing that an app has to understand that filenames come in tw
I used JCreator LE, java IDE for windows because, when I add documentation
of some new library, I have it on a F1 and index. So how you manage
documentation and code completion ? I asume that you are geek but not even
geeks could know every method of every class.
"Daniel Fetchinson" wrote in m
> I used JCreator LE, java IDE for windows because, when I add documentation
> of some new library, I have it on a F1 and index. So how you manage
> documentation and code completion ? I asume that you are geek but not even
> geeks could know every method of every class.
Vi has code completion and
I'd like to label the plot axes as x and y. All I see is xlabel and ylabel.
ylabel puts y on its side, rotated 90 degrees from the horizontal. Is there
way to put it in a normal reading (science/math) position?
--
W. eWatson
(121.015 Deg. W, 39.262 De
On Apr 30, 9:09 am, Дамјан Георгиевски wrote:
> I've needed an attribute accessible dict, so I created this.
> Are there any obviously stupid shortcomings?
>
> class AttrDict(dict):
> def __getattr__(self, name):
> try:
> return self[name]
> except KeyError, e:
>
In message , Gabriel
Genellina wrote:
> c_float_p = ctypes.POINTER(ctypes.c_float)
> c_short_p = ctypes.POINTER(ctypes.c_short)
I like to do
import ctypes as ct
to shorten the references:
c_float_p = ct.POINTER(ct.c_float)
c_short_p = ct.POINTER(ct.c_short)
--
Lawrence "Death To
> I am working on a overlay network implementation with python. I need
> to use both IPv4 and IPv6 at each node. Python socketserver is being
> used for this task. can anybody pls suggest me how to input an IPv6
> address to the socketserver.
I'm not quite sure I understand the question, so here i
On Apr 30, 1:10 pm, Dale Amon wrote:
> I do not really see any other way to do what I want. If
> there is a way to get rid of the exec in the sample code
> I have used, I would love to know... but I can't see how
> to import something where part of the name comes from user
> command line input wit
On Wed, Apr 29, 2009 at 11:31 PM, wrote:
> Is anyone using telnetlib in python-3.0? If so are you having any
> success? Using the example at the bottom of the telnetlib doc page I
> cannot seem to get any joy at all. I can make a connection, but write
> (command) seems to do nothing.
3.0 had
Dale Amon writes:
> I do not really see any other way to do what I want. If
> there is a way to get rid of the exec in the sample code
> I have used, I would love to know... but I can't see how
> to import something where part of the name comes from user
> command line input without interpreting
-On [20090430 02:21], Dale Amon (a...@vnl.com) wrote:
>import sys
>sys.path.extend (['../lib', '../bin'])
>
>from VLMLegacy.CardReader import CardReader
>rdr = CardReader ("../example/B767.dat","PRINTABLE")
>
>iotypes = ["WINGTL","VLMPC","VLM4997"]
>for iotype in iotypes:
>packagename =
Dale Amon wrote:
On Wed, Apr 29, 2009 at 10:02:46PM -0400, Dave Angel wrote:
The dot syntax works very
predictably, and quite flexibly. The problem was that by using the same
name for module and class, you didn't realize you needed to include both.
It is one of the hazards of worki
101 - 173 of 173 matches
Mail list logo