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 writing to the file even after file.flush() and file.close()
is called?
But Python C-API[1] it's the main base for extent python with C/c++, and
this is not not threadsafe.? I dont understand
[1] http://docs.python.org/api/api.html
On Thu, Jun 26, 2008 at 4:49 AM, Benjamin <[EMAIL PROTECTED]>
wrote:
> On Jun 25, 9:05 am, Mirko Dziadzka <[EMAIL PROTECTED]> wrote:
> >
Btw, sorry it is [OT], I forgot to add the prefix, it is really not a post
tied to the language itself.
On Tue, Jun 24, 2008 at 1:24 PM, Marcelo de Moraes Serpa <
[EMAIL PROTECTED]> wrote:
> Hello list,
>
> In a next project of mine, I will need to implement some accounting and
> financial contro
Hello list,
In a next project of mine, I will need to implement some accounting and
financial control. It is not a full ERP, only the basic functions for
finances and accounting control. However, I have little to no experience in
this business domain (accounting and finances) but I really do need
I have never used the urllib class and I need to use it for an app I
am working on. I am wondering if anyone has any good sites that will
fill me in on it(especially the urllib.urlopen module). Or better yet,
an example of how you would submit a search term into the search field
on a site,
Dear Members of the group,
I have one function
def sum1(n):
a1=5
a2=6
a3=a1+a2
a4=a3+8
print "The First sum is"
print a3
print "The Second sum is"
print a4
Now, I want to do it in a way, a4 is calculated after a given time
interval of a3 -this is eas
2008/6/24 Alex Bryan <[EMAIL PROTECTED]>:
> I have never used the urllib class and I need to use it for an app I am
> working on. I am wondering if anyone has any good sites that will fill me in
> on it(especially the urllib.urlopen module). Or better yet, an example of
> how you would submit a sea
idiolect wrote:
> On Jun 25, 7:26 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
>> idiolect wrote:
>> > Hi all - Sorry to plague you with another newbie question from a
>> > lurker. Hopefully, this will be simple.
>>
>> > I have a list full of RGB pixel values read from an image. I want to
>> > tes
On Jun 26, 8:29 am, John Machin <[EMAIL PROTECTED]> wrote:
> (2) ALWAYS use a raw string for regexes; your \s* will match on lower-
> case 's', not on spaces
and should have written:
(2) ALWAYS use a raw string for regexes. <<<=== Big fat full stop
aka period.
but he was at the time only half-wa
I am exploring the use of python to drive the sound card to experiment with
tunings.
How easy is it to write (or is it already available) to write a function
chord which takes a (list of) frequencies and plays them?
--
http://mail.python.org/mailman/listinfo/python-list
klant a écrit :
do i need to call Graph.find_path?
>
g = Graph({'A': ['B', 'C'],
'B': ['C', 'D'],
'C': ['D'],
'D': ['C'],
'E': ['F'],
'F': ['C']})
g
<__main__.Graph instance at 0x01D74378>
g.find_all_paths('A', 'C')
Traceb
On Jun 26, 12:38 pm, "Steven Clark" <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 25, 2008 at 7:03 PM, John Machin <[EMAIL PROTECTED]> wrote:
> > On Jun 26, 9:00 am, "Steven Clark" <[EMAIL PROTECTED]> wrote:
> >> Can anyone explain to me why
> >> struct.pack('HB',1,2) gives 3 bytes, whereas struct.pack(
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 KE can't look far
I am having a problem where a long-running function will cause a
memory leak / balloon for reasons I cannot figure out. Essentially, I
loop through a directory of pickled files, load them, and run some
other functions on them. In every case, each function uses only local
variables and I even made
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 the Display Properties dialog box. The
Registry value is changed
On Jun 26, 5:19 am, Tom Davis <[EMAIL PROTECTED]> wrote:
> I am having a problem where a long-running function will cause a
> memory leak / balloon for reasons I cannot figure out. Essentially, I
> loop through a directory of pickled files, load them, and run some
> other functions on them. In ev
Thanks for your reply, I may dig out my really old Symbian phone and
try it out.
rod
--
http://mail.python.org/mailman/listinfo/python-list
Tom Davis wrote:
> I am having a problem where a long-running function will cause a
> memory leak / balloon for reasons I cannot figure out. Essentially, I
> loop through a directory of pickled files, load them, and run some
> other functions on them. In every case, each function uses only local
Hi,
The C-API uses references counts as well, so it is not threadsafe.
Matthieu
2008/6/26 Pau Freixes <[EMAIL PROTECTED]>:
> But Python C-API[1] it's the main base for extent python with C/c++, and
> this is not not threadsafe.? I dont understand
>
> [1] http://docs.python.org/api/api.html
>
> O
Thanks for the help.
At present I have modified the poplib code as follows (In POP3 and
POP3_SSL classes): Is it the correct way?
def __init__(self, host, port = POP3_PORT):
self.host = host
self.port = port
msg = "getaddrinfo returns an empty list"
self.sock =
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 pics simultaneously Any off question
suggestions are also ok...
-
It is so funny that the official GUI lib for python is Tkinter, but I
cannot find an articles which explains indetail how can we use
thounsands of Tcl/Tk widget in Tkinter.
For example, I have download the dll at
http://www.hwaci.com/sw/tkhtml/index.html, renamed it to tkhtml12.dll
and put it in
Hi
Ok, if I understand between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS
is not possible use a C/Python api functions ?
Sorry, but when thread enter another time with Py_END_ALLOW_THREADS this
thread enter to competition to lock GIL ?
Thks
Thks
On Thu, Jun 26, 2008 at 12:16 PM, Matthieu
ShashiGowda 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 pics simultaneously Any off question
suggest
Hello,
lets assume i have some classes:
class A(object):
def __init__(self):
b = B()
class B(object):
def __init__(self):
c = C()
class C(object):
def __init__(self):
pass
and now i wanna do something like this:
a=A()
c=getattr(a, 'b.c')
I know this doesn'
Rotlaus wrote:
Hello,
lets assume i have some classes:
[...]
a=A()
c=getattr(a, 'b.c')
I know this doesn't work, but what can i do to get this or a similar
functionality to get it work for this sample and for even more nested
classes?
Just recursively apply the getattr(), like this:
class A
> However, I assumed that calls to (thread safe) C Library functions
> release the global interpreter lock.
This is mainly applicable to external C libraries. The interface to
them may not be thread-safe; anything that uses the Python API to
create/manage Python objects will require use of the GI
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):
> c = C()
>
note you're just defining some local variables here, should
[EMAIL PROTECTED] wrote:
> Dear All,
>
> I have try to use the py2exe to compile the DLL file
>
> first i write the simple python script "test01.py":
> def test001():
> return 1
>
> then write the setup.py:
> # setup.py
> from distutils.core import setup
> import py2exe
> import sys
>
> if
Drawing a large graph like this is not
very insightful by itself, and doing this well
is still an art form.
Many cool visualizations, and all
very domain and question dependent,
can be found at
http://www.visualcomplexity.com/vc/
You can also search on flickr for network
and graph drawing.
Much o
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
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
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
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 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
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
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.
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
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
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
[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
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
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
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
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:
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
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
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
"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
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
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
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
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
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)
>> 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:
>
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
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
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
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
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
>
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
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 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
>
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 +
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:
> >
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
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
"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
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
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
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?
if 0: 42
Proof:
>>> def cp(pass_):
... return compile("try: 1/0\nexcept:\n %s" % pass_, "", "exec")
...
>>>
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
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
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
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
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 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
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
"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, 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
"Peter Otten" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> if 0: 42
How Pythonic. ;-)
--
http://mail.python.org/mailman/listinfo/python-list
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
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'
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/
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
-
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
"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
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
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
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):
>
> > 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
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
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
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
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
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
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
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
1 - 100 of 130 matches
Mail list logo