In <[EMAIL PROTECTED]>, Dan Bishop
wrote:
> On Jun 7, 8:30 pm, Some Other Guy <[EMAIL PROTECTED]> wrote:
>> Since this just involves doubling you can avoid multiplying altogether
>> and just use this:
>>
>> def rounddiv(a,b):
>> return int((a+a+b)/(b+b))
>>
>> That's 3 integer adds and 1 integer
Steve Howell wrote:
> --- Georg Brandl <[EMAIL PROTECTED]> wrote:
> > >>
> > >> 15 small programs here:
> > >>
> > >> http://wiki.python.org/moin/SimplePrograms
> > >>
> > >
> > > IMHO a few python goodies are missing there.
> >
> > "It's a Wiki." ;)
> >
>
> Yes indeed. Please feel free to add to
flebber wrote:
> I was working at creating a simple program that would read the content
> of a playlist file( in this case *.k3b") and write it out . the
> compressed "*.k3b" file has two file and the one I was trying to read
> was maindata.xml.
Consider using lxml. It reads in gzip compressed XML
Some Other Guy wrote:
> vdicarlo wrote:
>> I am a programming amateur and a Python newbie who needs to convert
>> about 100,000,000 strings of the form "1999-12-30" into ordinal dates
>> for sorting, comparison, and calculations. Though my script does a ton
>> of heavy calculational lifting (for wh
"Some Other Guy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| [EMAIL PROTECTED] wrote:
|
| > Hello all,
| > I have two integers and I want to divide one by another, and want to
| > get an integer result which is the higher side whenever the result is
| > a fraction.
| > 3/2 =>
I was working at creating a simple program that would read the content
of a playlist file( in this case *.k3b") and write it out . the
compressed "*.k3b" file has two file and the one I was trying to read
was maindata.xml . I cannot however seem to use the gzip module
correctly. Have tried the prog
hi please a have a look at my site http://justpratik.blogspot.com
and there's link for contest so
hurry before 15th june
--
http://mail.python.org/mailman/listinfo/python-list
hi please a have a look at my site http://justpratik.blogspot.com
and there's link for contest so
hurry before 15th june
--
http://mail.python.org/mailman/listinfo/python-list
Is it possible to compile python code into a library (on unix), then
link to it and call it from C/C++? If so, where can I learn how.
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
James T. Dennis wrote:
> Some Other Guy <[EMAIL PROTECTED]> wrote:
>> vdicarlo wrote:
>>> I am a programming amateur and a Python newbie who needs to convert
>>> about 100,000,000 strings of the form "1999-12-30" into ordinal dates
>>> for sorting, comparison, and calculations. Though my script doe
On Jun 7, 8:30 pm, Some Other Guy <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Hello all,
> > I have two integers and I want to divide one by another, and want to
> > get an integer result which is the higher side whenever the result is
> > a fraction.
> > 3/2 => 1 # Usual behavior
>
whey when I execute this statment
cursor.execute("""mysqlimport merchandise 1.txt""")
I get this error
ProgrammingError: (1064, "You have an error in your SQL syntax. Check
the manual that corresponds to your MySQL server version for the right
syntax to use near 'mysqlimport merchandise 1.txt' at l
On Jun 7, 5:13 pm, Gary Herron <[EMAIL PROTECTED]> wrote:
> Simple: os.walk builds the list to contain all the subdirectories.
> After giving you a chance to modify that list, ow.walk then goes through
> the list (whatever contents it has at that point) and visits any
> subdirectory.
>
> I'd guess
Some Other Guy <[EMAIL PROTECTED]> wrote:
> vdicarlo wrote:
>> I am a programming amateur and a Python newbie who needs to convert
>> about 100,000,000 strings of the form "1999-12-30" into ordinal dates
>> for sorting, comparison, and calculations. Though my script does a ton
>> of heavy calculati
thanks for all of your responses. i'll look more closely at pexpect
(The version I originally saw was much much older). I do want a cross-
platform solution. I'm pretty busy so getting the wxProcess magic into
useful shape will take me some time (at least on the order of weeks)
so other interest pa
I am a programming amateur and a Python newbie who needs to convert
about 100,000,000 strings of the form "1999-12-30" into ordinal dates
for sorting, comparison, and calculations. Though my script does a ton
of heavy calculational lifting (for which numpy and psyco are a
blessing) besides converti
Brian Blais wrote:
> Hello,
>
> I have a somewhat nested dict that I want to pickle, but it (sometimes)
> contains some
> no-no's (specifically, in this case, functions). I know I can't pickle
> them, but I
> would like to be able to pickle the rest of the dict. Is there a good way to
> be a
On Jun 7, 9:01 am, dmoore <[EMAIL PROTECTED]> wrote:
popen and friends will never do what you want it to do. Down that path
lies bitter disappointment.
You need pseduo-ttys and non-blocking IO. I don't know how to do this
on Windows, but I know it's possible.
Cygwin does it.
> Anybody have any th
--- Georg Brandl <[EMAIL PROTECTED]> wrote:
> >>
> >> 15 small programs here:
> >>
> >> http://wiki.python.org/moin/SimplePrograms
> >>
> >
> > IMHO a few python goodies are missing there.
>
> "It's a Wiki." ;)
>
Yes indeed. Please feel free to add to the page, or
make your own fork. See l
On 6/7/07, David Bear <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>
> > What's the best way to run either an entire python process or a python
> > thread every N days. I'm running Python 2.4.3 on Fedora Core 5 Linux.
> > My code consists of a test and measurement system that runs 24/7 in
Delaney, Timothy (Tim) wrote:
> Josh Ritter wrote:
>
>> A number of our Windows customers have an issue with the sqlite3
>> module included with Python 2.5.1
>>
>> We've tracked the problem down to the sqlite3.dll included with the
>> Python
>> 2.5.1 distrubtion. It is stripped and thus cannot
Programs like this were posted on this thread:
>def fib():
>generation, parent_rabbits, baby_rabbits = 1,
> 1, 1
>while True:
>yield generation, baby_rabbits
>generation += 1
>parent_rabbits, baby_rabbits = \
> baby_rabbits,
[EMAIL PROTECTED] wrote:
> What's the best way to run either an entire python process or a python
> thread every N days. I'm running Python 2.4.3 on Fedora Core 5 Linux.
> My code consists of a test and measurement system that runs 24/7 in a
> factory setting. It collects alot of data and I'd like
--- Szabolcs Nagy <[EMAIL PROTECTED]> wrote:
>
> actually i don't like when a tutorial uses over
> complicated cute names
> if the context is obvious (fibonacci) then we don't
> need to add
> 'parent_rabbits' and such identifiers
I still prefer the use of "rabbits," but I don't mind
if people ch
Gerard Flanagan wrote:
> On Jun 7, 8:39 am, dmitrey <[EMAIL PROTECTED]> wrote:
>> Hi all,
>> I guess this question was asked many times before, but I don't know
>> keywords for web search.
>>
>> Thank you in advance, D.
>
> import os
>
> d1 = os.path.dirname(__file__)
here I get an error "__file_
[EMAIL PROTECTED] schrieb:
> What's the best way to run either an entire python process or a python
> thread every N days. I'm running Python 2.4.3 on Fedora Core 5 Linux.
> My code consists of a test and measurement system that runs 24/7 in a
> factory setting. It collects alot of data and I'd lik
On Jun 7, 3:27 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> What's the best way to run either an entire python process or a python
> thread every N days. I'm running Python 2.4.3 on Fedora Core 5 Linux.
> My code consists of a test and measurement system that runs 24/7 in a
> factory settin
On 2007-06-07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> What's the best way to run either an entire python process or a python
> thread every N days.
man cron
man 5 crontab
--
Grant Edwards grante Yow! It don't mean a
at
Xavier Bérard wrote:
> Hello everyone,
>
> I am wondering if there is a way to use custom drawing in Tkinter.
> I've been using it for few months, and all I know about custom drawing
> is to draw directly on a Canvas with such methods as "create_line",
> "create_rectangle", etc.
>
> Now, the prob
On 2007-06-07, Dustan <[EMAIL PROTECTED]> wrote:
> On Jun 7, 1:30 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>> On 2007-06-07, Stebanoid <[EMAIL PROTECTED]> wrote:
>>
>> > if you have a list of functions you can try this:
>>
>> > import random
>> > import math
>> > m[int(math.floor(len(m)*random.r
Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>,
> Mathias Panzenboeck <[EMAIL PROTECTED]> wrote:
>def fib():
>generation, parent_rabbits, baby_rabbits = 1, 1, 1
>while True:
>yield generation, baby_rabbits
>generation += 1
>parent_rab
Josh Ritter wrote:
> A number of our Windows customers have an issue with the sqlite3
> module included with Python 2.5.1
>
> We've tracked the problem down to the sqlite3.dll included with the
> Python
> 2.5.1 distrubtion. It is stripped and thus cannot be relocated. This
> causes the followi
What's the best way to run either an entire python process or a python
thread every N days. I'm running Python 2.4.3 on Fedora Core 5 Linux.
My code consists of a test and measurement system that runs 24/7 in a
factory setting. It collects alot of data and I'd like to remove all
data older than 30
Terry Reedy wrote:
> "Dan Bishop" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> If you don't need the list to be sorted until you're done building
>> it, you can just use:
>>
>> lst = sorted(set(lst))
>
> ?? looks same as
> lst.sort()
You missed that the OP wants only unique
On Jun 7, 7:49 pm, Szabolcs Nagy <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > just wondering are there any snippets out there where you can convert
> > a url to an image using python
>
> you mean render a webpage as an image?
> does not sound a simple task
> maybe you can use oss web
EuroPython is the European Python and Zope Conference, taking place
this year in Vilnius, Lithuania from Monday 9th July to Wednesday 11th
July.
The last day of EuroPython's early registration period is upon us:
reduced rates will only be available until the end of today, Friday
8th June; after th
[EMAIL PROTECTED] wrote:
> In the example from help(os.walk) it lists this:
>
> from os.path import join, getsize
> for root, dirs, files in walk('python/Lib/email'):
> print root, "consumes",
> print sum([getsize(join(root, name)) for name in files]),
> print "bytes
In the example from help(os.walk) it lists this:
from os.path import join, getsize
for root, dirs, files in walk('python/Lib/email'):
print root, "consumes",
print sum([getsize(join(root, name)) for name in files]),
print "bytes in", len(files), "non-directory files
On Jun 7, 1:30 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-06-07, Stebanoid <[EMAIL PROTECTED]> wrote:
>
> > if you have a list of functions you can try this:
>
> > import random
> > import math
> > m[int(math.floor(len(m)*random.random()))]() # seems like Lisp
>
> Or rather m[random.ran
On Jun 7, 2:30 pm, Rob Wolfe <[EMAIL PROTECTED]> wrote:
> That's really strange. Have you got only *one* version of ``file``
> program on your machine?
Thank you, Rob. I thought I had that kind of thing covered in
specifying the -m but obviously there was something I wasn't getting,
and you found
A number of our Windows customers have an issue with the sqlite3 module
included with Python 2.5.1
We've tracked the problem down to the sqlite3.dll included with the Python
2.5.1 distrubtion. It is stripped and thus cannot be relocated. This
causes the following exception on computers where
Mathias Panzenboeck schrieb:
> Steve Howell schrieb:
>> --- "[EMAIL PROTECTED]"
>> <[EMAIL PROTECTED]> wrote:
>>
>>> Is there a resource somewhere on the net that can be
>>> used to quickly
>>> and effectively show Python's strengths to
>>> non-Python programmers?
>>> Small examples that will make
In article <[EMAIL PROTECTED]>,
Mathias Panzenboeck <[EMAIL PROTECTED]> wrote:
>Steve Howell schrieb:
>> --- "[EMAIL PROTECTED]"
>> <[EMAIL PROTECTED]> wrote:
>>
>>> Is there a resource somewhere on the net that can be
>>> used to quickly
>>> and effectively show Python's strengths to
>>> non-Pyt
[EMAIL PROTECTED] wrote:
> just wondering are there any snippets out there where you can convert
> a url to an image using python
you mean render a webpage as an image?
does not sound a simple task
maybe you can use oss web rendering engines like gecco, khtml or
webcore
--
http://mail.python.or
Hendrik van Rooyen wrote:
> "Stef Mientki" <[EMAIL PROTECTED]> wrote:
>
>> I use Python as a replacement for MatLab,
>> and intend to use it as replacement for Delphi, AutoIt, PHP, VB.
>> And I'ld love to use it as a replacement for micro controller programming.
>
> If you have a little sub - 64
En Thu, 07 Jun 2007 08:23:48 -0300, Nathan Harmston
<[EMAIL PROTECTED]> escribió:
> I m trying to implement an object which contains lazy" variables. My
> idea is to alter the getattr and the setattr methods. However I keep
> on getting a recursion error.
Instead of setattr/getattr, use a prope
On Jun 7, 8:54 am, Facundo Batista <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Why would storbinary throw an exception even when the file transfer
> > was successful? Why would the exception not be thrown until after the
> > file was sent? Shouldn't ftplib return something like (104
On 2007-06-07, Stebanoid <[EMAIL PROTECTED]> wrote:
> if you have a list of functions you can try this:
>
> import random
> import math
> m[int(math.floor(len(m)*random.random()))]() # seems like Lisp
Or rather m[random.randint(0, len(m))]()
--
Neil Cerutti
Caution: Cape does not enable user to
"dmoore" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| alternatives in the standard python distro) Is there some place I can
| submit this as a feature request? (Python dev?)
http://sourceforge.net/tracker/?group_id=5470
But don't hold your breath for a volunteer to respond. Di
Jim <[EMAIL PROTECTED]> writes:
> Hello,
>
> I need a program that will traverse a directory tree to ensure that
> there
> are unix-style line endings on every file in that tree that is a text
> file.
> To tell text files from others I want to use the unix "file" command
> (Python's "mimetypes" is
Try the following (Python 2.5.x):
import logging
t=open(filename,'rb')
try:
data=t.read()
#processing data...
except:
logging.exception("Failed to process %r", filename)
finally:
t.close()
For earlier versions of Python, you will need to nest the try blocks:
import logging
t=op
durumdara wrote:
> Hi!
>
> Where can I ask it?
>
> I want to ask that developers change the Python's Zip lib in the next
> versions.
> The Zip lib not have a callback procedure. When I zip something, I don't
> know, what is the actual position of the processing, and how many bytes
> remaining.
>
"durumdara" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Hi!
|
| Where can I ask it?
|
| I want to ask that developers change the Python's Zip lib in the next
| versions.
On the sourceforge tracker,
http://sourceforge.net/tracker/?group_id=5470
there is a Feature Request cate
Try the following:
import logging
t=open(filename,'rb')
try:
data=t.read()
#processing data...
except:
logging.exception("Failed to process %r", filename)
finally:
t.close()
--
http://mail.python.org/mailman/listinfo/python-list
En Tue, 05 Jun 2007 14:22:48 -0300, Todd Hopfinger <[EMAIL PROTECTED]>
escribió:
> I am using TLS Lite and J2ME SecureConnection for the purposes of
> encrypting
> traffic to/from a Java Midlet client and a multithreaded Python server.
> However, I encounter a TLSAbruptCloseError. I have tried
"Sion Arrowsmith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
| > 3/2 => 1 # Usual behavior
| > some_func(3, 2) => 2 # Wanted
|
| def some_func(a, b):
|return -(-a/b)
|
| And people complain about Python's behaviour regarding divi
"Dan Bishop" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| If you don't need the list to be sorted until you're done building it,
| you can just use:
|
| lst = sorted(set(lst))
?? looks same as
lst.sort()
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Hendrik van Rooyen <[EMAIL PROTECTED]> wrote:
>
>"Stef Mientki" <[EMAIL PROTECTED]> wrote:
>
>> I use Python as a replacement for MatLab,
>> and intend to use it as replacement for Delphi, AutoIt, PHP, VB.
>> And I'ld love to use it as a replacement for micro contro
In article <[EMAIL PROTECTED]>,
vishnu <[EMAIL PROTECTED]> wrote:
>Hi there,
>
>I am embedding python 2.5 on embedded system running on RTOS where I
>had strict memory constraints.
>As python is a huge malloc intensive application, I observed huge
>memory fragmentation in my system which is leadin
On 7, 19:56, David Bear <[EMAIL PROTECTED]> wrote:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function.. but I didn't see a
> way of act
On Jun 7, 10:09 am, "Joe" <[EMAIL PROTECTED]> wrote:
>
> And, yes, printing the error message returns absolutely nothing. The tuple
> following InterfaceError is both the error code and message. Unfortunately,
> it will only give me (0, '') which isn't much help.
>
I'm on Google groups and can't
Good evening!
say, please, as in *.xls to insert an unscreened picture?
example: image.py
but a picture in OpenOficce is not represented :(
OS - windows XP, debian etch
pyExcelerator 0.6.3a-1
#!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Kiseliov Roman
__rev_id__ =
On 7, 19:56, David Bear <[EMAIL PROTECTED]> wrote:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function.. but I didn't see a
> way of act
dmoore <[EMAIL PROTECTED]> wrote:
> I've seen the following issue come up in multiple posts to this
> mailing list:
>
> I have a python program that spawns a child process with popen or
> popen2 or popen3 or popen2.popen2 etc.
> the child process is interactive: it asks for input then spits o
On 7 jun, 11:56, David Bear <[EMAIL PROTECTED]> wrote:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function.. but I didn't see a
> way of act
On Jun 7, 3:33 pm, alexteo21 <[EMAIL PROTECTED]> wrote:
> I have created a script using python that will batch process data
> files every hour
> The script is running on Solaris. Python version 2.3.3
>
> t=open(filename,'rb')
> data=t.read()
> #processing data...
> t.close()
Try the following app
hi all,
which way is the simplest for now to obtain the memory amount eaten by
call to Python 'myfunc' function?
Thx, D
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 7, 10:56 am, David Bear <[EMAIL PROTECTED]> wrote:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function..
Careful!!! You don't want t
On 2007-06-07, Robin Becker <[EMAIL PROTECTED]> wrote:
> BartlebyScrivener wrote:
>> On Jun 7, 8:17 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
>
>> A good habit for naming your scripts: If you have a script and you
>> want to name it text.py, or list.py or new.py or old.py or some common
How are you making the list of functions? Something like this:
[code]
fs = []
for k,f in globals():
if callable(f):
fs.append(f)
[/code]
Then to call a random one (assuming they all take no parameters):
[code]
import random
random.choice(fs)()
[/code]
Or maybe you only have the name
In <[EMAIL PROTECTED]>, David Bear wrote:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function.. but I didn't see a
> way of actually runnin
#1 If any one familiar with godaddy hosting. They have apparently have
a hosing server i.e.(scripts, html files etc.), and a server for
databases. How can I import from my script, with a csv. if the db is
on a different server than the script server.
#2 I would like to update and insert with the
On 6/7/07, Joe <[EMAIL PROTECTED]> wrote:
> > Huh the only thing I can find on InterfaceError is "Errors related to
> > the database interface and not the database itself." You might be able
> > to get some info from connection.info() . . .
>
> Yeah, I wish there was more documentation about this t
David Bear said unto the world upon 06/07/2007 11:56 AM:
> I would like to write some code that would randomly select a function from a
> list of functions and call it. I was looking in the globals names space and
> randomly selecting items that were of type function.. but I didn't see a
> way of a
I would like to write some code that would randomly select a function from a
list of functions and call it. I was looking in the globals names space and
randomly selecting items that were of type function.. but I didn't see a
way of actually running the function.
Any pointers?
--
David Bear
-- l
Hi folks,
I've seen the following issue come up in multiple posts to this
mailing list:
I have a python program that spawns a child process with popen or
popen2 or popen3 or popen2.popen2 etc.
the child process is interactive: it asks for input then spits out
some output, asks for more input then
On 6 7 , 10 53 , "Mark T" <[EMAIL PROTECTED]> wrote:
> " " <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
>
>
>
>
>
> > Please see the follow code, I can not catch the exception " IOError"
> > raised from shutil.copyfile() , why?
> >try:
> >
On Jun 7, 1:59 am, "Simon Pickles" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can someone help me leave the murky c++ world and enter shiny pythonland?
>
> I have a problem with importing and global variables, here's my code:
[snip!]
> When run, I come unstuck here:
>
> self.clientSocket, sel
[EMAIL PROTECTED] wrote:
> Why would storbinary throw an exception even when the file transfer
> was successful? Why would the exception not be thrown until after the
> file was sent? Shouldn't ftplib return something like (104,
> "Connection reset by peer") instead of throwing an error? Is my
Xavier Bérard wrote:
>
> Now, the problem, is that I have already plenty of widgets on my
> screen. I just want to draw over them, which is a bit difficult in my
> comprehension of things.
>
What are you trying to achieve by "drawing over" widgets?
--
Kevin Walzer
Code by Kevin
http://www.code
On 10 Mag, 16:52, Alexander Schliep <[EMAIL PROTECTED]> wrote:
> andrea <[EMAIL PROTECTED]> writes:
> > On 9 Mag, 09:10, Alexander Schliep <[EMAIL PROTECTED]> wrote:
> >> Check outhttp://gato.sf.net(LGPLlicense). It does exactly what you
> >> want to do and there is a binary for MacOS X. Algorithms
BartlebyScrivener wrote:
> On Jun 7, 8:17 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> A good habit for naming your scripts: If you have a script and you
> want to name it text.py, or list.py or new.py or old.py or some common
> name that might be found in the thousand and one other modul
On 5 jun, 06:15, Charles Sanders <[EMAIL PROTECTED]>
wrote:
> luis wrote:
> > I'm using ctypes to call afortrandllfrom python. I have no problems
> > passing integer and double arryas, but I have an error with str arrys.
> > For example:
>
> [snip]
>
> I do not know about MicrosoftFortrancompilers
Hamish Moffatt <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] wrote:
> def div_ceil(a, b):
>> ... if a%b:
>> ... return ((a/b)+1)
>> ... else:
>> ... return (a/b)
>
>Yes, although it's not as short or as fast (probably as my version):
>
>def div_ceil(a, b):
> return
On Jun 7, 8:17 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> I have the following Python program:
>
> Running this program with 2.5.1 causes another Python script in
> the same directory to be loaded . . . 'new.py'
A good habit for naming your scripts: If you have a script and you
want to name it
> ... I noticed it complains
> about the use of the += and -= assignment operators. The fix is
> obviously pretty trivial. I didn't notice any mention in the Pyrex
> docs as a difference between Python and Pyrex though. Was I mistaken?
Never mind. I missed the bit where it said they haven't ye
> Huh the only thing I can find on InterfaceError is "Errors related to
> the database interface and not the database itself." You might be able
> to get some info from connection.info() . . .
Yeah, I wish there was more documentation about this type of error. The
only thing info() tells me is th
In article <[EMAIL PROTECTED]>,
alexteo21 <[EMAIL PROTECTED]> wrote:
> The script is working fine on the day of execution.
> It is able to process the data files very hour. However, the
> processing fail one day later i.e. the date increment by 1.
>
> Traceback (most recent call last):
> File
"人言落日是天涯,望极天涯不见家" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Please see the follow code, I can not catch the exception " IOError"
raised from shutil.copyfile() , why?
try:
if (DEST_TYPE & TYPE_FTP):
fn = oname
I have created a script using python that will batch process data
files every hour
The script is running on Solaris. Python version 2.3.3
t=open(filename,'rb')
data=t.read()
#processing data...
t.close()
The script is working fine on the day of execution.
It is able to process the data files ver
just wondering are there any snippets out there where you can convert
a url to an image using python
I have be trying to use
webbrowser.open("www.mypage.com")
with printscreen but I have no means of finding out when the page url
is fully loaded
any tips
tks
M
--
http://mail.python.org/mailma
Steve Howell schrieb:
> --- "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
>
>> Is there a resource somewhere on the net that can be
>> used to quickly
>> and effectively show Python's strengths to
>> non-Python programmers?
>> Small examples that will make them go "Wow, that
>> _is_ neat"?
>>
>
Hello,
I have a somewhat nested dict that I want to pickle, but it (sometimes)
contains some
no-no's (specifically, in this case, functions). I know I can't pickle them,
but I
would like to be able to pickle the rest of the dict. Is there a good way to
be able
to walk through a dict, and tak
Hello everyone,
I am wondering if there is a way to use custom drawing in Tkinter.
I've been using it for few months, and all I know about custom drawing
is to draw directly on a Canvas with such methods as "create_line",
"create_rectangle", etc.
Now, the problem, is that I have already plenty of
I'm experimenting a bit with Pyrex and like it pretty well so far.
While converting a module from Python to Pyrex I noticed it complains
about the use of the += and -= assignment operators. The fix is
obviously pretty trivial. I didn't notice any mention in the Pyrex
docs as a difference between
Den Thu, 07 Jun 2007 07:00:53 + skrev reed:
> On Jun 5, 7:58 am, Thomas Dybdahl Ahle <[EMAIL PROTECTED]> wrote:
>> Hi, When I do a small program like
>>
>> from subprocess import Popen
>> popen = Popen(["ping", "google.com"]) from time import sleep
>> sleep(100)
>>
>> start it and kill it, the
Hi All,
I'm trying to download a remote file through FTP. Here's the script:
###
#!/usr/bin/env python
import ftplib
import os
import time
ddir="C:\\ftp"
os.chdir(ddir)
f=ftplib.FTP("10.2.2.1", "user", "user123")
f.cwd("/home/protocol/c
Neil Cerutti wrote:
> I have the following Python program:
>
> import win32com.client
> print 'Huh?' # Actually, it says something profain.
>
>
> Running this program with 2.5.1 causes another Python script in
> the same directory to be loaded and run (specifically the import
> causes it), and a
[EMAIL PROTECTED] wrote:
> On Jun 7, 2:15 pm, Hamish Moffatt <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> Hello all,
>>> I have two integers and I want to divide one by another, and want to
>>> get an integer result which is the higher side whenever the result is
>>> a fraction.
>>>
I have the following Python program:
import win32com.client
print 'Huh?' # Actually, it says something profain.
Running this program with 2.5.1 causes another Python script in
the same directory to be loaded and run (specifically the import
causes it), and a .pyc file is created from that list.
1 - 100 of 147 matches
Mail list logo