I am just messing around trying to get pyserial to work with 3.0.
I am stuck on this line:
if type(port) in [type(''), type(u'')]
how can I convert this to 3.0? I tried changing the u to a d that did
not do anything.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 24, 10:55 pm, Chris Rebert wrote:
> On Tue, Feb 24, 2009 at 7:46 PM, Seth wrote:
> > I am just messing around trying to get pyserial to work with 3.0.
>
> > I am stuck on this line:
>
> > if type(port) in [type(''), type(u'')]
>
> >
ectly
Originally: if type(port) in [type(''), type(u'')]
self.portstr = port
else:
self.portstr = self.makeDeviceName(port)
On Feb 25, 8:47 am, Christian Heimes wrote:
> Seth wrote:
> > I implemented "if isinstance(p
Py3k on
this project that I am working on and pyserial has not been converted
so I just started messing around with it.
Thanks for the help.
Seth
On Feb 25, 10:16 am, Christian Heimes wrote:
> Seth wrote:
> > I tried all three ways you guys listed nothing seems to convert the
>
There is something you could possibly help me with.
We have a code that creates a simple Python shelve database. We are
able to serialize objects and store them in the dbm file. This seem to
work the same on Windows XP Python 2.5, Ubuntu 9.1 with Python 2.6,
but on Os X 10.5 with Python 2.5 the da
On Feb 14, 1:21 pm, a...@pythoncraft.com (Aahz) wrote:
> Nope -- any reason you can't change the filename?
> --
Os X 10.5 did not recognized the dbm extension.
But, I have been able to fix the problem (hope it helps somebody):
At http://docs.python.org/library/shelve.html it says:
"shelve.open(
box and eventually a graph in pyQt. I can't find any
documentation or tutorials on how to do this. If anyone can point me
in the right direction or give me some tips I would be grateful.
Thanks,
Seth
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 21, 7:24 pm, David Boddie wrote:
> On Tuesday 21 July 2009 21:37, Seth wrote:
>
> > I have used pyserial in the past but this is my first experience with
> > pyQt. I am using the Python xy package for windows current but might
> > move to linux. I have a small dev
designed for channel-internal buffers. Should I also
overwrite "send" and have the data appended to a buffer? If not, how
should writable and handle_write be implemented? I'm not sure what to
do here...
Thank you in advance,
-- Seth Nielson
--
http://mail.python.org/mailman/listinfo/python-list
of saying,
"don't do this now". That is why I use lambda.
-- Seth Nielson
On 7/30/05, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote:
> Stefan Rank wrote:
> > on 30.07.2005 10:20 Paolino said the following:
> >> why (x**2 with(x))<(x**3 with(x)) is not
dies WITHOUT an exception! It just disappears! (signal
maybe?)
Please help! I'm up against the wall!
-- Seth N.
--
http://mail.python.org/mailman/listinfo/python-list
Nevermind. The problem wasn't in gdbm. I had "exception" in stead of "Exception" in the try-except statement.
-- SethNOn 8/27/05, Seth Nielson <[EMAIL PROTECTED]> wrote:
Hi guys.
I'm using a python script as a redirector for Squid. My python script uses gdbm
Is there a reason tarfile and zipfile don't use the same method/member names,
where it makes sense? Consider the following six methods/members, which I
would expect to be the same (with the possible exception of mtime vs date_time,
which are of different types). It almost seems like someone we
Hi all,I'm trying to parse and modify an XML document using xml.dom.minidom module and Python 2.4.2>> from xml.dom import minidom>> dom = minidom.parse ("c:/test.txt")If the xml file contains a non-ascii character, then i get a parse error.
I have the following line in my xml file:Exception beim Lö
On 3/7/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
Abhimanyu Seth wrote:> I'm trying to parse and modify an XML document using xml.dom.minidom module> and Python 2.4.2>> >> from xml.dom import minidom> >> dom = minidom.parse
("c:/test.txt")>>
On 3/7/06, Abhimanyu Seth <[EMAIL PROTECTED]> wrote:
On 3/7/06, Fredrik Lundh <
[EMAIL PROTECTED]> wrote:
Abhimanyu Seth wrote:> I'm trying to parse and modify an XML document using xml.dom.minidom module> and Python 2.4.2>> >> from xml.dom import minidom>
On 3/7/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
Abhimanyu Seth wrote:> > I have the following line in my xml file:> > Exception beim Löschen des Audit-Moduls aufgetreten. Exception> Stack> > lautet: %1.
> > ExpatError: not well-formed (invalid token): line 8, c
On 3/7/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
Abhimanyu Seth wrote:> Sorry, my mistake. The file was not saved as utf-8. Saving it as utf-8> solves my problems.> >> f = codecs.open ("c:/test.txt", "r", "utf-8")
> >> dom = minidom.
On 08/29/10 14:43, Peter Otten wrote:
John Nagle wrote:
Is the "in" test faster for a dict or a set?
Is "frozenset" faster than "set"? Use case is
for things like applying "in" on a list of 500 or so words
while checking a large body of text.
As Arnaud suspects: no significant differenc
On 09/05/10 16:47, Baba wrote:
> level: beginner
>
> how can i access the contents of a text file in Python?
>
> i would like to compare a string (word) with the content of a text
> file (word_list). i want to see if word is in word_list. let's assume
> the TXT file is stored in the same director
I need to know how to generate a list of combinations/permutations
(can't remember which it is). Say I have a list of variables:
[a,b,c,d,...,x,y,z]
I am curious if there is an optimized way to generate this:
[[a,b],[a,c],[a,d],...,[x,z],[y,z]]
I currently have an iteration that does this:
#li
On Sep 20, 3:08 pm, Mark Lawrence wrote:
> On 20/09/2010 21:54, Seth Leija wrote:
>
>
>
>
>
> > I need to know how to generate a list of combinations/permutations
> > (can't remember which it is). Say I have a list of variables:
>
> > [a,b,c,d,
22 matches
Mail list logo