Tim,
I copied your code exactly from my browser and ran it, so I don't
think there was a typo.
I could upgrade to Python 2.5.2 I suppose to compare and contrast, but
I need to support older
Python versions anyway so it's a bit academic...
Your speculation about garbage collection did set me goin
Hallöchen!
James writes:
>> # a.py
>> import b
>> # refer to b.b
>>
>> # b.py
>> import a
>> # refer to a.a
>
> Thanks Dan, but that still doesn't work for me I'm afraid...
>
> I renamed the modules avoid name overloading -- a.py is now:
> import b
>
> class A():
> print('b.b_mod:', b.b_mod)
> # a.py
> import b
> # refer to b.b
>
> # b.py
> import a
> # refer to a.a
Thanks Dan, but that still doesn't work for me I'm afraid...
I renamed the modules avoid name overloading -- a.py is now:
import b
class A():
print('b.b_mod:', b.b_mod)
b is now defined, but b.b_mod isn't:
File "m
On Sun, 22 Jun 2008 10:47:59 -0700, subeen wrote:
> You can avoid the problem using the following code:
> import socket
> timeout = 300 # seconds
> socket.setdefaulttimeout(timeout)
Yes, I tried that, too, but I forget what went wrong with it.
Perhaps, the socket kept up the handshake even thou
On Jun 26, 10:40 pm, James <[EMAIL PROTECTED]> wrote:
> Hi all,
> I'm looking for some advice dealing with cyclic, cross-package
> imports.
>
> I've created the following demo file structure:
> ./a/__init__.py
> ./a/a.py
> ./b/__init__.py
> ./b/b.py
> ./main.py
>
> a.py imports a class from b.py an
Taygun Kekec wrote:
hi guys.
I would be glad to join your group because i want to learn deeper
python but i am frustrated of isolation too. It would provide
stimulation and encourage to study and will boost our desire to learn.
So count me in!
hello all,
I just started studying python myself a
Hi all,
I'm looking for some advice dealing with cyclic, cross-package
imports.
I've created the following demo file structure:
./a/__init__.py
./a/a.py
./b/__init__.py
./b/b.py
./main.py
a.py imports a class from b.py and vice versa, and main.py imports
them both.
However, because a.py has not
I installed python30 and so command prompt runs all pythonprograms
through that which i didnt want so i uninstalled it.
now i cant start any pythonprograms through the commandprompt.
how do I "rebind" python25 to luanch when claling .py-files from the
command prompt?
--
http://mail.python.org/mai
How difficult would it be to implement a system in python that would
warn if there are unnecessarily imported packages/modules/objects in
the code? I mean that when developing some code one frequently imports
stuff, deletes the import, changes stuff here and there, imports other
stuff, later decide
On Jun 26, 4:24 am, teh_sAbEr <[EMAIL PROTECTED]> wrote:
> Great! It works properly now but I have one more question, would
> anyone know how to get the changes to take effect immediately? Like
> some sort of Python way to force the desktop to reload? AFAIK the only
> way that'll happen is if I use
yardennis wrote:
Hi,
I need python moudles that can
auto install python 2.5 (web install or a EXE file)
auto download and install Firefox3 and Thunderbird 2
auto import from IE 6, 7 and OE 5,6 and Outlook
read contacts and emails from Thunderbird store
read Firefox 3 bookmarks, history, cooki
All,
So i'm just about to undertake my first real open source project,
and I'm looking for a bit of advice. There's an oilfield standard
called WITSML (Wellsite Information Transfer Standard Markup Language
- witsml.org), it's basically a collection of XML schemas and a spec
for an client-serve
defn noob wrote:
if start == end:
return path
if not self.dictionary.has_key(start):
if start not in self.dictionnary:
return None
for node in self.dictionary[start]:
if node not in path:
newpath = find_path
you where right!
thank you !
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 27, 10:45 am, [EMAIL PROTECTED] wrote:
> On Jun 26, 5:12 pm, John Machin <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jun 27, 10:01 am, [EMAIL PROTECTED] wrote:
>
> > > >You may like to read this:http://www.amk.ca/python/howto/regex/
>
> > > This is a good resource. Thank you.
> > > Someone else
Hello Python developers,
I have noticed something curious while I was investigating a problem
with the PyInstaller.
In my environment, the PyInstaller couldn't find TCL/TK installation
path even I have it.
I found the PyInstaller uses output from ldd to
find the a path to TCL/TK libraries.
But n
On Jun 26, 5:12 pm, John Machin <[EMAIL PROTECTED]> wrote:
> On Jun 27, 10:01 am, [EMAIL PROTECTED] wrote:
>
> > >You may like to read this:http://www.amk.ca/python/howto/regex/
>
> > This is a good resource. Thank you.
> > Someone else pointed out that I needed to change the
>
> > if reCheck == "
Terry Reedy:
> I believe
> wordlist = open('words.txt','r').read().split('\n')
> should give you the list in Python.
This looks better (but it keeps the newlines too. Untested. Python
2.x):
words = open("words.txt").readlines()
for i, word in enumerate(words):
if word.startswith("b"):
On Jun 26, 6:30 pm, Allen <[EMAIL PROTECTED]> wrote:
> Gandalf wrote:
> > Hi every one I'm looking for a good alternative db to replace sqlite
>
> > I'm using pySQlite3, And I tried to translate very big database from
> > Mysql to sqlite.
> > I generated through PHP a python script that insert 200
On Jun 27, 10:01 am, [EMAIL PROTECTED] wrote:
> >You may like to read this:http://www.amk.ca/python/howto/regex/
>
> This is a good resource. Thank you.
> Someone else pointed out that I needed to change the
>
> if reCheck == "None":
>
> to
>
> if reCheck == None: # removed the "s
"Somebody els
Terry Reedy wrote:
antar2 wrote:
Hello
Suppose I have a textfile (text1.txt) with following four words:
I see seven. Just say 'list of words'
Apple
balcony
cartridge
damned
paper
bold
typewriter
and I want to have a python script that prints the words following the
word starting with
On Jun 27, 6:32 am, [EMAIL PROTECTED] wrote:
> Hi
> I am a beginner on Python and have a problem..
>
> I have text file and reading it line by line and there are backspace
> characters in it like '\b' or anything you want like "#". I want to
> replace these chars. with Backspace action. I mean del
>You may like to read this: http://www.amk.ca/python/howto/regex/
This is a good resource. Thank you.
Someone else pointed out that I needed to change the
if reCheck == "None":
to
if reCheck == None: # removed the "s
This worked great! Thanks!
--JM
--
http://mail.python.org/mailman/listin
Gandalf wrote:
Hi every one I'm looking for a good alternative db to replace sqlite
I'm using pySQlite3, And I tried to translate very big database from
Mysql to sqlite.
I generated through PHP a python script that insert 200,000 records
to my sqlite db and took me more then 5 hours and managed
On Jun 27, 8:31 am, [EMAIL PROTECTED] wrote:
> Hi -
>
> I need help capturing the output of a RegEx search.
> I dont understand why this conditional fails.
>
> Here is the code:
>
> #= start snip
> ==
> #!/usr/local/bin/python
>
>
[EMAIL PROTECTED] wrote:
On 26 juin, 17:18, Allen <[EMAIL PROTECTED]> wrote:
I need a way to add a method to an existing instance, but be as close as
possible to normal instance methods.
def set_method(obj, func, name=None):
if not name:
name = func.__name__
setattr(obj, name, func.__g
On Jun 26, 3:22 pm, MRAB <[EMAIL PROTECTED]> wrote:
> Try something like:
>
> re.compile(r'.*?', re.DOTALL)
So you would pick up strings like "foo"? I doubt that is what oyster wants.
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 26, 11:07 am, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-06-26, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> >
> > Why not use an HTML parser instead?
> >
>
> Stating it differently: in order to correctly recognize HTML
> tags, you must use an HTML parser. Trying to write an HTML
> pa
Hi -
I need help capturing the output of a RegEx search.
I dont understand why this conditional fails.
Here is the code:
#= start snip
==
#!/usr/local/bin/python
import os
import re
dirName = '/home/user/bin/logs'
os.chdir(dir
On Jun 26, 7:26 pm, "David C. Ullrich" <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Cédric Lucantis <[EMAIL PROTECTED]> wrote:
>
>
>
> > Le Thursday 26 June 2008 15:53:06 oyster, vous avez écrit :
> > > that is, there is no TABLE tag between a TABLE, for example
> > > something w
antar2 wrote:
Hello
Suppose I have a textfile (text1.txt) with following four words:
I see seven. Just say 'list of words'
Apple
balcony
cartridge
damned
paper
bold
typewriter
and I want to have a python script that prints the words following the
word starting with the letter b (which w
To me, at least.
>>> urllib.unquote("content%28type%3D%2527Car%2527%29")
'content(type=%27Car%27)'
>>> urllib.unquote('content(type=%27Car%27)')
"content(type='Car')"
The quoted string is coming from a URL parameter parsed in a Google App
Engine request handler.
So right now I have to apply unqu
Devarajulu, Baskar (D.) wrote:
Hi,
I'm using Python and working for automation of testing ,I face error
when the script accessed TCP/IP Interface
COMM_TYPE = 1# Choose 1 - TCP IP Communication or 0 -
RS232 communication.
TCP_ip = '136.18.201.53' # the TCP IP addre
On Jun 26, 12:30 pm, [EMAIL PROTECTED] wrote:
> I wrote my own feed reader using feedparser.py but it takes about 14
> seconds to process 7 feeds (on a windows box), which seems slow on my
> DSL line. Does anyone see how I can optimize the script below? Thanks
> in advance, Bill
>
> # UTF-8
> impor
Something like this might do the trick:
import re
f = open("file.txt")
old_text = f.readlines()
f.close()
new_text = [re.sub(r'.\b', '', i) for i in old_text]
f = open("file_modified.txt", "w")
f.writelines(new_text)
I don't know how necessary the separate read and writes are, but it'll be
good
Hello
Suppose I have a textfile (text1.txt) with following four words:
Apple
balcony
cartridge
damned
paper
bold
typewriter
and I want to have a python script that prints the words following the
word starting with the letter b (which would be cartridge) or
differently put, a script that prints
On Jun 26, 3:30 pm, [EMAIL PROTECTED] wrote:
> I wrote my own feed reader using feedparser.py but it takes about 14
> seconds to process 7 feeds (on a windows box), which seems slow on my
> DSL line. Does anyone see how I can optimize the script below? Thanks
> in advance, Bill
>
> # UTF-8
> import
>
> > if start == end:
> > return path
> > if not self.dictionary.has_key(start):
>
>if start not in self.dictionnary:
>
> > return None
> > for node in self.dictionary[start]:
> > if node not in path:
> > newpa
class Graph(object):
where does anyone write like that? I've seen only examples like i have
written.
is the object then passed to init?
class Graph(object):
def __init__(self, dictionary):
self.structure = dictionary
or
class Graph(object):
def __init__(self, object):
Hi every one I'm looking for a good alternative db to replace sqlite
I'm using pySQlite3, And I tried to translate very big database from
Mysql to sqlite.
I generated through PHP a python script that insert 200,000 records
to my sqlite db and took me more then 5 hours and managed to insert
only
Hi
I am a beginner on Python and have a problem..
I have text file and reading it line by line and there are backspace
characters in it like '\b' or anything you want like "#". I want to
replace these chars. with Backspace action. I mean deleting the
previous char. and the \b char also. and writi
"ianitux" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> and see if that works? I'm not sure if quote() will convert the %20 into
>> +,
>> though, but it may.
>
> This is what quot do.
>
import urllib
u = urllib
u.quote(u.urlencode({'page': 'i', 'order': 'desc', 'st
On 26 jun, 15:53, "John Salerno" <[EMAIL PROTECTED]> wrote:
> "zowtar" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
>
> > urlencode({'page': i, 'order': 'desc', 'style': 'flex power'})
> > return:
> > page=1&order=desc&style=flex+power
>
> > but I want:
> > page=1&order=desc&styl
Thank you for the answers.
Now I understood how to call a function, let me ask you another
question.
configuration.cfg
---
[1234]
title: abcd
function: efgh
---
reading.py
-
I wrote my own feed reader using feedparser.py but it takes about 14
seconds to process 7 feeds (on a windows box), which seems slow on my
DSL line. Does anyone see how I can optimize the script below? Thanks
in advance, Bill
# UTF-8
import feedparser
rss = [
'http://feeds.feedburner.com/typepad/
The following is a simple complete example using the c python api to generate
callbacks from c to python. But when I run the c code I get a segfault in
PyInt_FromLong () (see below). Most of this example code was taken from pg
1478 of the 3rd edition python o'reilly book. I cannot see what I'
You will need this page to figure out the name of the device, and details on
how to access it. However it is not python specific.
http://people.freedesktop.org/~david/hal-spec/hal-spec.html
--
http://mail.python.org/mailman/listinfo/python-list
"Peter Otten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> if 0: 42
How Pythonic. ;-)
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 26, 11:48 am, ShashiGowda <[EMAIL PROTECTED]> wrote:
> Hey there i made a script to download all images from a web site but
> it runs damn slow though I have a lot of bandwidth waiting to be used
> please tell me a way to use urllib to open many connections to the
> server to download many p
"zowtar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> urlencode({'page': i, 'order': 'desc', 'style': 'flex power'})
> return:
> page=1&order=desc&style=flex+power
>
> but I want:
> page=1&order=desc&style=flex%20power
>
> and url.quote don't put the &'s and ='s
> any idea guys?
On Jun 26, 8:06 am, Roopesh <[EMAIL PROTECTED]> wrote:
> Thanks for the reply. I did testing in a clean system, were anti virus/
> spyware is not installed. It still gave this problem, in say 1 out of
> 1000 cases.
>
> By any chance would it be possible that the Windows OS has not
> completed writi
On Thu, 26 Jun 2008 11:20:01 -0500, Peter Pearson wrote:
> On 25 Jun 2008 15:20:04 GMT, Kirk <[EMAIL PROTECTED]> wrote:
[snip]
>> the following regular expression matching seems to enter in a infinite
>> loop:
[snip]
>> import re
>> text = ' MSX INTERNATIONAL HOLDINGS ITALIA srl (di seguito MSX IT
In article <[EMAIL PROTECTED]>,
Cédric Lucantis <[EMAIL PROTECTED]> wrote:
> Le Thursday 26 June 2008 15:53:06 oyster, vous avez écrit :
> > that is, there is no TABLE tag between a TABLE, for example
> > something with out table tag
> > what is the RE pattern? thanks
> >
> > the following is not
On 26 juin, 17:18, Allen <[EMAIL PROTECTED]> wrote:
> I need a way to add a method to an existing instance, but be as close as
> possible to normal instance methods.
def set_method(obj, func, name=None):
if not name:
name = func.__name__
setattr(obj, name, func.__get__(obj, type(obj)))
cl
John Dann wrote:
I'm learning Python using the Komodo Edit freeware code editor. One
thing I'm finding a little confusing is that the code completion lists
(what I would call Intellisense coming from a .Net background) are
often very incomplete, especially with imported classes like wx. It's
like
Hi,
I need python moudles that can
auto install python 2.5 (web install or a EXE file)
auto download and install Firefox3 and Thunderbird 2
auto import from IE 6, 7 and OE 5,6 and Outlook
read contacts and emails from Thunderbird store
read Firefox 3 bookmarks, history, cookies and password
Ca
On 2008-06-26, Stefan Behnel <[EMAIL PROTECTED]> wrote:
> oyster wrote:
>> that is, there is no TABLE tag between a TABLE, for example
>> something with out table tag
>> what is the RE pattern? thanks
>>
>> the following is not right
>> [^table]*?
>
> Why not use an HTML parser instead?
Stating i
John Salerno wrote:
> "Joshua Kugler" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> except:
>>pass
>>
>> is the usual technique there.
>
> Is there any other?
if 0: 42
Proof:
>>> def cp(pass_):
... return compile("try: 1/0\nexcept:\n %s" % pass_, "", "exec")
...
>>>
oyster wrote:
> that is, there is no TABLE tag between a TABLE, for example
> something with out table tag
> what is the RE pattern? thanks
>
> the following is not right
> [^table]*?
Why not use an HTML parser instead? Try lxml.html.
http://codespeak.net/lxml/
Stefan
--
http://mail.python.org/
John Salerno wrote:
"Joshua Kugler" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
except:
pass
is the usual technique there.
Is there any other?
Sure. Evaluating any side-effect free expression and ignoring the result
will work:
try:
# do somthing
except:
None
Tim Golden wrote:
geoffbache wrote:
Tim,
Unfortunately my previous message was premature, it seems your
workaround doesn't work
either on my system (Windows XP, Python 2.5.1) I get the following
printed out
Traceback (most recent call last):
File "C:\TextTest\processown.py", line 12, in
"Joshua Kugler" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> except:
>pass
>
> is the usual technique there.
Is there any other?
--
http://mail.python.org/mailman/listinfo/python-list
geoffbache wrote:
Tim,
Unfortunately my previous message was premature, it seems your
workaround doesn't work
either on my system (Windows XP, Python 2.5.1) I get the following
printed out
Traceback (most recent call last):
File "C:\TextTest\processown.py", line 12, in
os.remove ("filena
I typically use pass for a place holder.
try:
# Do some code here
var = 1 # For example
except:
pass
HTH,
Mark
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Ampedesign
Sent: Thursday, June 26, 2008 12:04 PM
To: python-list@pyt
On Jun 26, 10:08 am, Duncan Booth <[EMAIL PROTECTED]>
wrote:
> Ampedesign <[EMAIL PROTECTED]> wrote:
> > I'm trying to build a try/except case, and I want to have the except
> > function like such:
>
> > try:
> > # Do some code here
> > var = 1 # For example
> > except:
> >
zowtar <[EMAIL PROTECTED]> wrote:
> urlencode({'page': i, 'order': 'desc', 'style': 'flex power'})
> return:
> page=1&order=desc&style=flex+power
>
> but I want:
> page=1&order=desc&style=flex%20power
>
> and url.quote don't put the &'s and ='s
> any idea guys?
Why does it matter to you? The +
Ampedesign wrote:
> I'm trying to build a try/except case, and I want to have the except
> function like such:
>
> try:
> # Do some code here
> var = 1 # For example
> except:
> #Do nothing here
>
> The only problem is if I leave a comment only in the except block, I
>
I have a code that receives gps information from nodes and gives off
its own coordinates via radios connected by Ethernet. but the code
continues to run after receiving only 1 set of coordinates, how do i
get it to wait for multiple nodes to send before continuing
--
http://mail.python.org/mailman
Ampedesign <[EMAIL PROTECTED]> wrote:
> I'm trying to build a try/except case, and I want to have the except
> function like such:
>
> try:
> # Do some code here
> var = 1 # For example
> except:
> #Do nothing here
>
> The only problem is if I leave a comment only in th
On Jun 26, 10:06 am, Daniel Mahoney <[EMAIL PROTECTED]> wrote:
> On Thu, 26 Jun 2008 10:03:47 -0700, Ampedesign wrote:
> > I'm trying to build a try/except case, and I want to have the except
> > function like such:
>
> > try:
> > # Do some code here
> > var = 1 # For example
>
On Thu, 26 Jun 2008 10:03:47 -0700, Ampedesign wrote:
> I'm trying to build a try/except case, and I want to have the except
> function like such:
>
> try:
> # Do some code here
> var = 1 # For example
> except:
> #Do nothing here
>
> The only problem is if I leave a co
Ampedesign wrote:
I'm trying to build a try/except case, and I want to have the except
function like such:
try:
# Do some code here
var = 1 # For example
except:
#Do nothing here
try:
# Do some code here
var = 1 # For example
except:
pass
I'm trying to build a try/except case, and I want to have the except
function like such:
try:
# Do some code here
var = 1 # For example
except:
#Do nothing here
The only problem is if I leave a comment only in the except block, I
get an error back saying that the except
Here are a few little tools that I developed to do this kind of thing:
http://allmydata.org/trac/pyutil/browser/pyutil/pyutil/memutil.py
Regards,
Zooko
--
http://mail.python.org/mailman/listinfo/python-list
>> d = {}
>> exec source_code in d
>> some_name = d['some_name']
>
> This works quite well! I can't believe after googling for half on hour I
> didn't notice this "exec ... in ..." syntax.
> One more thing though, is there a way to access "some_name" as a
> attribute, instead as a dictionary:
>
>> d = {}
>> exec source_code in d
>> some_name = d['some_name']
>
> This works quite well! I can't believe after googling for half on hour I
> didn't notice this "exec ... in ..." syntax.
> One more thing though, is there a way to access "some_name" as a
> attribute, instead as a dictionary:
>
On Jun 26, 7:39 am, Cédric Lucantis <[EMAIL PROTECTED]> wrote:
> Le Thursday 26 June 2008 13:06:53 Rotlaus, vous avez écrit :
>
> > Hello,
>
> > lets assume i have some classes:
>
> > class A(object):
> > def __init__(self):
> > b = B()
>
> > class B(object):
> > def __init__(self)
Cheetah also allows you to embed Python code in the HTML.
On Thu, Jun 26, 2008 at 11:10 AM, John Salerno <[EMAIL PROTECTED]>
wrote:
> "John Salerno" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >I always have the desire to learn one thing well instead of split my
> >attention b
Thanks alot. I'm going to use this with few modifications to tailor it to my
needs.
Thumbs up!
> #!/usr/bin/env python
>
> ## VERSION 2
> ##
> ## changelog:
> ## - Uses inheritance from _Limited
> ## - Added _LimitedLong and llong
> ## - limit choose between int, long, and float
>
> class _Limite
On 25 Jun 2008 15:20:04 GMT, Kirk <[EMAIL PROTECTED]> wrote:
> Hi All,
> the following regular expression matching seems to enter in a infinite
> loop:
>
>
> import re
> text = ' MSX INTERNATIONAL HOLDINGS ITALIA srl (di seguito MSX ITALIA)
> una '
> re.findall('[^A-Z|0-9]*((?:[0
On 26 jun, 12:53, zowtar <[EMAIL PROTECTED]> wrote:
> urlencode({'page': i, 'order': 'desc', 'style': 'flex power'})
> return:
> page=1&order=desc&style=flex+power
>
> but I want:
> page=1&order=desc&style=flex%20power
>
> and url.quote don't put the &'s and ='s
> any idea guys?
Hi, a quick soluti
"John Salerno" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I always have the desire to learn one thing well instead of split my
>attention between several options, so I'm trying to decide which of these
>two to start learning. Are there any particular things I should look at
>w
geoffbache wrote:
Tim,
Unfortunately my previous message was premature, it seems your
workaround doesn't work
either on my system (Windows XP, Python 2.5.1) I get the following
printed out
Traceback (most recent call last):
File "C:\TextTest\processown.py", line 12, in
os.remove ("filena
urlencode({'page': i, 'order': 'desc', 'style': 'flex power'})
return:
page=1&order=desc&style=flex+power
but I want:
page=1&order=desc&style=flex%20power
and url.quote don't put the &'s and ='s
any idea guys?
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 26, 5:42 pm, [EMAIL PROTECTED] wrote:
> Cédric Lucantis:
>
> > PAT = re.compile('^[ ]*(public|protected|private)[ ]+([a-zA-Z0-9_]+)
> > [ ]+([a-zA-Z0-9_]+)[ ]+\((.*)\).*$')
> > ...
> > It might be hard to read but will avoid a lot of obscure parsing code.
>
> You can use the VERBOSE mode, to
Tim,
Unfortunately my previous message was premature, it seems your
workaround doesn't work
either on my system (Windows XP, Python 2.5.1) I get the following
printed out
Traceback (most recent call last):
File "C:\TextTest\processown.py", line 12, in
os.remove ("filename")
WindowsError:
Daniel Fetchinson wrote:
> Is there a way of making python execute the above whenever it starts
> up so that I don't have to type it all the time?
Create a script containing these statements, and specify its location with
the PYTHONSTARTUP environment variable. Your script will run whenever
pytho
Cédric Lucantis:
> PAT = re.compile('^[ ]*(public|protected|private)[ ]+([a-zA-Z0-9_]+)
> [ ]+([a-zA-Z0-9_]+)[ ]+\((.*)\).*$')
> ...
> It might be hard to read but will avoid a lot of obscure parsing code.
You can use the VERBOSE mode, to add comments and split that RE into
some lines.
I think th
Thanks Tim, very helpful again.
I've now reported this as http://bugs.python.org/issue3210
and implemented your suggested workaround.
Regards,
Geoff
On Jun 25, 9:19 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
> geoffbache wrote:
> > Am currently being very confused over the following code on Windo
[EMAIL PROTECTED] wrote:
Hello,
I'm trying to assign data into an array with the nonzero function.
There is my code.
from numarray import *
diff_temp=(logical_and(values[:,5] > -2,values[:,5] < 2)).nonzero()
Does that have something to do with the question below?
This command works fine
On Jun 26, 7:41 am, [EMAIL PROTECTED] wrote:
> Hello. I am a novice programmer and have a question
>
> I have a configuration file(configuration.cfg)
> I read this from reading.py using ConfigParser
> When I use ConfigParser.get() function, it returns a string.
> I want to call a function that has
I need a way to add a method to an existing instance, but be as close as
possible to normal instance methods. Using 'new' module or such code as
'def addfunc(...): def helper(...) .. setattr(...)' causes a cyclic
reference which requires using 'gc.collect' to release the object. Also
'new' is
Le Thursday 26 June 2008 16:41:27 [EMAIL PROTECTED], vous avez écrit :
> Hello. I am a novice programmer and have a question
>
> I have a configuration file(configuration.cfg)
> I read this from reading.py using ConfigParser
> When I use ConfigParser.get() function, it returns a string.
> I want to
Hello. I am a novice programmer and have a question
I have a configuration file(configuration.cfg)
I read this from reading.py using ConfigParser
When I use ConfigParser.get() function, it returns a string.
I want to call a function that has the same name as the string from
the configuration file.
Hi all,
Is it possible to get the hid code of any pressed key via python?
If anyone used such a thing before, i will be happy to get some clues.
--
Oğuz Yarımtepe
--
http://mail.python.org/mailman/listinfo/python-list
Le Thursday 26 June 2008 15:53:06 oyster, vous avez écrit :
> that is, there is no TABLE tag between a TABLE, for example
> something with out table tag
> what is the RE pattern? thanks
>
> the following is not right
> [^table]*?
The construct [abc] does not match a whole word but only one char, s
that is, there is no TABLE tag between a TABLE, for example
something with out table tag
what is the RE pattern? thanks
the following is not right
[^table]*?
--
http://mail.python.org/mailman/listinfo/python-list
Le Thursday 26 June 2008 14:11:35 [EMAIL PROTECTED], vous avez écrit :
> I've written up a little piece of code that isn't that foolproof to
> scan through a file (java presently) to find functions and then look
> for them throughout the document and output the name of the function,
> followed by h
Hello,
I'm trying to assign data into an array with the nonzero function.
There is my code.
from numarray import *
diff_temp=(logical_and(values[:,5] > -2,values[:,5] < 2)).nonzero()
This command works fine but when I apply the following,
values_matchup=values_Stumpf[diff_temp_Stumpf,:]
I have
I've written up a little piece of code that isn't that foolproof to
scan through a file (java presently) to find functions and then look
for them throughout the document and output the name of the function,
followed by how many times it appears and the lines it appears on.
What I was looking for w
1 - 100 of 130 matches
Mail list logo