I'm looking for a tool that could be used in a pre-commit step to check that
only features available in a "old" python version are used, say python 2.3
for example.
Does any one know of one ?
--
http://mail.python.org/mailman/listinfo/python-list
Lawrence D'Oliveiro writes:
> In message <87hbxkm7n2@benfinney.id.au>, Ben Finney wrote:
>
> > For this and other differences introduced in the Python 3.x series, see
> > http://www.python.org/dev/peps/pep-3100/>.
>
> People never thank you for an "RTFM" response.
It's a good thing I avoid
Does anyone have PyODE running on Python 2.6.2?
--V
--
http://mail.python.org/mailman/listinfo/python-list
Nikolaus> I want to implement a caching data structure in Python that
Nikolaus> allows me to:
Nikolaus> 1. Quickly look up objects using a key
Nikolaus> 2. Keep track of the order in which the objects are accessed
Nikolaus> (most recently and least recently accessed one,
On Jul 12, 2:01 pm, s...@pobox.com wrote:
> Nikolaus> I want to implement a caching data structure in Python that
> Nikolaus> allows me to:
>
> Nikolaus> 1. Quickly look up objects using a key
> Nikolaus> 2. Keep track of the order in which the objects are accessed
> Nikolaus>
On Sun, 12 Jul 2009 09:47:32 +0200, Baptiste Lepilleur wrote:
I'm looking for a tool that could be used in a pre-commit step to check that
only features available in a "old" python version are used, say python 2.3
for example.
Does any one know of one ?
Run your test suite with whichever ver
hello,
when I''m working in a library,
and want to test some of the library functions,
I need to switch to a main application,
(which has a normal main-section)
and run that.
If the library is simply,
I add a main section to the library,
so no problem.
But if the library requires a lot of over
>> My Cache module does #1 and #3. I'm not sure if you want #2 for
>> internal cache maintenance or for as part of the API.
>>
>> http://www.smontanaro.net/python/Cache.py
pdpi> I'm not sure whether #2 is doable at all, as written. You _need_ a
pdpi> complete history
Stef Mientki wrote:
hello,
when I''m working in a library,
and want to test some of the library functions,
I need to switch to a main application,
(which has a normal main-section)
and run that.
If the library is simply,
I add a main section to the library,
so no problem.
But if the library r
In article ,
Stef Mientki wrote:
>
>when I''m working in a library, and want to test some of the library
>functions, I need to switch to a main application, (which has a normal
>main-section) and run that.
if __name__ == '__main__':
main()
Then you can call main() from another module for te
> Stef Mientki (SM) wrote:
>SM> Stef Mientki wrote:
>>> hello,
>>>
>>> when I''m working in a library,
>>> and want to test some of the library functions,
>>> I need to switch to a main application,
>>> (which has a normal main-section)
>>> and run that.
>>>
>>> If the library is simply,
>
I am trying to convert a piece of code that I am using the thread module with
to the multiprocessing module.
The way that I have it set up is a chunk of code reads a text file and assigns
a dictionary key multiple values from the text file. I am using locks to write
the values to the dictionary
SM> if __name__ == '__main__':
SM>import db_test
SM>new_globals = {}
SM>new_globals [ '__name__' ] = '__main__'
SM>new_globals [ '__file__' ] = 'not really valuable'
SM>execfile ( 'db_test.py', new_globals )
Why not:
import db_test
db_test.main()
I think that is what
In article ,
Stef Mientki wrote:
>Stef deleted an attribution:
>>
>> Why not:
>>
>> import db_test
>> db_test.main()
>
>Yes I tried that too, but it gives the following error: "module object
>not callable"
You need to create a main() function in db_test first.
--
Aahz (a...@pythoncraft.com)
On 7/12/2009 11:13 AM Stef Mientki said...
SM> if __name__ == '__main__':
SM>import db_test
SM>new_globals = {}
SM>new_globals [ '__name__' ] = '__main__'
SM>new_globals [ '__file__' ] = 'not really valuable'
SM>execfile ( 'db_test.py', new_globals )
Why not:
implie
Hey everyone, I have this small piece of code that simply finds the
factors of a number.
import sys
def factor(n):
primes = (6*i+j for i in xrange(1, n) for j in [1, 5] if (i+j)%5 !
= 0)
factors = []
for i in [2, 3, 5]:
while n % i == 0:
n /= i
f
Im trying to get aquinted to python on bit more basic level and am
following socket and threading programming tutorials from these 2
addresses :
http://heather.cs.ucdavis.edu/~matloff/Python/PyNet.pdf
http://heather.cs.ucdavis.edu/~matloff/Python/PyThreads.pdf
in this PyThreads file he sets up th
OVERVIEW:
I am running a script on one machine that connects to a MySQL database
on another machine that is outside of our university's domain.
According to the administrator, network policies do not allow the
compute nodes to access machines outside of our university's domain.
COMPUTERS:
A = comp
On 7/12/2009 12:18 PM Riley Crane said...
OVERVIEW:
I am running a script on one machine that connects to a MySQL database
on another machine that is outside of our university's domain.
According to the administrator, network policies do not allow the
compute nodes to access machines outside of o
On Jul 12, 2:11 pm, Cameron Pulsford
wrote:
> Hey everyone, I have this small piece of code that simply finds the
> factors of a number.
>
> import sys
>
> def factor(n):
> primes = (6*i+j for i in xrange(1, n) for j in [1, 5] if (i+j)%5 !
> = 0)
>
> factors = []
>
> for i in [2,
2009/7/12 Cameron Pulsford :
> My question is, is it possible to combine those two loops? The primes
> generator I wrote finds all primes up to n, except for 2, 3 and 5, so I must
> check those explicitly. Is there anyway to concatenate the hard coded list
> of [2,3,5] and the generator I wrote so
On Sat, 11 Jul 2009 05:17:18 +0100, Dennis Lee Bieber
wrote:
On Fri, 10 Jul 2009 13:25:49 +0100, "Rhodri James"
declaimed the following in
gmane.comp.python.general:
On Thu, 09 Jul 2009 11:52:44 +0100, m.reddy prasad reddy
wrote:
> my aim is to run the assembly programs in python.by that
> Cameron Pulsford (CP) wrote:
>CP> Hey everyone, I have this small piece of code that simply finds the
>CP> factors of a number.
Others have already given you advice to add the [2, 3, 5] to the
iterator (of which the primes.extend([2,3,5]) will not work). Please
allow me to make some other
En Sun, 12 Jul 2009 16:16:29 -0300, zayatzz
escribió:
while 1:
k = self.myclntsock.recv(1)
if k == "": break
srvr.vlock.acquire()
srvr.v += k
srvr.vlock.releas
Hello! I need to stream from a webcam in Linux and I need to be able
to analyze the video feed frame by frame with PIL. Currently my web-
cam (Quickcam Chat) only seems to work with GStreamer so a solution
using pygst would be preferred.
Thanks for your help,
Sam
--
http://mail.python.org/mailman
> zayatzz (z) wrote:
>z> Im trying to get aquinted to python on bit more basic level and am
>z> following socket and threading programming tutorials from these 2
>z> addresses :
>z> http://heather.cs.ucdavis.edu/~matloff/Python/PyNet.pdf
>z> http://heather.cs.ucdavis.edu/~matloff/Python/PyTh
On Jul 12, 3:50 pm, Sparky wrote:
> Hello! I need to stream from a webcam in Linux and I need to be able
> to analyze the video feed frame by frame with PIL. Currently my web-
> cam (Quickcam Chat) only seems to work with GStreamer so a solution
> using pygst would be preferred.
>
> Thanks for you
Dear Sirs And Madams :
it is an Acm programming competition Questions in year 2004-2005 .
could you please solve problems is question ? I Wan't C++ Source Code
program About this questions OR Problems . thank you for your prompt
attention to this matter
your faithfully.
-
Sparky wrote:
On Jul 12, 3:50 pm, Sparky wrote:
Hello! I need to stream from a webcam in Linux and I need to be able
to analyze the video feed frame by frame with PIL. Currently my web-
cam (Quickcam Chat) only seems to work with GStreamer so a solution
using pygst would be preferred.
Thanks f
On Jul 12, 5:24 pm, Davood Vahdati
wrote:
> Dear Sirs And Madams :
>
> it is an Acm programming competition Questions in year 2004-2005 .
> could you please solve problems is question ? I Wan't C++ Source Code
> program About this questions OR Problems . thank you for your prompt
> attention to t
En Sun, 12 Jul 2009 19:24:57 -0300, Davood Vahdati
escribió:
it is an Acm programming competition Questions in year 2004-2005 .
could you please solve problems is question ? I Wan't C++ Source Code
program About this questions OR Problems . thank you for your prompt
attention to this matter
On Sun, Jul 12, 2009 at 10:16 AM, Bjorn Meyer wrote:
> I am trying to convert a piece of code that I am using the thread module with
> to the multiprocessing module.
>
> The way that I have it set up is a chunk of code reads a text file and assigns
> a dictionary key multiple values from the text f
On Jul 12, 4:30 pm, David wrote:
> Sparky wrote:
> > On Jul 12, 3:50 pm, Sparky wrote:
> >> Hello! I need to stream from a webcam in Linux and I need to be able
> >> to analyze the video feed frame by frame with PIL. Currently my web-
> >> cam (Quickcam Chat) only seems to work with GStreamer so
On Jul 10, 5:10 pm, Tim Chase wrote:
> > shutil.rmtree(filename)
> > File "/usr/lib64/python2.5/shutil.py", line 178, in rmtree
> > onerror(os.rmdir, path, sys.exc_info())
> > File "/usr/lib64/python2.5/shutil.py", line 176, in rmtree
> > os.rmdir(path)
> > OSError: [Errno 39]
Cameron Pulsford wrote:
When you start a new thread, you should start a new thread and not
piggyback on an existing thread.
--
http://mail.python.org/mailman/listinfo/python-list
itertools.chain() did it, thanks!
As far as the primes generator, it does not generate any non-primes.
All primes (except 2, 3 and 5) are in the form (6*x + 1, 6*x + 5)
where is x is [1, 2, ..., n]. The only time it doesn't generate a
prime is when x + (1 or 5) % 5 == 0. Which is what that
Sparky wrote:
On Jul 12, 4:30 pm, David wrote:
Sparky wrote:
On Jul 12, 3:50 pm, Sparky wrote:
Hello! I need to stream from a webcam in Linux and I need to be able
to analyze the video feed frame by frame with PIL. Currently my web-
cam (Quickcam Chat) only seems to work with GStreamer so a
On Jul 13, 11:24 am, Cameron Pulsford
wrote:
> As far as the primes generator, it does not generate any non-primes.
> All primes (except 2, 3 and 5) are in the form (6*x + 1, 6*x + 5)
> where is x is [1, 2, ..., n]. The only time it doesn't generate a
> prime is when x + (1 or 5) % 5 == 0.
On Sun, Jul 12, 2009 at 9:24 PM, Cameron
Pulsford wrote:
> As far as the primes generator, it does not generate any non-primes. All
> primes (except 2, 3 and 5) are in the form (6*x + 1, 6*x + 5) where is x is
> [1, 2, ..., n]. The only time it doesn't generate a prime is when x + (1 or
> 5) % 5 ==
On Jul 12, 7:38 pm, David wrote:
> Sparky wrote:
> > On Jul 12, 4:30 pm, David wrote:
> >> Sparky wrote:
> >>> On Jul 12, 3:50 pm, Sparky wrote:
> Hello! I need to stream from a webcam in Linux and I need to be able
> to analyze the video feed frame by frame with PIL. Currently my web-
I read it on the haskell site in their sieves/prime wheel section, I
guess I misunderstood something. (east to do over there...) I did
verify it against established list of primes and other generators I've
written that use more normal methods, but I only hand verified it.
It is at least int
On Jul 13, 1:17 pm, Cameron Pulsford
wrote:
> I read it on the haskell site in their sieves/prime wheel section, I
> guess I misunderstood something. (east to do over there...) I did
> verify it against established list of primes and other generators I've
> written that use more normal metho
lst = list()
(lst populated by async twisted deferred callbacks)
while True:
if len(lst) == SOME_NUMBER:
return lst
Q1: is this a common OK practice? I'm worried infinite loops hogs memory.
Q2: operating on list from threads (mostly appends) must be safe,
right (synchroni
Hello
I want to intsall python on my AIX 6.1 Box.
I couldn't get any rpm for python 2.5.x for AIX 6.1.
THen I decided to compile python 2.5.4 on my AIX box. I downloaded the
python source code from www.python.org and tried to compile on my AIX
both using gcc.
step 1 ./configure --with-gcc
config
44 matches
Mail list logo