On Sep 17, 8:04 pm, Peter Pearson <[EMAIL PROTECTED]> wrote:
> On Wed, 17 Sep 2008 05:28:05 -0700 (PDT), sui <[EMAIL PROTECTED]> wrote:
> > On Sep 17, 5:04 pm, sui <[EMAIL PROTECTED]> wrote:
> >> this is my code
>
> >> import sys, os, glob, datetime, time
> >> import smtplib
> >> ## Parameters for
I am new to python and am wondering. When I create a class, with 'def'
functions and if this class is instantiated say 50 times. Does this mean
that all the 'def' functions code within the class is duplicated for each
instance?
Can someone give me a short and simple answer as to what happens in
Hi all
This is not strictly a Python question, but as I am writing in Python,
and as I know there are some XML gurus on this list, I hope it is
appropriate here.
XML-schemas are used to define the structure of an xml document, and
to validate that a particular document conforms to the schema. The
On Sep 17, 5:56 pm, Lee Harr <[EMAIL PROTECTED]> wrote:
> I have a class with certain methods from which I want to select
> one at random, with weighting.
>
> The way I have done it is this
>
> import random
>
> def weight(value):
> def set_weight(method):
> method.weight = value
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On behalf of the Python development team and the Python community, I
am happy to announce the second and final planned release candidate
for Python 2.6, as well as the first release candidate for Python 3.0.
These are release candidates, so whil
On Wed, 17 Sep 2008 20:34:02 -0700, Mensanator wrote:
> And technically, weeks begin on Sunday, not Monday, but business likes
> to think of Monday as day 0 of the week and it doesn't conflict with any
> prior date format.
There's no "technically" about it. It's an arbitrary starting point, and
akineko wrote:
> Again, thank you for many postings to my question.
> I have reviewed solutions provided.
> Well, I like the named Mutex solution under Windows.
> That is a clean and straight-forward approach to the challenge.
> (I cannot believe that I'm saying good thing about Windows ;-) )
>
>
On Sep 17, 8:04 pm, Peter Pearson <[EMAIL PROTECTED]> wrote:
> On Wed, 17 Sep 2008 05:28:05 -0700 (PDT), sui <[EMAIL PROTECTED]> wrote:
> > On Sep 17, 5:04 pm, sui <[EMAIL PROTECTED]> wrote:
> >> this is my code
>
> >> import sys, os, glob, datetime, time
> >> import smtplib
> >> ## Parameters for
Again, thank you for many postings to my question.
I have reviewed solutions provided.
Well, I like the named Mutex solution under Windows.
That is a clean and straight-forward approach to the challenge.
(I cannot believe that I'm saying good thing about Windows ;-) )
Unfortunately, I'm living in
Hello:
I would like to generate a temporary output in my cgi-python script where
the user could see the actual program status while the program is still
running behind the web, and know how long approximately it could take, and
then finally display the final cgi-output. I have no idea how somethin
On Thu, 18 Sep 2008 02:26:29 +0430, Lee Harr wrote:
> I have a class with certain methods from which I want to select one at
> random, with weighting.
>
> The way I have done it is this
[snip]
You are coupling the weights, the actions, and the object which chooses
an action all in the on
On Sep 17, 10:20 pm, Keo Sophon <[EMAIL PROTECTED]> wrote:
> Fredrik Lundh wrote:
> > Henry Chang wrote:
>
> >> Instead of getting integers with weekday(), Monday == 0 ... Sunday ==
> >> 6; is there a way to get the actual names, such as "Monday ...
> >> Sunday"? I would like to do this without cre
Fredrik Lundh wrote:
Henry Chang wrote:
Instead of getting integers with weekday(), Monday == 0 ... Sunday ==
6; is there a way to get the actual names, such as "Monday ...
Sunday"? I would like to do this without creating a data mapping. :)
if you have a datetime or date object, you can use
On 2008-09-18, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote:
> In message
><[EMAIL PROTECTED]>, sui
> wrote:
>
>> Traceback (most recent call last):
>> File "mail5.py", line 21, in
>> session = smtplib.SMTP(SMTPserver,port)
>> File "/usr/local/lib/python2.5/smtplib.py", line 244, in __ini
I understood that HTTPError objects always have a read method, so they
can be treated as if they were a webpage. E.g. something like this
simplified snippet:
address = 'http://www.yahoo.com/spamspamspamspamspam'
try:
conn = urllib2.urlopen(address)
except urllib2.HTTPError, e:
conn = e
I tested it again and found that the behaviour is a little different
from what I mentioned previously in the mailchain.
The item is working perfectly the first time around. Now if I close
the application and run it again (which was what I did earlier), if
that application system menu is already mod
On Sep 17, 6:06 pm, greg <[EMAIL PROTECTED]> wrote:
> Aaron "Castironpi" Brady wrote:
> > Even a function created from raw bytecode string can't do anything
> > without __import__ or 'open'.
>
> Not true:
>
> for cls in (1).__class__.__bases__[0].__subclasses__():
> if cls.__name__ == "file
In message
<[EMAIL PROTECTED]>, sui
wrote:
> Traceback (most recent call last):
> File "mail5.py", line 21, in
> session = smtplib.SMTP(SMTPserver,port)
> File "/usr/local/lib/python2.5/smtplib.py", line 244, in __init__
> (code, msg) = self.connect(host, port)
> File "/usr/local/li
On Sep 17, 6:09 pm, "Aaron \"Castironpi\" Brady"
<[EMAIL PROTECTED]> wrote:
> On Sep 17, 4:56 pm, Lee Harr <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a class with certain methods from which I want to select
> > one at random, with weighting.
(snip)
>
> > The problem I have now is that if I subclas
You might also want to paste the output into a pastbin such as dpaste.com
On Wed, Sep 17, 2008 at 10:58 AM, <[EMAIL PROTECTED]> wrote:
>
>kalin> mailman has been locking one list out. the web interface just
>kalin> hangs and it generates a bunch of locks. it seems that it can not
>ka
Aaron "Castironpi" Brady wrote:
Even a function created from raw bytecode string can't do anything
without __import__ or 'open'.
Not true:
for cls in (1).__class__.__bases__[0].__subclasses__():
if cls.__name__ == "file":
F = cls
F(my_naughty_path, "w").write(my_naughty_data)
On Sep 17, 4:56 pm, Lee Harr <[EMAIL PROTECTED]> wrote:
> I have a class with certain methods from which I want to select
> one at random, with weighting.
>
> The way I have done it is this
>
> import random
>
> def weight(value):
> def set_weight(method):
> method.weight = value
>
On Sep 17, 1:33 pm, Seb <[EMAIL PROTECTED]> wrote:
> I'm making a ssl server, but I'm not sure how I can verify the
> clients. What do I actually need to place in _verify to actually
> verify that the client cert is signed by me?
>
> 50 class SSLTCPServer(TCPServer):
> 51 keyFile = "sslce
> 1. when I commit a new release to PYPI, I can use stored data (by my
> browser: Name, package summary, keywords etc), but in the last line
> (classification) I had to chose all those lines from the very
> beginning, moreover, if I click at one of them without pressing "CTRL"
> all my choices drop
[EMAIL PROTECTED] wrote:
On Sep 17, 1:21 pm, Todd Whiteman <[EMAIL PROTECTED]> wrote:
Don Spaulding wrote:
On Sep 16, 8:29 pm, Todd Whiteman <[EMAIL PROTECTED]> wrote:
I've put together a tutorial that shows off how to build a GUI
application using XULRunner (same architectural components as F
I have a class with certain methods from which I want to select
one at random, with weighting.
The way I have done it is this
import random
def weight(value):
def set_weight(method):
method.weight = value
return method
return set_weight
class A(object):
def a
On Tue, 16 Sep 2008 19:25:58 -0700 (PDT)
Fett <[EMAIL PROTECTED]> wrote:
> # SciPy -- http://www.scipy.org - supposedly has this, but as I said,
> I can't find any mention of it anywhere but on the site you linked.
I found OpenOpt on the site:
http://scipy.org/scipy/scikits/wiki/MILP
I downloade
Todd Whiteman <[EMAIL PROTECTED]> said :
> I've put together a tutorial that shows off how to build a GUI
> application using XULRunner (same architectural components as Firefox
> uses) that can be used in conjunction with the Python programming
> language.
> The tutorial covers how to build a
Hello,
I am trying to parse a shared config file which doesn't contail section
headers. Is there a way I can still use ConfigParser()? If not what is a
widely used parser available?
Thanks,
Ron
--
http://mail.python.org/mailman/listinfo/python-list
On 17 Set, 19:33, Seb <[EMAIL PROTECTED]> wrote:
> I'm making a ssl server, but I'm not sure how I can verify the
> clients. What do I actually need to place in _verify to actually
> verify that the client cert is signed by me?
>
> 50 class SSLTCPServer(TCPServer):
> 51 keyFile = "sslcert
On Sep 17, 4:43 am, Paul Boddie <[EMAIL PROTECTED]> wrote:
> On 17 Sep, 07:26, "Aaron \"Castironpi\" Brady" <[EMAIL PROTECTED]>
> wrote:
>
> > Sometimes questions come up on here about unpickling safely and
> > executing foreign code. I was thinking a minimum install that didn't
> > even have acce
Oh, and Google's single sign-on sucks eggs :-|
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 17, 1:21 pm, Todd Whiteman <[EMAIL PROTECTED]> wrote:
> Don Spaulding wrote:
> > On Sep 16, 8:29 pm, Todd Whiteman <[EMAIL PROTECTED]> wrote:
> >> I've put together a tutorial that shows off how to build a GUI
> >> application using XULRunner (same architectural components as Firefox
> >> us
Hartmut Goebel wrote:
Terry Reedy schrieb:
One way to learn the meaning of some of the numerous attributes and
values is to create a file with the wanted features with OOo, save,
unzip, and examine the xml to see which tags are used for which features.
The API docs are a bit hidden on the we
hi all,
1. when I commit a new release to PYPI, I can use stored data (by my
browser: Name, package summary, keywords etc), but in the last line
(classification) I had to chose all those lines from the very
beginning, moreover, if I click at one of them without pressing "CTRL"
all my choices drops
Mark Thomas wrote:
> On Sep 17, 5:29 am, Jonathan Fine <[EMAIL PROTECTED]> wrote:
>> I want to generate test data from an XML schema. I've had a quick look
>> at existing tools (such as minixsv and amara) but from what I've seen
>> they don't seem to help.
> ...
>> A tool that provides a nice Pyth
Dear Developers,IT Professionals,
"We are building a online encyclopedia for developers" and we need
your contribution to make it even better. So here is our invitation
for those who happy to contribute as editors, readers for the project.
If you have written a tutorial/article/code snippet and w
hi,
Canned wrote:
Steven D'Aprano schreef:
Your "ascii_to_bin" method tries to do too much in one method. You should
split the functionality into small, self-contained pieces, then combine
them. And frankly, once you got to the part where you started popping and
inserting, my brain melted. Yo
I need to write a feed parser that takes a url for any Atom or RSS
feed and transform it into an Atom feed. I done the transformation
part but I want to support conditional HTTP requests. I have not been
able to find any examples that show:
1. How to read the Last_Modified or ETag header value
Don Spaulding wrote:
On Sep 16, 8:29 pm, Todd Whiteman <[EMAIL PROTECTED]> wrote:
I've put together a tutorial that shows off how to build a GUI
application using XULRunner (same architectural components as Firefox
uses) that can be used in conjunction with the Python programming language.
The
On Wed, Sep 17, 2008 at 2:18 PM, Dude <[EMAIL PROTECTED]> wrote:
> Hi All,
> I am fairly new to Python programming. I am working on a small
> Tkinter project and I think I am missing something, maybe you can
> help. The two lines below is all I have related to the Label widget:
>
> lblServer = Tk
kalin> mailman has been locking one list out. the web interface just
kalin> hangs and it generates a bunch of locks. it seems that it can not
kalin> write to a log but not sure which one. errors are like:
...
You'd probably be better off asking about Mailman problems on
[EMAIL PR
Grant Edwards wrote:
> On 2008-09-17, r0g <[EMAIL PROTECTED]> wrote:
>
>> [EMAIL PROTECTED]:~/Desktop/py$ ls
>> kickstart.py kickstart.py~ kicktest.py kicktest.py~
>> [EMAIL PROTECTED]:~/Desktop/py$ kickstart.py
>> bash: kickstart.py: command not found
>>
>> Any ideas why this might be?
>
> Ye
Aaran,
Thanks for your input. Your examples gave me other alternatives for what I
wanted to do and it seems to work.
Thanks all for your help.
On Sep 16, 2:48 pm, "Karl Kobata" http://mail.python.org/mailman/listinfo/python-list> > wrote:
> Hi Fredrik,
>
> This is exactly what I need. Th
On Sep 16, 8:29 pm, Todd Whiteman <[EMAIL PROTECTED]> wrote:
> I've put together a tutorial that shows off how to build a GUI
> application using XULRunner (same architectural components as Firefox
> uses) that can be used in conjunction with the Python programming language.
>
> The tutorial covers
hi all...
mailman has been locking one list out.
the web interface just hangs and it generates a bunch of locks. it seems
that it can not write to a log but not sure which one. errors are like:
ep 17 05:09:12 2008 (18481) musiclist.lock lifetime has expired, breaking
Sep 17 05:09:12 2008 (1848
Fredrik Lundh wrote:
> Usman Ajmal wrote:
>
>> Is there any function for reading a file while ignoring *\n* occuring
>> in the file?
>
> can you be a bit more precise? are we talking about text files or
> binary files? how do you want to treat any newlines that actually
> appear in the file?
>
Steven D'Aprano schreef:
> Your "ascii_to_bin" method tries to do too much in one method. You should
> split the functionality into small, self-contained pieces, then combine
> them. And frankly, once you got to the part where you started popping and
> inserting, my brain melted. You are making
I'm making a ssl server, but I'm not sure how I can verify the
clients. What do I actually need to place in _verify to actually
verify that the client cert is signed by me?
50 class SSLTCPServer(TCPServer):
51 keyFile = "sslcert/server.key"
52 certFile = "sslcert/server.crt"
53
Sean DiZazzo wrote:
> On Sep 15, 11:29 pm, Virgil Stokes <[EMAIL PROTECTED]> wrote:
>> I have been using Python for a short time and I find it a very flexible
>> language, and easy to learn and use. I have also worked some with PyGame
> Then again, you mention sliders, knobs, etc. I don't think T
Hi All,
I am fairly new to Python programming. I am working on a small
Tkinter project and I think I am missing something, maybe you can
help. The two lines below is all I have related to the Label widget:
lblServer = Tkinter.Label(serverFrame, text='Server:', fg='black',
justify='left', relief=
Babloo wrote:
> On Sep 16, 7:38 am, Benjamin <[EMAIL PROTECTED]> wrote:
>> On Sep 15, 5:15 am, Babloo <[EMAIL PROTECTED]> wrote:
>>
>>> Hi everyone,
>>> i wanted to implement a client- server connection
>>> and transfer a file over the network. i was able to implement a normal
>>>
On Wed, 17 Sep 2008 18:02:15 +0200, Canned wrote:
> Hi,
> I'm trying to write a class that can convert ascii to binary and vice
> versa. I write my class based on this function I've found on internet
[...]
> That works perfectly, but when I try to implement it in my own class it
> gives me alot
On 2008-09-17, r0g <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED]:~/Desktop/py$ ls
> kickstart.py kickstart.py~ kicktest.py kicktest.py~
> [EMAIL PROTECTED]:~/Desktop/py$ kickstart.py
> bash: kickstart.py: command not found
>
> Any ideas why this might be?
Yes.
> A path thing?
Yes.
Linux sy
Michael Palmer wrote:
> On Sep 15, 3:04 pm, Matias Surdi <[EMAIL PROTECTED]> wrote:
>> aditya shukla escribió:
>>
>>> How can we convert .py files to batch files? is there any library for this?
>>> Aditya
>>>
> On Linux, you w
cnb wrote:
a = parsing.unserialize("C:/users/saftarn/desktop/twok.txt")
Traceback (most recent call last):
File "C:\Python25\lib\pickle.py", line 1126, in find_class
klass = getattr(mod, name)
when reporting a traceback, please include the error message that
follows after the stack
Lie wrote:
Any advice about this matter would be very appreciated.
Thanks in advance.
It'd be easier to make a one-char version of ascii2bin then make the
string version based on the one-char version.
And it'd be a lot easier to read your posts if you trimmed away at least
some of the origi
>>> a = parsing.unserialize("C:/users/saftarn/desktop/twok.txt")
Traceback (most recent call last):
File "", line 1, in
File "C:\Python25\Progs\NetflixRecSys\parsing.py", line 91, in
unserialize
return pickle.load(open(filename, 'r'))
File "C:\Python25\lib\pickle.py", line 1370, in load
On Sep 17, 11:02 pm, Canned <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm trying to write a class that can convert ascii to binary and vice
> versa. I write my class based on this function I've found on internet
>
>
>
>
>
> > def ascii_to_bin(char):
> > ascii = ord(char)
> > bin = []
>
> > while (ascii >
Hi,
I'm trying to write a class that can convert ascii to binary and vice
versa. I write my class based on this function I've found on internet
> def ascii_to_bin(char):
> ascii = ord(char)
> bin = []
>
> while (ascii > 0):
> if (ascii & 1) == 1:
> bin.append("1")
> else:
> bin.append("0")
> ascii
On Sep 16, 3:20 pm, Armin <[EMAIL PROTECTED]> wrote:
> John Machin wrote:
> > On Sep 16, 6:45 am, Armin <[EMAIL PROTECTED]> wrote:
>
> >> Yes, but this is very unconvenient.
> >> If d should reference the list a extended with a single list element
> >> you need at least two lines
>
> >> a.append(7)
My apologies to the respondents - I failed to screen my test cases
before kicking them out to the global python-list. but yes, the 'X'
character in my test case was a mistake on my part. I'll give group()
a shot.
ct
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
Assuming that you want to find runs of \u escapes, simply use
non-capturing parentheses:
pat = re.compile(u"(?:\\\u[0-9A-F]{4})")
Doesn't work for me:
pat = re.compile(u"(?:\\\u[0-9A-F]{4})")
it helps if you cut and paste the right line... here's a better v
On Wed, 17 Sep 2008 09:27:47 -0400, christopher taylor wrote:
> hello python-list!
>
> the other day, i was trying to match unicode character sequences that
> looked like this:
>
> \\uAD0X...
It is not clear what this is supposed to be. Is that matching a literal
pair of backslashes, or a sing
On Wed, 17 Sep 2008 05:28:05 -0700 (PDT), sui <[EMAIL PROTECTED]> wrote:
> On Sep 17, 5:04 pm, sui <[EMAIL PROTECTED]> wrote:
>> this is my code
>>
>> import sys, os, glob, datetime, time
>> import smtplib
>> ## Parameters for SMTP session
>> port=587
>> SMTPserver= 'smtp.gmail.com'
>> SMTPuser= '
On Wed, 17 Sep 2008 15:56:31 +0200, Fredrik Lundh wrote:
> Assuming that you want to find runs of \u escapes, simply use
> non-capturing parentheses:
>
> pat = re.compile(u"(?:\\\u[0-9A-F]{4})")
Doesn't work for me:
>>> pat = re.compile(u"(?:\\\u[0-9A-F]{4})")
UnicodeDecodeError: 'unico
Simon Hibbs a écrit :
Great contributions, thanks both of you. I'm self-tought when it comes
to Python and OOP and I haven't yet grown an intuitive feel for how to
do things sensibly.
While part of the OO design patterns are mostly workaround for lack of
dynamism in languages like C++ or Java,
Ben Finney a écrit :
Simon Hibbs <[EMAIL PROTECTED]> writes:
Orriginaly I thought I'd need to have a hull object which contains
component objects, but the component objects need access to members
of the hull object (e.g. the hull size) so that looks messy to
implement.
Was it as messy as this
Mark Thomas wrote:
Has anyone seen anything that might help generate test data from a schema?
I'm unaware of anything in Python, but Eclipse can generate sample
documents from a schema:
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.wst.xmleditor.doc.user/topics/tcrexxsd.html
As
christopher taylor wrote:
my issue, is that the pattern i used was returning:
[ '\\uAD0X', '\\u1BF3', ... ]
when i expected:
[ '\\uAD0X\\u1BF3', ]
the code looks something like this:
pat = re.compile("(\\\u[0-9A-F]{4})+", re.UNICODE|re.LOCALE)
#print pat.findall(txt_line)
results = pat.find
Terry Reedy schrieb:
One way to learn the meaning of some of the numerous attributes and
values is to create a file with the wanted features with OOo, save,
unzip, and examine the xml to see which tags are used for which features.
The API docs are a bit hidden on the webpage. Here is the link
On Wed, 17 Sep 2008 09:27:47 -0400, christopher taylor wrote:
> the other day, i was trying to match unicode character sequences that
> looked like this:
>
> \\uAD0X...
>
> my issue, is that the pattern i used was returning:
>
> [ '\\uAD0X', '\\u1BF3', ... ]
>
> when i expected:
>
> [ '\\uAD0X
hello python-list!
the other day, i was trying to match unicode character sequences that
looked like this:
\\uAD0X...
my issue, is that the pattern i used was returning:
[ '\\uAD0X', '\\u1BF3', ... ]
when i expected:
[ '\\uAD0X\\u1BF3', ]
the code looks something like this:
pat = re.compile
Great contributions, thanks both of you. I'm self-tought when it comes
to Python and OOP and I haven't yet grown an intuitive feel for how to
do things sensibly.
Simon
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 17, 6:50 am, Simon Hibbs <[EMAIL PROTECTED]> wrote:
> I'm rewriting a design application for a science fiction game. in it
> you design your own starships. Each component has a mass and cost, but
> the mass can either be fixed or it can be expressed as a percentage of
> the tonnage of the ov
On Sep 17, 5:29 am, Jonathan Fine <[EMAIL PROTECTED]> wrote:
> Hello
>
> I want to generate test data from an XML schema. I've had a quick look
> at existing tools (such as minixsv and amara) but from what I've seen
> they don't seem to help.
...
> A tool that provides a nice Python interface to n
A. Joseph wrote:
I want to search through a directory and re-arrange all the files into e.g
All .doc files go into MS WORD folder, all .pdf files goes into PDF Folder.
I`m thinking of doing something with the os.walk(path) method from os
module, I need some ideal how the algorithm should look
2008/9/17 A. Joseph <[EMAIL PROTECTED]>:
> I want to search through a directory and re-arrange all the files into e.g
>
> All .doc files go into MS WORD folder, all .pdf files goes into PDF Folder.
>
> I`m thinking of doing something with the os.walk(path) method from os
> module, I need some ideal
Simon Hibbs <[EMAIL PROTECTED]> writes:
> Orriginaly I thought I'd need to have a hull object which contains
> component objects, but the component objects need access to members
> of the hull object (e.g. the hull size) so that looks messy to
> implement.
Was it as messy as this::
class Shi
Hi,
I want to search through a directory and re-arrange all the files into e.g
All .doc files go into MS WORD folder, all .pdf files goes into PDF Folder.
I`m thinking of doing something with the os.walk(path) method from os
module, I need some ideal how the algorithm should look like, maybe
rec
On Sep 17, 5:04 pm, sui <[EMAIL PROTECTED]> wrote:
> this is my code
>
> import sys, os, glob, datetime, time
> import smtplib
> ## Parameters for SMTP session
> port=587
> SMTPserver= 'smtp.gmail.com'
> SMTPuser= '[EMAIL PROTECTED]'
> pw= 'fill in here'
> SENDER= SMTPuser
>
> ## Message details
>
On Aug 7, 12:40 am, mmm <[EMAIL PROTECTED]> wrote:
> On Aug 5, 12:18 am, Tim Roberts <[EMAIL PROTECTED]> wrote:
>
> > >But when using smtp.gmail.com as the server I learned that any
> > >@gmail.com address in the Cc: text block would
> > >receive mail even if I changed the code to have the RECEIVE
Thanks a lot, Tim and Diez, Merci Beaucoup!!
I strongly suspect the error was caused by the memory operation. I
made some modifications only on PolygonMesh definition. And now I have
no annoying warnings.
PolygonMesh *new_PolygonMesh()
{
PolygonMesh *p = new PolygonMesh;
// p = (PolygonMesh *)
On Sep 17, 6:17 am, smalltalk <[EMAIL PROTECTED]> wrote:
> >>> import shelve
> >>> sf = shelve.open('e:/abc.db')
> >>> for i in range(1):
>
> ... sf[str(i)]=i
> ...>>> sf.close()
> >>> sf = shelve.open('e:/abc.db')
> >>> sf.clear()
> >>> sf
>
> {}
> the abc.db is always 312k though i have u
smalltalk> the abc.db is always 312k though i have use clear(), how can
smalltalk> i shrink the space?
You really can't without deleting the file. Hash file implementations trade
off file size against improve key lookup performance. Similar tradeoffs are
made in the implementation of Py
this is my code
import sys, os, glob, datetime, time
import smtplib
## Parameters for SMTP session
port=587
SMTPserver= 'smtp.gmail.com'
SMTPuser= '[EMAIL PROTECTED]'
pw= 'fill in here'
SENDER= SMTPuser
## Message details
FROM= SENDER
TO= '[EMAIL PROTECTED]'
CC=FROM
##RECEIVERS= (TO, CC) ##pro
I'm rewriting a design application for a science fiction game. in it
you design your own starships. Each component has a mass and cost, but
the mass can either be fixed or it can be expressed as a percentage of
the tonnage of the overall ship.
Orriginaly I thought I'd need to have a hull object wh
To my great surprise, this approach was often considerably _slower_ to
complete than the original program (up to ~40% depending on which modifiers
were used), despite producing initial results more quickly.
You may be interested in reading through this thread
http://mail.python.org/pipermail/
Thanks Tim. That rstrip('\r\n') worked. :)
On Wed, Sep 17, 2008 at 10:45 AM, Tim Chase
<[EMAIL PROTECTED]>wrote:
> Is there any function for reading a file while ignoring *\n* occuring in
>>> the file?
>>>
>>
>> can you be a bit more precise? are we talking about text files or binary
>> files?
Hi,
I'm writing a Python program using combinatorial algorithms to generate music.
It originally was of this general form:
First, a combinatorial function producing a list of sub-lists, then:
For each sub-list in the list:
Filter/modifier A, then append modified sub-list to new list,
> > http://wiki.python.org/moin/NumericAndScientific/Libraries
> >
> > Scroll down.
>
> Yes, many of those seem to be deprecated, without destinations to
> links, most are poorly or not documented at all. The few that are, I
> still can't get running. Of those 254, I think I have tried at least
>
I am talking about text file which contain multiple lines e.g following
three lines are there in my textfile.txt
this is python list
where we get support
from geeks
I want
sentence = this is python list where we get support from geeks
whereas when i use simple read() i get something like this
Is there any function for reading a file while ignoring *\n* occuring in
the file?
can you be a bit more precise? are we talking about text files or
binary files? how do you want to treat any newlines that actually
appear in the file?
I believe the OP is referencing this behavior:
for l
I am talking about text file which contain multiple lines e.g following
three lines are there in my textfile.txt
this is python list
where we get support
from geeks
I want
sentence = this is python list where we get support from geeks
whereas when i use simple read() i get something like this
Mike Driscoll <[EMAIL PROTECTED]> writes:
> On Sep 16, 4:57 am, Benjamin Sigonneau <[EMAIL PROTECTED]>
> wrote:
>> Hi all,
>>
>> I'm a complete beginner in python and in GUI designing, yet I'm writing
>> a GUI using python and Tkinter. I need it to be available both in french
>> and english, so I
>>> import shelve
>>> sf = shelve.open('e:/abc.db')
>>> for i in range(1):
... sf[str(i)]=i
...
>>> sf.close()
>>> sf = shelve.open('e:/abc.db')
>>> sf.clear()
>>> sf
{}
the abc.db is always 312k though i have use clear(), how can i shrink
the space?
--
http://mail.python.org/mailman/listin
Usman Ajmal wrote:
Is there any function for reading a file while ignoring *\n* occuring in
the file?
can you be a bit more precise? are we talking about text files or
binary files? how do you want to treat any newlines that actually
appear in the file?
--
http://mail.python.org/mailma
On Sep 16, 7:03 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Now comes the troubled bit...I now look for similar source code for
> > Python extensions Numpy and Scipy but the source code and directories
> > are not all obvious. Looks like these are normally built via ot
Hi.,
Is there any function for reading a file while ignoring *\n* occuring in the
file?
--
http://mail.python.org/mailman/listinfo/python-list
Anybody tried this port of Python to the iPhone?
http://www.modmyi.com/nativeapps/python-v251/
http://iphone.natetrue.com/
Hasn't been updated since July 2007. Maybe just a proof-of-concept? I'm
guessing it involves jailbreaking the phone.
Skip
--
http://mail.python.org/mailman/listinf
1 - 100 of 107 matches
Mail list logo