Re: screen output problem

2006-11-25 Thread Calvin Spealman
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

Re: About alternatives to Matlab

2006-11-25 Thread Robert Kern
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

Re: About alternatives to Matlab

2006-11-25 Thread Phil Schmidt
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

Re: Graph Data Structures

2006-11-25 Thread Pieter Swart
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()

Re: combining the path and fileinput modules SOLVED

2006-11-25 Thread wo_shi_big_stomach
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

Re: Return float problem.

2006-11-25 Thread YunBin Lee
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

Re: Return float problem.

2006-11-25 Thread John Machin
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

who is maintainer of xml-rpc module?

2006-11-25 Thread Mark Harrison
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

Re: Python 2.5 idle and print command How do I suppress a line feed?

2006-11-25 Thread Steve
See http://www.ferg.org/projects/python_gotchas.html#contents_item_4 -- http://mail.python.org/mailman/listinfo/python-list

Re: Return float problem.

2006-11-25 Thread YunBin Lee
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

Re: problem with global variable in a module

2006-11-25 Thread hollowspook
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 > >

Re: a -very- case sensitive search

2006-11-25 Thread John Machin
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

Re: Local variables persist in functions?

2006-11-25 Thread Scott David Daniels
[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

Re: Dynamic function execution

2006-11-25 Thread John Machin
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

Re: Graph Data Structures

2006-11-25 Thread John Machin
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

Re: About alternatives to Matlab

2006-11-25 Thread sturlamolden
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

Re: Graph Data Structures

2006-11-25 Thread Nathan Harmston
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"

Re: case insensitive dictionary

2006-11-25 Thread tomasz . kulawik . groups . 1
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

Re: my small hashlib - using pythons hash-functions

2006-11-25 Thread Robert Kern
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

Re: case insensitive dictionary

2006-11-25 Thread vbgunz
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

Re: case insensitive dictionary

2006-11-25 Thread Rob Williscroft
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 ):

Re: Dynamic function execution

2006-11-25 Thread Cameron Laird
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'

Re: Graph Data Structures

2006-11-25 Thread John Machin
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

Re: Graph Data Structures

2006-11-25 Thread Robin Becker
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

Re: Graph Data Structures

2006-11-25 Thread Nathan Harmston
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

screen output problem

2006-11-25 Thread Ritesh Raj Sarraf
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

Re: a -very- case sensitive search

2006-11-25 Thread John Machin
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

Re: a -very- case sensitive search

2006-11-25 Thread Dustan
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

Re: a -very- case sensitive search

2006-11-25 Thread Dustan
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

Re: a -very- case sensitive search

2006-11-25 Thread Steven D'Aprano
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

Re: Graph Data Structures

2006-11-25 Thread John Machin
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

Re: a -very- case sensitive search

2006-11-25 Thread Dustan
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

case insensitive dictionary

2006-11-25 Thread John Henry
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

Re: Graph Data Structures

2006-11-25 Thread Nathan Harmston
> > 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

Re: my small hashlib - using pythons hash-functions

2006-11-25 Thread Mathias Panzenboeck
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

Re: a -very- case sensitive search

2006-11-25 Thread Goofy666
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

a -very- case sensitive search

2006-11-25 Thread Ola K
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

Re: Simple threading

2006-11-25 Thread Fredrik Lundh
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

Re: my small hashlib - using pythons hash-functions

2006-11-25 Thread Fredrik Lundh
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

Re: The Python Papers Edition One

2006-11-25 Thread Steven D'Aprano
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,

Re: my small hashlib - using pythons hash-functions

2006-11-25 Thread Mathias Panzenboeck
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. :) >

Re: The Python Papers Edition One

2006-11-25 Thread Fredrik Lundh
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

Re: my small hashlib - using pythons hash-functions

2006-11-25 Thread Paul Rubin
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

my small hashlib - using pythons hash-functions

