signed vs unsigned int

2010-06-01 Thread johnty
i'm reading bytes from a serial port, and storing it into an array. each byte represents a signed 8-bit int. currently, the code i'm looking at converts them to an unsigned int by doing ord(array[i]). however, what i'd like is to get the _signed_ integer value. whats the easiest way to do this?

Re: Python vs. Fedora and CentOS

2010-06-01 Thread John Nagle
Michael Torrie wrote: On 05/31/2010 05:13 AM, Jason D wrote: There is however never been an issue to locate different version of python in your system as you deem fit without problems. So I dont understand why your concern. Actually, replacing python on RHEL is a major endeavor. Almost all R

plac, the easiest command line arguments parser in the world

2010-06-01 Thread Michele Simionato
I would like to announce to the world the first public release of plac: http://pypi.python.org/pypi/plac Plac is a wrapper over argparse and works in all versions of Python starting from Python 2.3 up to Python 3.1. With blatant immodesty, plac claims to be the easiest to use command line argu

Re: Vote to Add Python Package "pubsub" to the Python Standard Library

2010-06-01 Thread Daniel Fetchinson
> I vote for adding the Python package "pubsub" to the Python standard > library. It has recently been added to wxpython (replacing the old > wx.lib.pubsub package), but it has application to non-gui programs as > well. > > For more information see: . If you are re

Converting a pickle to python3

2010-06-01 Thread Paulo da Silva
Hi! I have a big data structure cpickled into a datafile, by python2. I tried to unpickle it using python3 but got the followin message: File "/usr/lib64/python3.1/pickle.py", line 1372, in loads encoding=encoding, errors=errors).load() _pickle.UnpicklingError: invalid load key, 'x'. Is there

Re: Challenging Job Opportunity for a C# Architect/ Developer

2010-06-01 Thread Albert Hopkins
On Tue, 2010-06-01 at 19:44 -0700, rzzzwilson wrote: > http://www.catb.org/~esr/faqs/smart-questions.html#forum werd. -- http://mail.python.org/mailman/listinfo/python-list

Re: Vote to Add Python Package "pubsub" to the Python Standard Library

2010-06-01 Thread Carl Banks
On May 26, 4:26 am, Tom wrote: > I vote for adding the Python package "pubsub" to the Python standard > library.  It has recently been added to wxpython (replacing the old > wx.lib.pubsub package), but it has application to non-gui programs as > well. Well, I can definitely see a case for adding

Re: Challenging Job Opportunity for a C# Architect/ Developer

2010-06-01 Thread rzzzwilson
http://www.catb.org/~esr/faqs/smart-questions.html#forum -- http://mail.python.org/mailman/listinfo/python-list

Re: how to generate a csr in python?

2010-06-01 Thread holmes86
On Jun 1, 3:46 pm, Peter Otten <__pete...@web.de> wrote: > holmes86 wrote: > > On May 31, 7:37 pm, holmes86 wrote: > >> hi,everyone > > >> I want generate a Certificate signing request in python,but I don't > >> how to realize this function.I don't find any method after read the > >> python-openss

Re: expat parsing error

2010-06-01 Thread John Machin
On Jun 2, 1:57 am, "kak...@gmail.com" wrote: > On Jun 1, 11:12 am, "kak...@gmail.com" wrote: > > > > > On Jun 1, 11:09 am, John Bokma wrote: > > > > "kak...@gmail.com" writes: > > > > On Jun 1, 10:34 am, Stefan Behnel wrote: > > > >> kak...@gmail.com, 01.06.2010 16:00: > > > > >> > how can i f

Challenging Job Opportunity for a C# Architect/ Developer

2010-06-01 Thread Suganthi Vincent
Hi My name is Suganthi Vincent and I’m with Metabyte, Inc. I have a challenging Job Opportunity for a C# Architect/ Developer, a 4 months contract to hire opportunity located in Wheeling, IL. Please find the job details. Title: C# Architect/ Developer Location: Wheeling, IL Rates: Market Rate

