Grant Edwards [EMAIL PROTECTED] writes:
On 2005-04-21, Roy Smith [EMAIL PROTECTED] wrote:
Grant Edwards [EMAIL PROTECTED] wrote:
Sure, but what about the case where his program is on paper
tape and all he has for an editor is an ice pick?
Can't you emulate that in emacs with M-X
Tim Stone wrote:
I'm working on a module that will manipulate large blobs. I'm using a C
dll to allocate big blocks of memory, using PyMem_Malloc, which is
working quite well up until I try to manipulate a blob that exhausts
Python's heap.
how large is that?
I'm guessing that to increase the
Hello evryone
I am a newbie to python. I have a makefile which i can compile in
UNIX/LINUX, But i
I am planning to write a python script which actually does what my
MAKEFILE does. The make file is
#Makefile and some scripts to give output
#numbers
#Change till sign #END
var1:=564-574
a1 =
Willem Ligtenberg [EMAIL PROTECTED] wrote:
On Sun, 17 Apr 2005 02:16:04 +, William Park wrote:
Care to post more details?
The XML file I need to parse contains information about genes.
So the first element is a gene and then there are a lot sub-elements with
sub-elements. I only need
I have a web app that has been running just fine for several months under
Python 2.2.2.
We are preparing to upgrade the server to run Python 2.4.1.
However, part of my web app is throwing an error on this code (that has
previously worked without exception):
time.strftime(%Y-%m-%d, (Y, M, D,
Op 2005-04-21, Dan Bishop schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
Op 2005-04-21, Steve Holden schreef [EMAIL PROTECTED]:
[EMAIL PROTECTED] wrote:
...
Along the same lines, I think the REQUIREMENT that x[0] rather
than
x[1] be the first element of list x is a mistake. At least the
praba kar [EMAIL PROTECTED] writes:
Dear All,
In Php If I send a command to system function
then It will return 1 on success and 0 on failure. So
based upon that value I can to further work.
But In Python If I send a command to system
function then It will return 0 only for
praba kar wrote:
Dear All,
In Php If I send a command to system function
then It will return 1 on success and 0 on failure. So
based upon that value I can to further work.
But In Python If I send a command to system
function then It will return 0 only for both
conditions(success and
Greg Ewing wrote:
Steven Bethard wrote:
Gigi wrote:
I need access to a function object that corresponds to a frame object
in a certain case from inside the function.
Can you look up the code's co_name in the previous frame's locals?
You probably also need to check the previous frame's globals...
Hello!
I can't seem to get paths and variables working together:
import os
a = 'books'
os.chdir( '/test')
os.mkdir(/test/a)
the last line does not seem to work. os.mkdir(a) makes the directory
books, but i want this directory as a subdirectory of test.
I also tried: os.mkdir(/test/,a), and
Sheila King said unto the world upon 2005-04-22 02:45:
I have a web app that has been running just fine for several months under
Python 2.2.2.
We are preparing to upgrade the server to run Python 2.4.1.
However, part of my web app is throwing an error on this code (that has
previously worked
# [EMAIL PROTECTED] / 2005-04-22 00:13:05 -0700:
Hello!
I can't seem to get paths and variables working together:
import os
a = 'books'
os.chdir( '/test')
os.mkdir(/test/a)
the last line does not seem to work. os.mkdir(a) makes the directory
books, but i want this directory as a
--- Robert Kern [EMAIL PROTECTED] wrote:
praba kar wrote:
Dear All,
In Php If I send a command to system function
then It will return 1 on success and 0 on failure.
So
based upon that value I can to further work.
But In Python If I send a command to system
function
# [EMAIL PROTECTED] / 2005-04-22 08:35:33 +0100:
--- Robert Kern [EMAIL PROTECTED] wrote:
praba kar wrote:
In Php If I send a command to system function
then It will return 1 on success and 0 on failure.
So based upon that value I can to further work.
But In Python
praba kar wrote:
I agree above statement but When I delete a directory
os.system('rm -rf test')
0
if directory is not present then I again try to
delete
os.system('rm -rf test')
now this time also It will print
0
As Roman Neuhauser says, this is the correct behavior of the -f switch
for rm.
In
praba kar wrote:
I agree above statement but When I delete a directory
os.system('rm -rf test')
0
if directory is not present then I again try to
delete
os.system('rm -rf test')
now this time also It will print
0
so? if you read the rm man page, you'll find this little paragraph:
Max, thanks; that was helpful. Roman, your explanation was helpful as
well. Dan
--
http://mail.python.org/mailman/listinfo/python-list
Hello!
I was trying to create a program to search for the largest common
subsetstring among filenames in a directory, them move the filenames
to the substring's name. I have succeeded, with help, in doing so and
here is the code.
Thanks for your help!
--- Code ---
#This program was created
In article [EMAIL PROTECTED],
Terry Reedy [EMAIL PROTECTED] wrote:
Steven Bethard [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Ahh, ok. Now I understand. I think you could probably search the
python-dev archives and see why the decision was made as it was. For
pretty
On 21 Apr 2005 23:39:03 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Kindly suggest me some ideas/comments.
Why don't you make a start, and come back to us with whatever problems
you encounter? We're happy to help, but we aren't going to do it for
you.
Andrew Dalke's Wrapping command-line
On 4/22/05, Roman Neuhauser [EMAIL PROTECTED] wrote:
import os
a = 'books'
os.chdir( '/test')
os.mkdir(/test/a)
the last line does not seem to work. os.mkdir(a) makes the directory
books, but i want this directory as a subdirectory of test.
Ilpo == Ilpo Nyyssnen iny writes:
Ilpo James Stroud [EMAIL PROTECTED] writes:
Is it relevant that Python can produce compiled expressions? I
don't think that there is such a thing with Perl.
Ilpo The problem in python here is that it needs to always
Ilpo recompile the
I found this error message when I import pylab.
from pylab import *
Error message:
Microsoft Visual C++ Runtime Library
Assertion failed!
Program:c\python24\python.exe
File:CXX/cxx_extentions.cxx
Line:1031
Expression: ob_refcnt == 0
For information on how your program can cause an assertion
[EMAIL PROTECTED] wrote:
I am trying to prevent a user from resizing a frame beyond its
natural size as given by winfo_reqwidth and winfo_reqheight, without
any success. Can anyone make any suggestions, based on my code below?
Thanks!
from Tkinter import *
class Table(Frame):
def
Thanks for your reply
I started writing the script.. I have gone through documentation for
getopt
import string, getopt, sys
def usage():
print '''myscript.py -- uses getopt to recognize options
Options: -n -- No
-t -- T
-h -- help
-i -- i
-o --
[Sheila King]
I have a web app that has been running just fine for several months under
Python 2.2.2.
We are preparing to upgrade the server to run Python 2.4.1.
However, part of my web app is throwing an error on this code (that has
previously worked without exception):
On 22 Apr 2005 03:16:02 -0700, hue [EMAIL PROTECTED] wrote:
Thanks for your reply
I started writing the script.. I have gone through documentation for
getopt
(snip)
Good start. I tend to prefer optparse over getopt these days, but if
you've got it working the way you want it, you should
[EMAIL PROTECTED] wrote:
Hi,
I'd like to know if I am trying to do something impossible or I am just
being unable to find how to do it. In the latter case, please... help
me...
(snip)
My problem is that I don't know how to create a graph_object that
remains persistent through time (it has to be
Ville Vainio [EMAIL PROTECTED] writes:
Ilpo == Ilpo Nyyssönen iny writes:
Ilpo The problem in python here is that it needs to always
Ilpo recompile the regexp. I would like to have a way to write a
Ilpo regexp as a constant and then python should compile that
Ilpo regexp to
This is all the info I need from the xml file:
ID -- Gene-track_geneid320632/Gene-track_geneid
Name --Gene-ref
Gene-ref_locusPzp/Gene-ref_locus
Startbase -- Gene-commentary_seqs
Seq-loc
Seq-loc_int
Seq-interval
Hello Jean,
Glad to see your still playing along.
I have tested your script and it is broken too :(
Good idea about checking for the ':' , it just doesn't cover every
case.
This is the very reason I had not included docstring support before!
The problem is more diffcult than it first appears,
I am
Ok, I have the following directory structure
C:\pycode
-- blah.py
-- mynewdir
-- __init__.py
-- abc.py
[[ C:\pycode\mynewdir\abc.py ]]
def doFoo():
print hi
def doBar():
print bye
[[ C:\pycode\mynewdir\__init__.py ]]
from mynewdir import *
[[ C:\pycode\blah.py ]]
Traceback (most recent call last):
File stdin, line 1, in ?
ImportError: No module named SHIP
Two common problems here:
1) There is no file *\SHIP.pyd where * is one entry of sys.path
2) The capitalization is not correct. The file lookup will succeed,
but then, when initSHIP(void) is
Raymond Hettinger wrote:
Since the rules for handling missing, inconsistent, or out-of-range tuple fields
are not defined, even that revision has some risk. To future-proof the code,
use strptime() to generate a well-formed time tuple:
strptime('%d-%d-%d' % (y,m,d), '%Y-%m-%d')
(2005, 5, 15, 0,
click on my computer
Then select tools-folder options-File Types
scroll down the where the py extension is defined, highlight it, click
on advanced
then highlight open and hit the edit button.
There you should see python.exe with some other stuff, change it to
pythonw.exe
Then, in the future,
Assuming they run as a separate thread, I want to point IDLE to
.../Debug/Python_d.exe one day and .../Release/Python.exe for the next.
Also, is there any easy way to run the .../Debug/Python_d.exe so started
under the MSVC debugger?
tia,
Bill
--
I'm trying to create a SSL-enabled server in Python, and in the doc for
the socket module:
ssl(sock[, keyfile, certfile])
Initiate a SSL connection over the socket sock. keyfile is the
name of a PEM formatted
file that contains your private key. certfile is a PEM formatted
certificate
On Fri, 22 Apr 2005 14:59:59 +0200, André Søreng [EMAIL PROTECTED] wrote:
I'm trying to create a SSL-enabled server in Python, and in the doc for
the socket module:
ssl(sock[, keyfile, certfile])
Initiate a SSL connection over the socket sock. keyfile is the name of
a PEM formatted
file
As I'm trying to write the code using cElementTree.
I stumble across one problem. Sometimes there are multiple values to
retrieve from one record for the same element. Like this:
Prot-ref_name_EATP-binding cassette, subfamily G, member 1/Prot-ref_name_E
Prot-ref_name_EATP-binding cassette
By the way, I know about findall, but when I iterate thruogh it like:
for x in function:
print 'function', x
I get:
function Element 'Prot-ref_name_E' at 0xb7d10cf8
function Element 'Prot-ref_name_E' at 0xb7d10d10
But ofcourse I want the information in there...
On Fri, 22 Apr 2005
Reinhold Birkenfeld wrote:
Other possibility, probably faster when almost all keys in the range are in
the dictionary:
class sdict(dict):
def __getitem__(self, index):
if isinstance(index, slice):
d = {}
for key in xrange(slice.start, slice.stop,
Grant Edwards wrote:
On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote:
Well, I'm writing for embedded realtime systems in C/C++ and
have never encountered a single need to use goto.
I have encountered situations in C programs where the best
thing to use was a goto. Those situations
Willem Ligtenberg wrote:
As I'm trying to write the code using cElementTree.
I stumble across one problem. Sometimes there are multiple values to
retrieve from one record for the same element. Like this:
Prot-ref_name_EATP-binding cassette, subfamily G, member 1/Prot-ref_name_E
[Sheila King]
I have a web app that has been running just fine for several months under
Python 2.2.2.
We are preparing to upgrade the server to run Python 2.4.1.
However, part of my web app is throwing an error on this code (that has
previously worked without exception):
Grant Edwards wrote:
On 2005-04-21, Sergei Organov [EMAIL PROTECTED] wrote:
Grant Edwards [EMAIL PROTECTED] writes:
On 2005-04-21, Peter Maas [EMAIL PROTECTED] wrote:
Maxim Kasimov schrieb:
but what if i just can't to do this becouse i'm working thrue ssh, and
have to use only installed
As you can read in the other post of mine, my problem was with the
iterating through the list. didn't know that you should do. e.text. I did
only print e, not print e.text
Did read documentation, but must admit not everything.
Anyway, thank you very much!
On Fri, 22 Apr 2005 15:47:08 +0200,
Willem Ligtenberg wrote:
By the way, I know about findall, but when I iterate thruogh it like:
for x in function:
print 'function', x
I get:
function Element 'Prot-ref_name_E' at 0xb7d10cf8
function Element 'Prot-ref_name_E' at 0xb7d10d10
But ofcourse I want the information in there...
for x in
On 2005-04-22, Reinhold Birkenfeld [EMAIL PROTECTED] wrote:
Sure, but what about the case where his program is on paper
tape and all he has for an editor is an ice pick?
Then inserting goto doesn't seem to be an acceptable option
either ;)
Scissors, tape, and a box full of prepunched goto
Grant Edwards wrote:
Sure, but what about the case where his program is on paper
tape and all he has for an editor is an ice pick?
Paper tape? Luxury
--
http://mail.python.org/mailman/listinfo/python-list
Hi all!
I'm trying to extend the functionality of the file object by creating a
class that derives from file. MyFile class re-implements __init__(),
write(), writelines() and close() to augment the capabilities of file.
All works fine, except for one thing: 'print myfile' does not
execute
Ilpo == Ilpo Nyyssnen iny writes:
Ilpo Of course it caches those when running. The point is that it
Ilpo needs to recompile every time you have restarted the
Ilpo program. With short lived command line programs this really
Ilpo can be a problem.
I didn't imagine it could be
On Thursday 21 April 2005 09:01 am, codecraig wrote:
I am interested in regular expressions and how Perl and Python
compare. Particulary, I am interested in performance (i.e. speed),
memory usage, flexibility, completeness (i.e. supports simple and
complex regex operations...basically is
Rocco Moretti wrote:
Steve Holden wrote:
The principle of least surprise is all very well, but needless
surprise of newbies is a dangerous criterion to adopt for programming
language design and following it consistently would lead to a mess
like Visual Basic, which grew by accretion until
willitfw wrote:
I'm including the code that I've been using. I am relatively new to
python, and not sure if a socket was created:
*
import socket
socket.setdefaulttimeout(None)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
The last line above creates a socket... and I
-- *~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*Vedanta BarooahYM! - vedanta2006Skype - vedanta2006--
http://mail.python.org/mailman/listinfo/python-list
55 matches
Mail list logo