hi all,
a python n00b, so please bear with me. i have a simple question:
i generally name python sources as a-simple-python-example.py. when i
try to import a module named as above, i (obviously) get tracebacks
from python interpreter.
is there a way to continue naming python sources as above,
Peter Hansen wrote:
Michael Hoffman wrote:
Reinhold Birkenfeld wrote:
Tony Meyer wrote:
Do people really like using __div__ to mean join?
I'm not too happy with it, too, but do we have alternatives? ...
Of course, one can use joinwith() if he doesn't like '/'.
I've used the path
Hello Dan,
I am trying to head in a binary file that has a header and different
character types. The array module apparently expects the typecode to
be the same throughout. Here's what the file looks like:
Byte number:type: value: purpose:
1-4 charver.
Anupam Kapoor wrote:
is there a way to continue naming python sources as above, and still
use it as python modules ? i can ofcourse change the name to
'a_simple_python_example.py', which then works.
Something like
a_simple_python_example = __import__('a-simple-python-example')
--
Dear user of python.org, administration of python.org would like to let you
know that.
We have detected that your e-mail account has been used to send a huge amount
of junk e-mail messages during the last week.
Probably, your computer had been infected and now runs a trojaned proxy server.
[EMAIL PROTECTED] wrote:
Tue, Jul 26, 2005 at 01:41:36PM +1000, Steven D'Aprano пишет:
Long ago, when dinosaurs roamed the Earth, (a.k.a.
before OS X on the Macintosh) Apple suggested a bit
of Pascal code for safely updating a file:
[EMAIL PROTECTED] wrote:
Simple? Yes? ...but the code I've seen so far which does this uses
'nested for loops' for trees which are relatively shallow compared to
mine. So I'm wondering if you could give me some suggestions as to
which XML library could do this without resorting to nested for
Dear All,
Can any one let me know? How to build
email in python? with some some examples.
regards
Prabahar
___
Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for
FREE!
On 7/26/05, praba kar [EMAIL PROTECTED] wrote:
Dear All,
Can any one let me know? How to build
email in python? with some some examples.
regards
Prabahar
The email module is what you need.
http://docs.python.org/lib/module-email.html
hth :)
--
On 24 Jul 2005 17:27:07 -0700, Paul McGuire [EMAIL PROTECTED]
wrote:
Well, here we are, and I'm announcing the 1.3.2 release, with some
changes that I'd like to get released quickly. Here is the excerpt
from the change log:
...snip...
I did a quick check with my Delphi DFM parser, and they
On Mon, 25 Jul 2005 15:47:13 GMT, Nemesis [EMAIL PROTECTED]
wrote:
[...]
Hello Nemesis,
Would it be possible to also customize the fonts in the
groups and threads pane (I'd like to have everywhere proportional
(monospaced fonts).
Not at the moment, maybe in the future ... but of course if
hi,
i try to embed some python code in C, namely:
import zlib
def fun(s):
return zlib.compress(s)
and execute it by PyRunString() and finally call my function by
PyObject_CallFunction()
my question is why i receive error like 'zlib
Why do you care if they are nested for loops?
What is the problem you are experiencing that is caused
by for loops?
The nested loops which I speak of are highly dependent
on the structure of the document tree. The examples which
I've seen using DOM or ElementTree deal with shallow trees,
but
Input is a string of four digit sequences, possibly
separated by a -, for instance like this
1234,-,4567,
My regular expression is like this:
rx1=re.compile(r\A(\b\d\d\d\d,|\b\d\d\d\d-\d\d\d\d,)*\Z)
When running rx1.findall(1234,-,4567,)
I only get the last match as the
Am Tue, 26 Jul 2005 09:57:23 + schrieb Odd-R.:
Input is a string of four digit sequences, possibly
separated by a -, for instance like this
1234,-,4567,
My regular expression is like this:
rx1=re.compile(r\A(\b\d\d\d\d,|\b\d\d\d\d-\d\d\d\d,)*\Z)
Hi,
try it without \A and
hello,
i don't know if this is the best list to send this question, but i'm
already trying to ask.
I need to import variables from .RData files (arrays or variables).
I'm trying to use the rpy module, but without success beccause when i
try to access to a variable loaded from the .RData file i
Hi Jon,
[ PHP / Python ]
If not, is there any other way in Python (or PHP) to achieve this?
I'm not sure if it helps, but here is package that integrates the
Python into PHP:
http://www.csh.rit.edu/~jon/projects/pip/
Best regards,
Lars
--
http://semagia.com
--
That looks great! Being able to embed Python inside PHP like that should
allow to achieve what I intend to do without using PSP in this case.
Cheers!
Jon
On Tue, 26 Jul 2005, Lars Heuer wrote:
Hi Jon,
[ PHP / Python ]
If not, is there any other way in Python (or PHP) to achieve this?
I'm
Odd-R. wrote:
Input is a string of four digit sequences, possibly
separated by a -, for instance like this
1234,-,4567,
My regular expression is like this:
rx1=re.compile(r\A(\b\d\d\d\d,|\b\d\d\d\d-\d\d\d\d,)*\Z)
When running rx1.findall(1234,-,4567,)
I only get
I've installed the ActiveState binary distribution for Solaris in my
home directory, but I'm having problems with Tk.
I think I did everything right -- I used gtar rather than Solaris tar,
and the install process indicated it was successful. I added the
python directory to ~/.bashrc.
Python
Hello. I am working on Tiger and wanted to find out how to compile a
Python (.py) file into a .pyc file and then into a .pyo file. Can the
compilation be achieved within the interpreter? Also, I am
new to Python and wanted to know the difference between .pyc and .pyo
files. Is this comparison
John Machin wrote:
So here's the mean lean no-flab version -- you don't even need the
parentheses (sorry, Thomas).
rx1=re.compile(r\b\d\d\d\d,|\b\d\d\d\d-\d\d\d\d,)
rx1.findall(1234,-,4567,)
['1234,', '-,', '4567,']
No flab? What about all that repetition of \d? A less
Subscribe
Thanks,
Brian Lee
--
http://mail.python.org/mailman/listinfo/python-list
Hi All,
PyDev - Python IDE (Python Development Enviroment for Eclipse) version
0.9.7 has just been released.
Check the homepage (http://pydev.sourceforge.net/) for more details.
Release Highlights:
This build fixes some nasty bugs from 0.9.6... it is highly recommended
you install it. (right
Hello,
I'm looking for a way to select some leafs in a tree.
My idea is to use a TreeListCtrl, with the tree in the first column and
checkboxes in the second.
But I don't know how to do this, tree items seems only to be able to
contain text, not a wx-object.
ideas or suggestion are welcome.
--
Duncan Booth wrote:
John Machin wrote:
So here's the mean lean no-flab version -- you don't even need the
parentheses (sorry, Thomas).
rx1=re.compile(r\b\d\d\d\d,|\b\d\d\d\d-\d\d\d\d,)
rx1.findall(1234,-,4567,)
['1234,', '-,', '4567,']
No flab? What about all that
Does anyone have any Emacs skeletons they find useful for Python? I
Googled a little but didn't find anything enticing. I already have a
script that sets up script/module templates, so those aren't all that
useful.
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list
I'm trying to create a package+module structure, specifically a test
package with all the unit tests. I'd like to have a package (directory)
test that has various test modules, and I'd also like test itself to
be a module that runs all the tests. Is this not possible?
I created a directory called
Asad Habib wrote:
Hello. I am working on Tiger and wanted to find out how to compile a
Python (.py) file into a .pyc file and then into a .pyo file. Can the
compilation be achieved within the interpreter? Also, I am
new to Python and wanted to know the difference between .pyc and .pyo
files.
praba kar [EMAIL PROTECTED] wrote:
Dear All,
Can any one let me know? How to build
email in python? with some some examples.
If all else fails,
mutt -a ...
--
William Park [EMAIL PROTECTED], Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
You can use
print os.sysconf(SC_NPROCESSORS_CONF)
works on Linux
krishan
Pauldoo wrote:
Hi,
Is a way in python to obtain the total number of processors present in
the system?
os.platform doesn't seem to contain anything useful.
--
http://mail.python.org/mailman/listinfo/python-list
[k pur]
| You can use
|
| print os.sysconf(SC_NPROCESSORS_CONF)
|
| works on Linux
|
|
| krishan
|
|
| Pauldoo wrote:
| Hi,
| Is a way in python to obtain the total number of processors
| present in
| the system?
|
| os.platform doesn't seem to contain anything useful.
And on Windows
I wrote a module to do this a while back. I put the script on my
website just now. Let me know if it helps.
http://www.blendedtechnologies.com/how-to-send-emails-with-python/19
--
Gregory Piñero
CEO and Founder
Blended Technologies
(www.blendedtechnologies.com)
--
Ron Adam wrote:
Tony Meyer wrote:
Do people really like using __div__ to mean join?
I think the '+' is used as a join for both strings and lists, so it
would probably be the better choice as far as consistency with the
language is concerned.
The issue with that is that as long as we are
praba kar wrote:
Can any one let me know? How to build
email in python? with some some examples.
Which documentation, tutorials, or mailing list archives have you
already checked, and what information did they not provide which you need?
(Translation: it looks like you didn't make the
Dan Richter wrote:
I'm trying to create a package+module structure, specifically a test
package with all the unit tests. I'd like to have a package (directory)
test that has various test modules, and I'd also like test itself to
be a module that runs all the tests. Is this not possible?
I
[Peter Hansen]
|
| Ron Adam wrote:
| Tony Meyer wrote:
| Do people really like using __div__ to mean join?
|
| I think the '+' is used as a join for both strings and lists, so it
| would probably be the better choice as far as consistency with the
| language is concerned.
|
| The issue
I am going to be doing a lot of work with large data sets stored in
various netCDF files, and after checking out the alternatives, I would
really like to go with SciPy. The problem is that SciPy offers no
native netCDF support. I have checked out pycdf at
http://pysclint.sourceforge.net/pycdf/,
Back in March I submitted a patch for cgi.py to sourceforge to fix a problem
with the handling of an invalid REQUEST_METHOD.
I thought I followed all the steps to properly submit the bug and patch but
the patch is still sitting there in limbo.
This is the first patch I have submitted for
no executable code in
__init__.py is executed, even though import test seems to succeed.
I've discovered that import test *does* cause executable code in the
package to be executed. However, I can't execute it on the command line
using python test. Is there a way to do this?
There _is_ a
[Steve wrote]
I've installed the ActiveState binary distribution for Solaris in my
home directory, but I'm having problems with Tk.
I think I did everything right -- I used gtar rather than Solaris tar,
and the install process indicated it was successful. I added the
python directory to
[EMAIL PROTECTED] wrote:
I am going to be doing a lot of work with large data sets stored in
various netCDF files, and after checking out the alternatives, I would
really like to go with SciPy. The problem is that SciPy offers no
native netCDF support.
You may be having an issue because
Joe wrote:
Back in March I submitted a patch for cgi.py to sourceforge to fix a problem
with the handling of an invalid REQUEST_METHOD.
I thought I followed all the steps to properly submit the bug and patch but
the patch is still sitting there in limbo.
This is the first patch I have
That's s sort of an Eclipse issue... you have to disable it, restart
eclipse and only then will an uninstall appear (it has something to do
with some resources eclipse is not able to remove when the plugin is
active).
Cheers,
Fabio
Dennis Lee Bieber wrote:
On Tue, 26 Jul 2005 10:56:58
Also, I am aware that ScientificPython offers netCDF support, but its
lack of robust documentation is a big downer. Plus we haven't been able
to successfully install it yet.
Scott
--
http://mail.python.org/mailman/listinfo/python-list
Michael Does anyone have any Emacs skeletons they find useful for
Michael Python?
What's an Emacs skeleton?
Skip
--
http://mail.python.org/mailman/listinfo/python-list
I have an odd problem that I'm sure someone here can help me solve. I
am using Python 2.3 on a Linux box to process text files. At one point
in my automated process, I have to zip and ship the files over to a
Windows server running a proprietary package to do some manipulation to
the file.
http://tgolden.sc.sabren.com/python/win32_how_do_i/watch_directory_for_changes.html
--
http://mail.python.org/mailman/listinfo/python-list
Joe wrote:
Back in March I submitted a patch for cgi.py to sourceforge to fix a problem
with the handling of an invalid REQUEST_METHOD.
I thought I followed all the steps to properly submit the bug and patch but
the patch is still sitting there in limbo.
Patches get processed when people
Reinhold,
Thanks for responding...
I see that you are using Python 2.4.1 and the bug was against 2.4. (I am
now using 2.4.1)
If I remember correctly there were two issues that I ran into, one was with
a missing REQUEST_METHOD and the other was with a INCORRECT request method.
As per your
[EMAIL PROTECTED] wrote:
Michael Does anyone have any Emacs skeletons they find useful for
Michael Python?
What's an Emacs skeleton?
Somewhat of an elaborate mini-language for inserting boilerplate.
http://www.emacswiki.org/cgi-bin/emacs-en/SkeletonMode
--
Michael Hoffman
--
Hi,
I'm trying to figure out how to submit javascript forms using win32com
in order to complete repetitive processes.
The Webpage Source: (I tried to include only the important stuff)
--
SCRIPT language=JavaScript
function mainPageOnLoad() {
Michael,
Since you are on this topic, do you (or anyone else) have any type of
code-completion mode for python in emacs?
Thanks
-george
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Hoffman
Sent: Tuesday, July 26, 2005 1:36 PM
To:
For Javascript automation, I recommend Selenium
(http://confluence.public.thoughtworks.org/display/SEL/Home).
Grig
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
I am going to be doing a lot of work with large data sets stored in
various netCDF files, and after checking out the alternatives, I would
really like to go with SciPy. The problem is that SciPy offers no
native netCDF support. I have checked out pycdf at
George Flaherty wrote:
Since you are on this topic, do you (or anyone else) have any
type of code-completion mode for python in emacs?
I have this in my .emacs:
(global-set-key \M-/ 'hippie-expand)
This means that M-/ will do dumb code completion based on stuff that is
already in an open
Michael Hoffman wrote:
I have this in my .emacs:
(global-set-key \M-/ 'hippie-expand)
This means that M-/ will do dumb code completion based on stuff that is
already in an open buffer
Even though I don't know how to configure Emacs to do it (I'm a
degenerate Vim user), I've found ctags
Yeah I have used tags with java and c before and they are very nice. Its just
that, I have been trying to find something similar to JDE/PythonWinEditor code
completion for an emacs-python mode.
I will keep trying and thanks for the input.
-george
-Original Message-
From: [EMAIL
Olivier wrote:
first i want to know what is the best and simple solution for a
multilinguage site with plone 2?
i want some tutorial, how to and if possible exemple
The best way to approach this is to wait a couple of days until Plone
2.1 is released, and use LinguaPlone + Plone 2.1, which
Hi all,
Would anyone know a good place to start for learning how to build
simple GUI's in Windows XP? I just want users to be able to select a
few parameters from a pull-down menu, then be able to run some batch
files using the parameters from the pull down menus. I would also need
a Browse
* Brian Lee [EMAIL PROTECTED] [2005-07-26 06:34]:
Subscribe
OK. You're now subscribed to thousands of spam lists. Congratulations!
;)
You can subscribe to the python-list here:
http://mail.python.org/mailman/listinfo/python-list
Good luck-
John
--
Probably, the best place for learning how to build GUI's for Windows, in
general, is to get hold the personal edition of Delphi from the Borland
website. If you want something more specific to Python, it is likely to
be much tougher. You would, for example, have to decide which widget
Well, Tkinter module (Tk) would be the simplestway to do it.. and it is
included in your Windows Python distribution...
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
In the following code why am i not able to access class A's object attribute -
'a' ? I wishto extent class D with all the attributes of its base classes. how
do i do that ?
thanks in advance for enlightment ...
here's the snippet
#!/usr/bin/python
class A(object):
def
Since you are on this topic, do you (or anyone else) have any type of
code-completion mode for python in emacs?
Thanks
-george
For what its worth, Vim has a generic type of code-completion that uses
the file being edited to check for completion options within a word. It's
not true
Ernesto wrote:
Would anyone know a good place to start for learning how to build
simple GUI's in Windows XP? I just want users to be able to select a
few parameters from a pull-down menu, then be able to run some batch
files using the parameters from the pull down menus. I would also need
a
km wrote:
Hi all,
In the following code why am i not able to access class A's object attribute
- 'a' ? I wishto extent class D with all the attributes of its base classes.
how do i do that ?
thanks in advance for enlightment ...
here's the snippet
#!/usr/bin/python
class
Hi peter,
ya got it working :-) now i understand mro better.
thanks,
KM
-
On Tue, Jul 26, 2005 at 04:09:55PM -0400, Peter Hansen wrote:
km wrote:
Hi all,
In the following code why am i not able to access class A's object
Look up pamie it should do all the work you need. If it dosn't I can
send you ishyBrowser but pamie has more comunity support.
--
http://mail.python.org/mailman/listinfo/python-list
On 26 Jul 2005 12:44:13 -0700, Ernesto [EMAIL PROTECTED] wrote:
Would anyone know a good place to start for learning how to build
simple GUI's in Windows XP? I just want users to be able to select a
few parameters from a pull-down menu, then be able to run some batch
files using the
Peter Hansen wrote:
km wrote:
Hi all,
In the following code why am i not able to access class A's object
attribute - 'a' ? I wishto extent class D with all the attributes of
its base classes. how do i do that ?
[snip]
Each class should do a similar super() call, with the appropriate
from win32com.client import Dispatch
from time import sleep
ie = Dispatch('InternetExplorer.Application')
ie.Visible = 1
ie.Navigate(http://ispds-sepsr.prv:7500/cs/welcome.jsp;)
while ie.ReadyState != 4:
sleep(1)
doc = ie.Document
while doc.readyState != complete:
sleep(1)
Hey there, does anyone know where i can find some real documentation on
the MySQLdb module? This thing is driving me nuts. all i can find on
the internet is some brief tutorials. I need to know whats up with some
of my stuff i even bought Programming Python by O'Reilly, out of over
1200 pages, and
[EMAIL PROTECTED] wrote:
Hey there, does anyone know where i can find some real documentation on
the MySQLdb module? This thing is driving me nuts. all i can find on
the internet is some brief tutorials.
Is the documentation that comes with MySQLdb not sufficient? It's
certainly more thorough
On Wed, 27 Jul 2005 12:44:12 +0530, km [EMAIL PROTECTED] wrote:
Hi all,
In the following code why am i not able to access class A's object attribute -
'a' ? I wishto extent class D with all the attributes of its base classes.
how do i do that ?
thanks in advance for enlightment ...
here's
I'm trying to get my canvas to resize to fill its frame within a window,
but I can't figure out how to handle the callback data from the window's
Configure properly. It has very strange behavior - resizing randomly
or growing by itself, shrinking to 0. The following works passably but
jumps
Wow, thanks so much. I promise, i didn't know that was out there.
should help me out a lot.
still a newbie here, somewhat.
thanks again
--
http://mail.python.org/mailman/listinfo/python-list
You should just use 'pack' properly. Namely, the fill= and expand=
parameters. In this case, you want to pack(fill=BOTH, expand=YES).
For the button, you may want to use pack(anchor=E) or anchor=W to make
it stick to one side of the window.
The additional parameters for the button (both
if you want something one step simpler than wX TK take a look at
http://www.averdevelopment.com/python/EasyDialogs.html
or
http://www.ferg.org/easygui/index.html
You loose a lot of flexibility, but get ultra simple (and
plain-looking) widgets, without all of the complexity of of a gui
k pur [EMAIL PROTECTED] writes:
You can use
print os.sysconf(SC_NPROCESSORS_CONF)
works on Linux
Works on FreeBSD as well. It hooks up to the sysconf C call. That's a
Posix call, so this should work portably across Posix systems. I know
Windows can be made Posix compliant, but I'm no sure
Thought I'm not sure (and don't have time to test) I'd guess it's
because you haven't explicitly called the __init__ method chain.
i.e., B calls A, C calls B, etc.
This is probably where the actual data gets pulled into scope.
On Wed, 2005-07-27 at 12:44 +0530, km wrote:
Hi all,
In the
Ignore my last response; just read it fully and realized how dumb my
response was. :)
On Wed, 2005-07-27 at 12:44 +0530, km wrote:
Hi all,
In the following code why am i not able to access class A's object attribute
- 'a' ? I wishto extent class D with all the attributes of its base
Joseph Turian [EMAIL PROTECTED] writes:
Hi,
What is the safest manner to extend search path for modules, minimizing
the likelihood of shooting oneself in the foot?
The system (which includes scripts and their shared modules) may be
checked out in several different locations, but a script
[EMAIL PROTECTED] wrote:
Well, it's what (R)DBMS are for, but plain files are not.
Steven D'Aprano wrote:
This isn't 1970, users expect more from professional
programs than keep your fingers crossed that nothing
bad will happen. That's why applications have multiple
levels of undo (and
[using __div__ to mean join]
I think the '+' is used as a join for both strings
and lists, so it would probably be the better choice
as far as consistency with the language is concerned.
+1.
=Tony.Meyer
--
http://mail.python.org/mailman/listinfo/python-list
Do people really like using __div__ to mean join?
I think the '+' is used as a join for both strings and lists, so it
would probably be the better choice as far as consistency with the
language is concerned.
The issue with that is that as long as we are subclassing
strings, the + is
,
| Something like
| a_simple_python_example = __import__('a-simple-python-example')
`
thanks ! that works.
kind regards
anupam
--
http://mail.python.org/mailman/listinfo/python-list
From: Robert Kern [EMAIL PROTECTED]
As you can see in the datetime documentation, the module was introduced
in Python 2.3. I recommend updating your Python installation.
What do you mean your?? I don't have any Python installation of my
own. All I have is what this small local ISP provides on
What do you mean about a couple of day ? because I need to do this for
next month (a beta version) and the final version for september. do you
think plone 2.1 will be release at this date ?
thanks.
Olivier.
- Original Message -
From: [EMAIL PROTECTED]
Newsgroups: comp.lang.python
Sent:
Robert Maas, see http://tinyurl.com/uh3t wrote:
From: Robert Kern [EMAIL PROTECTED]
As you can see in the datetime documentation, the module was introduced
in Python 2.3. I recommend updating your Python installation.
What do you mean your?? I don't have any Python installation of my
Robert Maas, see http://tinyurl.com/uh3t wrote:
From: Robert Kern [EMAIL PROTECTED]
As you can see in the datetime documentation, the module was introduced
in Python 2.3. I recommend updating your Python installation.
What do you mean your??
The one you are using.
I don't have any Python
Bugs item #1245381, was opened at 2005-07-26 18:38
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1245381group_id=5470
Please note that this message will contain a full copy of
92 matches
Mail list logo