Re: TypeError: list indices must be integers

2010-06-01 Thread Jon Clements
On 1 June, 23:06, Terry Reedy wrote: > I got this error twice today > while creating lists of lists > of complicated stuff. > The first time I was puzzled, > but the second time I knew > that I had just forgotten a comma. > If you google this, you will too. > > Reduced example >  >>> [[1,2,3] # fo

TypeError: list indices must be integers

2010-06-01 Thread Terry Reedy
I got this error twice today while creating lists of lists of complicated stuff. The first time I was puzzled, but the second time I knew that I had just forgotten a comma. If you google this, you will too. Reduced example >>> [[1,2,3] # forgot comma [4,5,6]] Traceback (most recent call last

Re: python and filter design: calculating "s" optimal transform

2010-06-01 Thread Terry Reedy
On 6/1/2010 2:18 PM, robert somerville wrote: Hi; this is an airy question. does anybody have some code or ideas on how to calculate the optimal "S" transform of user specified order (wanting the coefficients) for a published filter response curve, ie. f(s) = 1.0/(a1*S^2 + a2*S + a3) If you

Re: MySQLDB - server has gone on blob insertion...

2010-06-01 Thread John Nagle
durumdara wrote: When I tried to start this, I got error: _mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away') Are you by any chance trying to do this on a HostGator account? HostGator servers run a program which kills long MySQL transactions by executing MySQL "KILL" tra

Re: Drawing Multigraphs

2010-06-01 Thread geremy condra
On Tue, Jun 1, 2010 at 11:24 AM, Nima wrote: > 2010/6/1 geremy condra >> >> We use Dot in Graphine, and it works well. It's also very easy to >> output to. > > >> Graphine is a flexible, easy-to-use graph library for Python 3. > > I always knew a day would come when I'd need to use Python 3. And

Fashion serious in 2010

2010-06-01 Thread ekr3d
Man Fashion Week: Z Zegna Spring 2010 Collection fashion-ekramy.blogspot.com/2010/04/man-fashion-week-z-zegna- spring-2010.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Drawing Multigraphs

2010-06-01 Thread Nima
2010/6/1 geremy condra > > We use Dot in Graphine, and it works well. It's also very easy to > output to. > Graphine is a flexible, easy-to-use graph library for Python 3. I always knew a day would come when I'd need to use Python 3. And I've been so stupid thinking I could run away from this e

python and filter design: calculating "s" optimal transform

2010-06-01 Thread robert somerville
Hi; this is an airy question. does anybody have some code or ideas on how to calculate the optimal "S" transform of user specified order (wanting the coefficients) for a published filter response curve, ie. f(s) = 1.0/(a1*S^2 + a2*S + a3) -- http://mail.python.org/mailman/listinfo/python-list

Re: What does this PyChecker warning mean?

2010-06-01 Thread MrJean1
Although PyChecker 0.8.18 is quite an improvement over previous releases, it does have quirks. The PyChecker postprocessor might be helpful, see /Jean On Jun 1, 4:48 am, Leo Breebaart wrote: > When fed the following code: > >  def Foo(): > >    

Re: MySQLDB - server has gone on blob insertion...

2010-06-01 Thread durumdara
Hi! > > drop table blobs > create table blobs (whatever definition it had originally) It was a test. In PGSQL, PYSQLite that was: delete from blobs where (file_id in (select file_id from pics where dir_id=?)) So I need to delete only all blobs that processed. > > > > > When I tried to start th

Re: Drawing Multigraphs

2010-06-01 Thread geremy condra
On Tue, Jun 1, 2010 at 9:42 AM, Nima wrote: > Hi there, > Is it possible to draw an (undirected) multigraph using a python library? > I need to write a program that finds an Eulerian circuit in a graph > (which might obviously be a multigraph). As the output of the program, > I should draw the gra

Re: Python vs. Fedora and CentOS

2010-06-01 Thread Adam Tauno Williams
On Tue, 2010-06-01 at 10:55 -0600, Michael Torrie wrote: > On 06/01/2010 05:01 AM, Adam Tauno Williams wrote: > > Yes, we install Python 2.6 on CentOS and run a production app on it - no > > problems. > > rpm -Uvh > > http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1-4.ius.el5.n

Re: Python vs. Fedora and CentOS

2010-06-01 Thread Adam Tauno Williams
On Tue, 2010-06-01 at 10:43 -0600, Michael Torrie wrote: > On 05/31/2010 05:13 AM, Jason D wrote: > > There is however never been an issue to locate different version of python > > in your system as you deem fit without problems. > > So I dont understand why your concern. > > Actually, replacing

Re: Python vs. Fedora and CentOS

2010-06-01 Thread Michael Torrie
On 06/01/2010 05:01 AM, Adam Tauno Williams wrote: > Yes, we install Python 2.6 on CentOS and run a production app on it - no > problems. > > rpm -Uvh > http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1-4.ius.el5.noarch.rpm > > yum -y install python26 python26-setuptools Than

Re: Python vs. Fedora and CentOS

2010-06-01 Thread Michael Torrie
On 05/31/2010 05:13 AM, Jason D wrote: > There is however never been an issue to locate different version of python > in your system as you deem fit without problems. > So I dont understand why your concern. Actually, replacing python on RHEL is a major endeavor. Almost all Red Hat utilities ar

Drawing Multigraphs

2010-06-01 Thread Nima
Hi there, Is it possible to draw an (undirected) multigraph using a python library? I need to write a program that finds an Eulerian circuit in a graph (which might obviously be a multigraph). As the output of the program, I should draw the graph and print out the solution. I asked my question at

Re: expat parsing error

2010-06-01 Thread kak...@gmail.com
On Jun 1, 11:12 am, "kak...@gmail.com" wrote: > On Jun 1, 11:09 am, John Bokma wrote: > > > > > "kak...@gmail.com" writes: > > > On Jun 1, 10:34 am, Stefan Behnel wrote: > > >> kak...@gmail.com, 01.06.2010 16:00: > > > >> > how can i fix it, how to "ignore" the headers and parse only > > >> > t

Re: multiprocessing and accessing server's stdout

2010-06-01 Thread Tim Arnold
On May 28, 7:47 pm, "Martin P. Hellwig" wrote: > On 05/28/10 21:44, Adam Tauno Williams wrote: > > > On Fri, 2010-05-28 at 15:41 +0100, Martin P. Hellwig wrote: > >> On 05/28/10 13:17, Adam Tauno Williams wrote: > >> > >>> You should be able to point it any any file-like object.  But, again, > >>

Re: What does this PyChecker warning mean?

2010-06-01 Thread Terry Reedy
On 6/1/2010 8:23 AM, Peter Otten wrote: Leo Breebaart wrote: When fed the following code: def Foo(): class A(object): def __init__(self): pass class B(object): def __init__(self): pass PyChecker 0.8.18 warns: foo.py:9: Redefining

Re: What does this PyChecker warning mean?

2010-06-01 Thread Leo Breebaart
On 6/1/2010 7:53 AM, Xavier Ho wrote: > > Out of curiosity, why are you defining two classes inside a > > function? Not my code! Not my code! :-) This code was contributed by someone else, and I merely took my default action (in such cases) of running pyflakes, pychecker, and pylint on it before

Re: expat parsing error

2010-06-01 Thread kak...@gmail.com
On Jun 1, 11:09 am, John Bokma wrote: > "kak...@gmail.com" writes: > > On Jun 1, 10:34 am, Stefan Behnel wrote: > >> kak...@gmail.com, 01.06.2010 16:00: > > >> > how can i fix it, how to "ignore" the headers and parse only > >> > the XML? > > >> Consider reading the answers you got in the last t

Re: expat parsing error

2010-06-01 Thread John Bokma
"kak...@gmail.com" writes: > On Jun 1, 10:34 am, Stefan Behnel wrote: >> kak...@gmail.com, 01.06.2010 16:00: >> >> > how can i fix it, how to "ignore" the headers and parse only >> > the XML? >> >> Consider reading the answers you got in the last thread that you opened >> with exactly this quest

Re: expat parsing error

2010-06-01 Thread kak...@gmail.com
On Jun 1, 10:34 am, Stefan Behnel wrote: > kak...@gmail.com, 01.06.2010 16:00: > > > how can i fix it, how to "ignore" the headers and parse only > > the XML? > > Consider reading the answers you got in the last thread that you opened > with exactly this question. > > Stefan That's exactly, what

Re: expat parsing error

2010-06-01 Thread Stefan Behnel
kak...@gmail.com, 01.06.2010 16:00: how can i fix it, how to "ignore" the headers and parse only the XML? Consider reading the answers you got in the last thread that you opened with exactly this question. Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: expat parsing error

2010-06-01 Thread John Bokma
"kak...@gmail.com" writes: > On Jun 1, 9:51 am, John Bokma wrote: >> "kak...@gmail.com" writes: >> > I got the following error >> > --- --- >> >   File "/usr/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux- >> > x86_64.egg/twisted/internet/selectreactor.py", line 146, in >> > _doReadOrW

Re: What does this PyChecker warning mean?

2010-06-01 Thread Steven W. Orr
On 6/1/2010 7:53 AM, Xavier Ho wrote: On 1 June 2010 21:48, Leo Breebaart mailto:l...@lspace.org>> wrote: When fed the following code: def Foo(): class A(object): def __init__(self): pass class B(object): def __init__(self):

Re: expat parsing error

2010-06-01 Thread kak...@gmail.com
On Jun 1, 9:51 am, John Bokma wrote: > "kak...@gmail.com" writes: > > I got the following error > > --- --- > >   File "/usr/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux- > > x86_64.egg/twisted/internet/selectreactor.py", line 146, in > > _doReadOrWrite > >     why = getattr(selectable

Re: expat parsing error

2010-06-01 Thread John Bokma
"kak...@gmail.com" writes: > I got the following error > --- --- > File "/usr/lib/python2.6/site-packages/Twisted-10.0.0-py2.6-linux- > x86_64.egg/twisted/internet/selectreactor.py", line 146, in > _doReadOrWrite > why = getattr(selectable, method)() > File "/usr/lib/python2.6/site-packa

labels legibility in matplotlib pie charts and bar plots

2010-06-01 Thread meow
Hi, As a beginner in python and matplotlib I come here with a possibly naïve question. I need to write code for automation of bar-plots and pie-charts creation. I chose to use matplotlib which is well adapted for this purpose. Nevertheless, some of my charts are not very legible due to interfer

Re: Returning value from home made unit - how to?

2010-06-01 Thread bobicanprogram
On May 30, 6:22 pm, Mel wrote: > Martin Hvidberg wrote: > > I have a Python program, which has until now, been running in command line > > mode only. I wish to add a GUI. > > > I would like to develop (and maintain) the GUI part in a separate module, > > i.e. in its own .py file, and then ‘import’

expat parsing error

2010-06-01 Thread kak...@gmail.com
Hi i'm doing the following: def start_element(name, attrs): print 'Start element:', name, attrs def end_element(name): print 'End element:', name def char_data(data): print 'Character data:', repr(data) class SimpleServer(LineReceiver): # Using Twisted def connectionMade(self):

Re: What does this PyChecker warning mean?

2010-06-01 Thread Peter Otten
Leo Breebaart wrote: > > When fed the following code: > > def Foo(): > > class A(object): > def __init__(self): > pass > > class B(object): > def __init__(self): > pass > > PyChecker 0.8.18 warns: > > foo.py:9: Redefining attribute (__in

expat parsing error

2010-06-01 Thread kak...@gmail.com
Hi i'm doing the following: def start_element(name, attrs): print 'Start element:', name, attrs def end_element(name): print 'End element:', name def char_data(data): print 'Character data:', repr(data) class SimpleServer(LineReceiver): # Using Twisted def connectionMade(self):

Re: [Python] Hashbang error

2010-06-01 Thread Chris Gonnerman
pradeepbpin wrote: I use gVim as an editor to create python scripts on a windows machine. To run the same script on my ubuntu machine, I added a hashbang line to the script. Now when I run this script from command line of ubuntu, I get a bad interpreter error, like below /usr/bin/python^M: bad i

Re: What does this PyChecker warning mean?

2010-06-01 Thread Xavier Ho
On 1 June 2010 21:48, Leo Breebaart wrote: > > When fed the following code: > > def Foo(): > >class A(object): >def __init__(self): >pass > >class B(object): >def __init__(self): >pass > > PyChecker 0.8.18 warns: > > foo.py:9: Redefining attribute

What does this PyChecker warning mean?

2010-06-01 Thread Leo Breebaart
When fed the following code: def Foo(): class A(object): def __init__(self): pass class B(object): def __init__(self): pass PyChecker 0.8.18 warns: foo.py:9: Redefining attribute (__init__) original line (5) I do not understand what is m

Re: Hashbang error

2010-06-01 Thread Rebelo
On 06/01/2010 12:56 PM, pradeepbpin wrote: I use gVim as an editor to create python scripts on a windows machine. To run the same script on my ubuntu machine, I added a hashbang line to the script. Now when I run this script from command line of ubuntu, I get a bad interpreter error, like below

Re: Hashbang error

2010-06-01 Thread Cameron Simpson
On 01Jun2010 03:56, pradeepbpin wrote: | I use gVim as an editor to create python scripts on a windows machine. | To run the same script on my ubuntu machine, I added a hashbang line | to the script. Now when I run this script from command line of ubuntu, | I get a bad interpreter error, like belo

Re: Python vs. Fedora and CentOS

2010-06-01 Thread Adam Tauno Williams
On Sat, 2010-05-29 at 11:43 -0700, John Nagle wrote: > The major Red Hat based Linux distros are still shipping with Python 2.4. > As a result, almost all hosting providers are running obsolete versions of > Python. >The big problem seems to be that "cPanel" and "yum" still use older > version

Hashbang error

2010-06-01 Thread pradeepbpin
I use gVim as an editor to create python scripts on a windows machine. To run the same script on my ubuntu machine, I added a hashbang line to the script. Now when I run this script from command line of ubuntu, I get a bad interpreter error, like below /usr/bin/python^M: bad interpreter: No such f

Re: Problems with relative imports and pep 366

2010-06-01 Thread Jean-Michel Pichavant
Gabriele Lanaro wrote: I've yet asked this question on SO, I'll copy the contents: I have a "canonical file structure" like that (I'm giving sensible names to ease the reading): mainpack/ __main__.py __init__.py - helpers/ __init__.py path.py - network/ __init__.py

Re: how to generate a csr in python?

2010-06-01 Thread Peter Otten
holmes86 wrote: > On May 31, 7:37 pm, holmes86 wrote: >> hi,everyone >> >> I want generate a Certificate signing request in python,but I don't >> how to realize this function.I don't find any method after read the >> python-openssl manual.Any help will appreciate. > > nobody? Is the createCertR

Re: how to generate a csr in python?

2010-06-01 Thread holmes86
On May 31, 7:37 pm, holmes86 wrote: > hi,everyone > > I want generate a Certificate signing request in python,but I don't > how to realize this function.I don't find any method after read the > python-openssl manual.Any help will appreciate. nobody? -- http://mail.python.org/mailman/listinfo/pyt

hii

2010-06-01 Thread madhuri vio
i wanted to know the difference between copy composed objects and independent objects composed objects >>> firstserie = all_2_digests([’EcoRI’, ’HindIII’, ’BamHI’]) >>> firstserie [[’EcoRI’, ’HindIII’], [’EcoRI’, ’BamHI’], [’HindIII’, ’BamHI’]] >>> newserie = firstserie[1:] >>> newserie [[’