On 25 Nov 2006 15:27:26 -0800, Ritesh Raj Sarraf <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have, for very long, been trying to find a consistent solution (which
> could work across major python platforms - Linux, Windows, Mac OS X)
> for the following problem.
>
> I have a function which downloads fil
Phil Schmidt wrote:
> sturlamolden wrote:
>
>> Using Python just for the sake of using Python is silly.
>
> Well, that kind of gets right to my point. Does the "added" effort with
> Python to interface with data acquisition hardware really result in
> less productivity? I am very familiar with Ma
sturlamolden wrote:
> Using Python just for the sake of using Python is silly.
Well, that kind of gets right to my point. Does the "added" effort with
Python to interface with data acquisition hardware really result in
less productivity? I am very familiar with Matlab, Labview, and Python,
and fr
Nathan Harmston wrote:
> Currently I am working on a generic graph library so I can do various
> graph based analysis for various projects I have ideas for. Currently
> I am implementing Graph as a wrapper around a dictionary. Currently my
> implementation works like this:
>
> t = Graph()
Dennis Lee Bieber wrote:
> On Sat, 25 Nov 2006 07:58:26 -0800, wo_shi_big_stomach
> <[EMAIL PROTECTED]> declaimed the following in
> comp.lang.python:
>
>> File "p2.py", line 23, in ?
>> for line in fileinput.input(f,):
>> File
>> "/System/Library/Frameworks/Python.framework/Versions/2.3/l
Hello john.
I solve it by add '#include "example.h"' into wrap.c, recompiled all
c-sources, and it works on the right way!
Content of example.h:
== example.h =
#ifndef __EXAMPLE_H__
#define __EXAMPLE_H__
double fact(double n);
#endif
== end example.h =
Anyway, Th
YunBin Lee wrote:
> John, Thanks for your help!
>
> > Did you notice that the garbage is a whole number? Why? Because you
> > have been (more or less) plucking ints out of some arbitrary place on
> > the stack, floating them, and printing them.
>
> I don't know how to solve it (or the right way), c
So, I've made a couple of small but useful additions to
the xml-rpc package. Is there an assigned maintainer
of the package I should communicate with?
I've got the server side running under apache/mod_python, which
is a bit more industrial strength than the simple xmlrpc server,
and a patch for 6
See
http://www.ferg.org/projects/python_gotchas.html#contents_item_4
--
http://mail.python.org/mailman/listinfo/python-list
John, Thanks for your help!
> Did you notice that the garbage is a whole number? Why? Because you
> have been (more or less) plucking ints out of some arbitrary place on
> the stack, floating them, and printing them.
I don't know how to solve it (or the right way), could you give me some
examples
Thanks for all the replys.
"Diez B. Roggisch 写道:
"
> hollowspook schrieb:
> > def aa():
> > global b
> > b=b+1
> > print b
> >
> > b=1
> > aa()
> >
> > The above code runs well in python shell.
> >
> > However I have a problem as follows.
> >
> > new a file named test.py
> >
Dustan wrote:
>
> If you're using google groups, it for some reason thought my example
> code was 'quoted text', which it certainly isn't, seeing as it's not
> found anywhere prior to my message.
Sigh. And if we're NOT using Google Groups, it still thinks so ...
The reason is that your "example
[EMAIL PROTECTED] wrote:
> I'm a bit baffled. Here is a bit of fairly straightforward code:
>
> def _chunkify( l, chunkSize, _curList = list() ): ...
> _chunkify simply breaks a sequence into a sequence of smaller lists of
> size <= chunkSize. The first call works fine, but if I call it
> multi
Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>,
> Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> >Andy Wu wrote:
> >
> >> def func(seconds = None, minutes = None, hours = None):
> >> ...
> >>
> >> In my program I can get a string object('seconds', 'minutes', 'hours')
> >> to specify which p
Nathan Harmston wrote:
> Hi,
>
> It seems that by just going through the problem writing out a better
> explanation for the reply I have figured out a solution and the
> problem isnt as difficult as I thought it would be.
Often happens.
>
> What is a wontok?
It's Melanesian Pidgin (from the Eng
Phil Schmidt wrote:
> Thanks for that list. I'm currently in the process of getting quotes
> for a bunch of Matlab tools for hardware-in-the-loop simulation. Big
> bucks.
Yup, and better spent elsewhere...
> I'd love to use Python, but I'm not comfortable with the hardware side
> of that. I'm
Hi,
It seems that by just going through the problem writing out a better
explanation for the reply I have figured out a solution and the
problem isnt as difficult as I thought it would be.
What is a wontok?
Thanks
Nathan
PS --> the start of my reply:
class Interval(object):
_id = "gene1"
John Henry napisal(a):
> I believe the standard dictionary should be amened to allow the use of
> case insensitive keys - as an option. I found some work done by others
> to do that at:
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/283455
>
> but the problem with that approach is tha
Fredrik Lundh wrote:
> Mathias Panzenboeck wrote:
>
>> But the question is: *IS* this derived work? I mean, it's not copied code.
>> It's the same hashing-logic, which I learned by watching pythons code.
>
> given that it's only a few lines of code, and there's hardly any other
> way to write th
John Henry wrote:
> I believe the standard dictionary should be amened to allow the use of
> case insensitive keys - as an option. I found some work done by others
> to do that at:
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/283455
>
> but the problem with that approach is that th
John Henry wrote in news:1164494606.514366.124810
@l39g2000cwd.googlegroups.com in comp.lang.python:
> I believe the standard dictionary should be amened to allow the use of
> case insensitive keys - as an option.
class idict( dict ):
class __istr( str ):
def __eq__( self, other ):
In article <[EMAIL PROTECTED]>,
Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>Andy Wu wrote:
>
>> def func(seconds = None, minutes = None, hours = None):
>> ...
>>
>> In my program I can get a string object('seconds', 'minutes', 'hours')
>> to specify which parameter to use, the problem is I don'
Nathan Harmston wrote:
> Hi,
>
> The idea is that I m going to use it to build graphs for sequence
> alignment (at the moment), I read a discussion on the corebio
> (reimplementation of biopython) group about using intervals to
> represent sequence slices. The idea being that, my graph may contain
Nathan Harmston wrote:
>> > https://networkx.lanl.gov/
..
I got it back just once, but when I clicked again I see this
RuntimeErrorPython 2.4.4c1: /usr/bin/python
Sat Nov 25 16:21:16 2006
A problem occurred in a Python script. Here is the sequence of function
calls leading up to the e
Hi,
The idea is that I m going to use it to build graphs for sequence
alignment (at the moment), I read a discussion on the corebio
(reimplementation of biopython) group about using intervals to
represent sequence slices. The idea being that, my graph may contain
millions of alignments and storing
Hi,
I have, for very long, been trying to find a consistent solution (which
could work across major python platforms - Linux, Windows, Mac OS X)
for the following problem.
I have a function which downloads files from the web. I've made the
function threaded. I'm trying to implement a progress bar
Dustan wrote:
> Steven D'Aprano wrote:
> > On Sat, 25 Nov 2006 13:39:55 -0800, Ola K wrote:
> >
> > > Hi,
> > > I am pretty new to Python and I want to make a script that will search
> > > for the following options:
> > > 1) words made of uppercase characters -only- (like "YES")
> > > 2) words made
Steven D'Aprano wrote:
> On Sat, 25 Nov 2006 13:39:55 -0800, Ola K wrote:
>
> > Hi,
> > I am pretty new to Python and I want to make a script that will search
> > for the following options:
> > 1) words made of uppercase characters -only- (like "YES")
> > 2) words made of lowercase character -only
Dustan wrote:
> Ola K wrote:
> > Hi,
> > I am pretty new to Python and I want to make a script that will search
> > for the following options:
> > 1) words made of uppercase characters -only- (like "YES")
> > 2) words made of lowercase character -only- (like "yes")
> > 3) and words with only the f
On Sat, 25 Nov 2006 13:39:55 -0800, Ola K wrote:
> Hi,
> I am pretty new to Python and I want to make a script that will search
> for the following options:
> 1) words made of uppercase characters -only- (like "YES")
> 2) words made of lowercase character -only- (like "yes")
> 3) and words with on
Nathan Harmston wrote:
> > > https://networkx.lanl.gov/
>
> This was working for me earlier, I managed to get everything from
> there earlier. It seems a very good package. It seems theres more out
> there than what I had thought, which unfortunately makes it harder for
> me to decide what to use
Ola K wrote:
> Hi,
> I am pretty new to Python and I want to make a script that will search
> for the following options:
> 1) words made of uppercase characters -only- (like "YES")
> 2) words made of lowercase character -only- (like "yes")
> 3) and words with only the first letter capitalized (lik
I believe the standard dictionary should be amened to allow the use of
case insensitive keys - as an option. I found some work done by others
to do that at:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/283455
but the problem with that approach is that they lowercase the keys
immediate
> > https://networkx.lanl.gov/
This was working for me earlier, I managed to get everything from
there earlier. It seems a very good package. It seems theres more out
there than what I had thought, which unfortunately makes it harder for
me to decide what to use (pynetwork and bgl look useful aswe
Fredrik Lundh wrote:
> Mathias Panzenboeck wrote:
>
>> But the question is: *IS* this derived work? I mean, it's not copied
>> code.
>> It's the same hashing-logic, which I learned by watching pythons code.
>
> given that it's only a few lines of code, and there's hardly any other
> way to writ
Hi
> * and I need to do all these considering the fact that not all letters
> are indeed English letters.
You mean letters from the English alphabet (derived from the Latin/Roman
alphabet, fyi)? I'm sorry for the nitpicking, but 'English letters'
sounds a bit too 'ackward' to me.
> I went t
Hi,
I am pretty new to Python and I want to make a script that will search
for the following options:
1) words made of uppercase characters -only- (like "YES")
2) words made of lowercase character -only- (like "yes")
3) and words with only the first letter capitalized (like "Yes")
* and I need to d
Grant Edwards wrote:
> That depends on the type of the global and how they're used.
> Re-binding a name is always an atomic operation. Modifying
> many mutable objects is atomic.
footnote: for more on this topic, see this FAQ entry:
http://effbot.org/pyfaq/what-kinds-of-global-value-mutation-ar
Mathias Panzenboeck wrote:
> But the question is: *IS* this derived work? I mean, it's not copied code.
> It's the same hashing-logic, which I learned by watching pythons code.
given that it's only a few lines of code, and there's hardly any other
way to write those lines if you want to implemen
On Sat, 25 Nov 2006 08:13:58 -0800, Noah Slater wrote:
>
> On Nov 22, 12:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>> Thanks for the comments. PDF is, to some extent, a requirement. To
>> preserve the entire journal as a single "entity" with a reasonably high
>> production quality,
Paul Rubin wrote:
> Mathias Panzenboeck <[EMAIL PROTECTED]> writes:
>> So, can this code be considered as derived and do I have to put my
>> code under the GPL? I'd like to publish it under something less
>> restrictive, like a BSD style license. But if GPL is the only way,
>> then GPL it is. :)
>
Noah Slater wrote:
> Which is more important to the Python comunity...
the community definitely don't need more random usenet posters who's
only contribution is to complain whenever someone tries to do some-
thing. this thread is an embarrassment for the Python community; you
should all be ash
Mathias Panzenboeck <[EMAIL PROTECTED]> writes:
> So, can this code be considered as derived and do I have to put my
> code under the GPL? I'd like to publish it under something less
> restrictive, like a BSD style license. But if GPL is the only way,
> then GPL it is. :)
Python is not GPL'd but h
Hi.
I wrote a small hashlib for C. Because I'm new to hashes I looked at pythons
implementation and
reused *some* of the code... or more the mathematical "hash-function", not
really the code.
In particular I looked at pythons hash and lookup functions, so I came up with
this (see the code
un
Cousin Stanley wrote:
...
> Using Cygwin and Python 2.4 under Win2K the following version
> of your code seems to work OK here with no extraneous CR
Hmm. Just tried it here at home (Python 2.5) and it works fine as
well... Cygwin was pre-installed on my machine when I started work at
the
Szabolcs Nagy:
> i haven't read your code, but there are many graph implementations in
> python.
> in case you haven't found these yet:
> http://wiki.python.org/moin/PythonGraphApi
>
> if you only want to do some analysis i think you need this one (as it's
> pretty complete and simple):
> https://n
YunBin Lee wrote:
> Hi, all.
> I have a problem of float return error in python c binding module.
> Below is my c sources, compile commands and result of program.
There seems to be a missing file: example.h. If that hint isn't
sufficient, please continue reading.
>
> == wrap.c =
>
Szabolcs Nagy wrote:
> if you only want to do some analysis i think you need this one (as it's
> pretty complete and simple):
> https://networkx.lanl.gov/
seems to be broken at present with a python traceback coming out; not a
good advert for python and/or trac
--
Robin Becker
many_years_after wrote in news:1164467660.760671.145440
@j44g2000cwa.googlegroups.com in comp.lang.python:
> class mythread(threading.Thread):
> def __init__(self, threadname):
> threading.Thread.__init__(self, name = threadname)
>
> def run(self):
> print 'i am running'
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
The Python documentation states:
[quote]
start( )
Start the thread's activity.
This must be called at most once per thread object. It arranges for
the object's run() method to be invoked in a separate thread of control.
[/quote]
So
Phil Schmidt wrote:
>
> I'd love to use Python, but I'm not comfortable with the hardware side
> of that. I'm certain that most, if not all data acquisition hardware
> comes with DLL drivers, which I could interface with using ctypes. I'm
> concerned though about spending more time messing around
> Hi all,
>
> Using cygwin and Python 2.5, I have the following scripts,
> one bash script and the other a python script:
> --
Ant
Using Cygwin and Python 2.4 under Win2K the following version
of your code seems to work OK
In article <[EMAIL PROTECTED]>,
Grant Edwards <[EMAIL PROTECTED]> wrote:
>
>Re-binding a name is always an atomic operation. Modifying
>many mutable objects is atomic.
You know this, but just to make clear: rebinding attributes of an object
(which are also sometimes called names) is not necessar
On Nov 22, 12:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Thanks for the comments. PDF is, to some extent, a requirement. To
> preserve the entire journal as a single "entity" with a reasonably high
> production quality, there seems to be no way around it. I could not
> find a sufficie
Gabriel Genellina wrote:
> At Saturday 25/11/2006 00:14, wo_shi_big_stomach wrote:
>
>> > The filter should be applied to walkfiles. Something like this:
>> >
>> > dir = path(/home/wsbs/Maildir)
>> > for f in filter(os.path.isfile, dir.walkfiles('*')):
>> > #
>> > # test:
>> >
Andy Wu wrote:
> Say I have a string 'minutes' and a integer 30, now I need to call the
> func this way: func(minutes = 30), how do I do this?
d={"minutes": 30}
func(**d)
This is "extended call syntax". You can read more about this when
you look up the (deprecated) "apply" function in the manual.
Andy Wu wrote:
> def func(seconds = None, minutes = None, hours = None):
> ...
>
> In my program I can get a string object('seconds', 'minutes', 'hours')
> to specify which parameter to use, the problem is I don't know how to
> call the function.
>
> Say I have a string 'minutes' and a integ
Jerry Hill wrote:
> > MontyLingua is GPL software and thus has its own licensing issues for
> > commercial software.
MontyLingua might appear to be GPL-licensed, but then the author puts
some kind of non-commercial clause on top, either thinking that's what
the GPL is all about (out of confusion,
Hi guys,
There's a function I want to use which looks like this:
def func(seconds = None, minutes = None, hours = None):
...
In my program I can get a string object('seconds', 'minutes', 'hours')
to specify which parameter to use, the problem is I don't know how to
call the function.
Say I
hollowspook schrieb:
> def aa():
> global b
> b=b+1
> print b
>
> b=1
> aa()
>
> The above code runs well in python shell.
>
> However I have a problem as follows.
>
> new a file named test.py
>
>
> def aa():
Paul Rubin wrote:
> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> > Your email indicates a possible concern that we are doing something
> > untoward -- this was not at all intended, nor is it true.
>
> Although you might not have intended it, I feel it is still true. You
> are misappropriatin
Hi, all.
I have a problem of float return error in python c binding module.
Below is my c sources, compile commands and result of program.
== wrap.c =
#include
PyObject *wrap_fact(PyObject *self, PyObject *args)
{
double n=0.0,result=0.0;
if (!PyArg_ParseTuple (args,"d:fact",
class mythread(threading.Thread):
def __init__(self, threadname):
threading.Thread.__init__(self, name = threadname)
def run(self):
print 'i am running'
print 'i quit run()'
thread = mythread('1')
thread.start()
print threading.activeCount() ## 1 , this means the
"hollowspook" <[EMAIL PROTECTED]> wrote:
> from test import *
> b=1
> aa()
>
> The error message is :
> Traceback (most recent call last):
> File "", line 1, in ?
> File "test.py", line 3, in aa
> b=b+1
> NameError: global name 'b' is not defined
>
> Why this happens? Please do me a favo
Hi Tony,
Tony Belding wrote:
> I'm interested in using an off-the-shelf interpreted language as a
> user-accessible scripting language for a MUCK. I'm just not sure if I
> can find one that does everything I need. The MUCK must be able to call
> the interpreter and execute scripts with it, but t
On Sat, 25 Nov 2006 14:05:27 +, Nathan Harmston wrote:
> Hi All,
>
> Currently I am working on a generic graph library so I can do various
> graph based analysis for various projects I have ideas for. Currently
> I am implementing Graph as a wrapper around a dictionary. Currently my
> implem
Tony Belding wrote:
> I'm interested in using an off-the-shelf interpreted language as a
> user-accessible scripting language for a MUCK. I'm just not sure if I
> can find one that does everything I need. The MUCK must be able to call
> the interpreter and execute scripts with it, but the int
i haven't read your code, but there are many graph implementations in
python.
in case you haven't found these yet:
http://wiki.python.org/moin/PythonGraphApi
if you only want to do some analysis i think you need this one (as it's
pretty complete and simple):
https://networkx.lanl.gov/
i also reco
Nathan Harmston wrote:
> I ve got a single module which I m using to contain a lot of
> dictionaries, constants, general information, which are used by
> various other modules. However I can't seem to access them:
>
> in data.py
> _SEQTYPE_DNA = 0
> _SEQTYPE_RNA = 1
> _SEQTYPE_PROT = 2
> _seqTy
Nathan Harmston wrote:
> Hi All,
>
> I ve got a single module which I m using to contain a lot of
> dictionaries, constants, general information, which are used by
> various other modules. However I can't seem to access them:
>
> in data.py
> _SEQTYPE_DNA = 0
> _SEQTYPE_RNA = 1
> _SEQTYPE_PROT = 2
Maurice LING wrote:
[snip..]
> As Steven mentioned -- anything you can read is copyrighted. The
> difference is whether is the copyright effective or enforceable. What do
> I mean by this? Without copyright, there will not be plagarism. Ask
> yourself this question, can you copy William Shakespear
On 2006-11-25, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
>>I'm just getting started on threading and was wondering why the
>>following code does not work (i know globals is bad style - I'll
>>eliminate them eventually). All I get is a blank cursor flashing.
>
> You've got your example already
Fredrik Lundh wrote:
> Tennessee Leeuwenburg wrote:
>
> > If anyone has any good ideas for how to cope as a publisher with these
> > difficulties, I'm all ears.
>
> has any of the format zealots posting to this thread actually
> volunteered to produce any material for your publication? if not, I
Hi All,
I ve got a single module which I m using to contain a lot of
dictionaries, constants, general information, which are used by
various other modules. However I can't seem to access them:
in data.py
_SEQTYPE_DNA = 0
_SEQTYPE_RNA = 1
_SEQTYPE_PROT = 2
_seqType = { "DNA":_SEQTYPE_DNA, "RNA":_S
On 11/25/06, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> And how do you think this is different from any other publication? That
> Python Papers is under a CC licence is a red-herring.
Well, the CC license is viral. According to the CC explanation of the
Attribution-NonCommercial-ShareAlike lice
def aa():
global b
b=b+1
print b
b=1
aa()
The above code runs well in python shell.
However I have a problem as follows.
new a file named test.py
def aa():
global b
b=b+1
print b
-
Hi All,
Currently I am working on a generic graph library so I can do various
graph based analysis for various projects I have ideas for. Currently
I am implementing Graph as a wrapper around a dictionary. Currently my
implementation works like this:
t = Graph()
n1 = Node("Node1"
Marc 'BlackJack' Rintsch wrote:
...
> It's a feature. The `sys.stdout` object remembers if the last ``print``
> ended in a comma (see the `sys.stdout.softspace` attribute) and when the
> interpreter executes its shutdown code and that `softspace` attribute is
> set, an extra '\n' is printed.
So
>I have a problem with the module subprocess!
>The problem is that the external software that I am running under
>subprocess.Popen opens stdin, stdout, stderr, and other file descriptors to
>write and read in the hard drive.
As many other programs...
>I know how to capture stdin, stdout and stder
http://candygram.sourceforge.net/
--
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Hi,pythoners:
I countered some problems when I try to stop threads using flag.
These are my some important codes:
# mythread.py
def run(self):
while self.addr != '':### text waiting for processing
if not self.CONTINUE: ### flag for thread ,means to exit
the
In <[EMAIL PROTECTED]>, Ant wrote:
> --
> #!/usr/bin/python
> print "Testing",
>
> Running the bash script, I get the following output:
>
> OKt var: Testing
> Test var2: Test2 OK
>
> Does anyone have any idea why th
In article <[EMAIL PROTECTED]>,
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>On Fri, 24 Nov 2006 18:11:21 -0600, Tony Belding <[EMAIL PROTECTED]>
>declaimed the following in comp.lang.python:
>
>> the security issue that really worries me. . . I have to be able to
>> limit what the interpreter
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> I thought I just had. In what way does the statement "Yes, it's true
> that you can't resell copies of The Python Papers for personal profits,
> but you may derive from it, reproduce and propagate it" not provide
> such a revision and clarification?
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> Your email indicates a possible concern that we are doing something
> untoward -- this was not at all intended, nor is it true.
Although you might not have intended it, I feel it is still true. You
are misappropriating terminology ("free as in fre
On 24 Nov 2006 08:42:02 -0800, jeff <[EMAIL PROTECTED]> wrote:
> File "/home/jeffrey/Documents/Music/.rename/id3reader.py", line 341,
> in _interpretFlags
> self._readExtHeader = _readExtHeader_rev3
> NameError: global name '_readExtHeader_rev3' is not defined
Add a "self." in front of _read
Spiro wrote:
> XWindow have all drawing functionality and Windows[] object which holds
> all child windows.
>
> Function Draw looks like this:
> def Draw(self):
> self.Back.blit
> for wnd in self.Windows:
> wnd.Draw(OffsetX, OffsetY)
>
> Now in main module i make objec
Tony Belding wrote:
> Is this practical? I'm thinking of Ruby or Python for this, if they
> can meet the requirements.
Python had a sandbox module, but is was discarded because of security
problems.
If you want it working on MacOS, you may also have a look at Tcl, which has
a long tradition on
Tennessee Leeuwenburg wrote:
> If anyone has any good ideas for how to cope as a publisher with these
> difficulties, I'm all ears.
has any of the format zealots posting to this thread actually
volunteered to produce any material for your publication? if not, I
suggest ignoring them. any bozo
Hi all,
i'm trying to make some user interface objects in python.
I have classes XWindow and XMainWindow(XWindow) (XMainWindow inherited
from XWindow)
XWindow have all drawing functionality and Windows[] object which holds
all child windows.
Function Draw looks like this:
def Draw(self):
90 matches
Mail list logo