2006-11-25 Thread Mathias Panzenboeck
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

Re: Invoking Python from Cygwin problem.

2006-11-25 Thread Ant
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

Re: Graph Data Structures

2006-11-25 Thread bearophileHUGS
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

Re: Return float problem.

2006-11-25 Thread John Machin
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 = >

Re: Graph Data Structures

2006-11-25 Thread Robin Becker
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

Re: How to Restart a thread

2006-11-25 Thread Rob Williscroft
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' >

Re: Try to stop thread Using flag

2006-11-25 Thread ger <[EMAIL PROTECTED]>
-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

Re: About alternatives to Matlab

2006-11-25 Thread Brian Blais
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

Re: Invoking Python from Cygwin problem.

2006-11-25 Thread Cousin Stanley
> 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

Re: Simple threading

2006-11-25 Thread Aahz
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

Re: The Python Papers Edition One

2006-11-25 Thread Noah Slater
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

Re: combining the path and fileinput modules

2006-11-25 Thread wo_shi_big_stomach
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: >> >

Re: Dynamic function execution

2006-11-25 Thread Irmen de Jong
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.

Re: Dynamic function execution

2006-11-25 Thread Fredrik Lundh
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

Re: The Python Papers Edition One

2006-11-25 Thread Paul Boddie
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,

Dynamic function execution

2006-11-25 Thread Andy Wu
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

Re: problem with global variable in a module

2006-11-25 Thread 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 > > > def aa():

Re: The Python Papers Edition One

2006-11-25 Thread Carl Banks
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

Return float problem.

2006-11-25 Thread YunBin Lee
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",

How to Restart a thread

2006-11-25 Thread many_years_after
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

Re: problem with global variable in a module

2006-11-25 Thread Duncan Booth
"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

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-25 Thread rony
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

Re: Graph Data Structures

2006-11-25 Thread Steven D'Aprano
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

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-25 Thread Fred Bayer
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

Re: Graph Data Structures

2006-11-25 Thread 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://networkx.lanl.gov/ i also reco

Re: Importing module of data dicts and constants

2006-11-25 Thread Fredrik Lundh
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

Re: Importing module of data dicts and constants

2006-11-25 Thread Fuzzyman
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

Re: The Python Papers Edition One

2006-11-25 Thread Fuzzyman
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

Re: Simple threading

2006-11-25 Thread Grant Edwards
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

Re: The Python Papers Edition One

2006-11-25 Thread Fuzzyman
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

Importing module of data dicts and constants

2006-11-25 Thread Nathan Harmston
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

Re: The Python Papers Edition One

2006-11-25 Thread Jerry Hill
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

problem with global variable in a module

2006-11-25 Thread hollowspook
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 -

Graph Data Structures

2006-11-25 Thread Nathan Harmston
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"

Re: Invoking Python from Cygwin problem.

2006-11-25 Thread Ant
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

Capture file descriptors while running an external program

2006-11-25 Thread jfigueiras
>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

Re: Try to stop thread Using flag

2006-11-25 Thread MC
http://candygram.sourceforge.net/ -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Try to stop thread Using flag

2006-11-25 Thread many_years_after
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

Re: Invoking Python from Cygwin problem.

2006-11-25 Thread Marc 'BlackJack' Rintsch
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

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-25 Thread Cameron Laird
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

Re: The Python Papers Edition One

2006-11-25 Thread Paul Rubin
"[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?

Re: The Python Papers Edition One

2006-11-25 Thread Paul Rubin
"[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

Re: reading id3 tags with python

2006-11-25 Thread Rabin Vincent
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

Re: Inheritance and recursion problem

2006-11-25 Thread Fredrik Lundh
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

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-25 Thread Stephan Kuhagen
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

Re: The Python Papers Edition One

2006-11-25 Thread Fredrik Lundh
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

Inheritance and recursion problem

2006-11-25 Thread Spiro
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):