> is there another way to print a PDF form python?
>
> My problem is a PDF which is printed well by evince, but not with lp,
> even not out of python using
>
> os.system("lp some_options file.pdf")
>
> Later on I have to build the PDF in a python program (using reportlab)
> and then print it, eve
> I am very interested to hear your opinion on which version of Python
> to use in conjunction with Django. Currently, I am taking a class at
> Udemy and they recommend using Python 2.7 with Django 1.6. because
> both versions work well with each other.
>
> Over the last few months I got pretty muc
> grep ^TTCTGTGAGTGATTTCCTGCAAGACAGGAATGTCAGT$> with no results
How about:
grep TTCTGTGAGTGATTTCCTGCAAGACAGGAATGTCAGT outfile
Just in case there is some non-printing character in there...
Beyond that ... my guess would be that you are either not readingthe file you
think you are, or not writi
> I learned python so that if I were to put in 0.9, it'd decrease red by 10%.>
> The way this function needs to be written, -0.1 decreases red by 10%
It sounds like you have something like ...
def f1(color, redchange=0, bluechange=0, greenchange=0): # some code here to
make the changes ret
> How do I create a small IRC program which can send and receive private
> messages from users?
I created a multiplayer game that can create a standalone
server like a MUD, or communicate over IRC, or both (I think)
acting as a gateway between the two.
It uses Twisted, which some find arcane, b
>>> I have data about zip codes, street and city names (and perhaps later also
>>> of
>>> street numbers). I made a dictionary of the form {zipcode: (street, city)}
>>
>> One dictionary with all of the data?
>>
>> That does not seem like it will work. What happens when
>> 2 addresses have the sam
> I have data about zip codes, street and city names (and perhaps later also of
> street numbers). I made a dictionary of the form {zipcode: (street, city)}
One dictionary with all of the data?
That does not seem like it will work. What happens when
2 addresses have the same zip code?
> Are th
> I know that I can look up the value for a particular key in a
> dictionary, but can I look up the key associated with a particular
> value?
I am using bidict in one of my projects:
http://pypi.python.org/pypi/bidict/0.1.1
It's probably a bit more complex than what I
need, but the parts I am u
> Are there any Python modules to script Blender? For example, placing
> predefined objects into a new Blender project to create a 3D model.
If you are using 2.5, I saw this posted on blendernation.com
just today:
http://blenderartists.org/forum/showthread.php?t=193908
> hey this is a crazy question but i want to know it..
> suppose i have this code
>
> a=raw_input("enter the string :")
> print a
>
> then i type python prog.py
>
> output:
> enter the string:hello
> hello
>
>
> now i want to ask is there's any way that python remembers the input i gave
> it t
> Just out of curiosity does anyone know why you get a deprecation warning if
> you pass a float to range but if you use round, which returns a float, there
> is no warning?
It has nothing to do with the round.
It's just that the warning is only shown once:
$ python
Python 2.6.5 (r265:79063, Ap
>http://www.velocityreviews.com/forums/t343990-xmlrpc-send-file.html
>
>Using this example I get error's about 'expected binary .read(), but got
>instance instead.
I assume you are using this ...
>d = xmlrpclib.Binary(open("C:\\somefile.exe").read())
Are you using windows?
I think you would n
>I subscribed to the pygame-users mailing list through [EMAIL PROTECTED],
>but I don't know where to send the mail too so that everybody can see it.
>
>Any suggestion on how to use that mailing list?
>
http://www.google.com/search?q=pygame+mailing+list
2nd link ...
"""
Pygame maintains an active
Sorry about misposting this here. I always mix up the
tutor@ and edu-sig@ lists. I am just going to follow
up two things that seem tutor related.
If this seems interesting, you may want to join the
edu-sig list for more...
>>More frightening to me than the ubiquitous use of MS Office is the
>>o
>My son is learning something about using a spreadsheet - extremely
>useful and I support it 100%. That he thinks what he is learning is
>Excel is absolutely unforgivable, in terms of my understanding of
>ethical norms that once prevailed in an institute of higher education.
>
I guess it depends
> I've edited the aliens.py example to make my character just move
>back and forth. However I can't make him jump!
It is not really clear to me from your code where you expect the
character to jump. I do not see the word "jump" anywhere. I do
see the word "bounce" and one reference to the to
> > >Is there a command like more(1) or less(1) in python to display
> > >the output of a command (e.g. dir()) one page at a time?
> >
> >
> > How are you using dir() ?
> >
> > Is it in the "DOS Window" ?
> > One option would be to just get a better console.
>
>I am using Python 2.4 on RedHat Linux
>Is there a command like more(1) or less(1) in python to display
>the output of a command (e.g. dir()) one page at a time?
How are you using dir() ?
Is it in the "DOS Window" ?
One option would be to just get a better console.
You also might want to look at something like ipython.
Using that,
>I've been looking at lots of sites and checked out the docs, but can't
>find the info I am looking for to be able to detect audio input from
>my sound card.
You do not say if you need to do this in a cross-platform way.
I thought maybe SDL (which is wrapped by pygame) might help,
but this is cl
how can i get my email address removed, I'm receiving way too many
emails
You have a few options. You may want to see if just turning the Tutor
mailing list setting to "Digest Mode" might help. You can do this
through:
http://mail.python.org/mailman/options/[EMAIL PROTECTED]
Personally, I fi
>At present, the only thing I can think of is to redirect the
>output of 'ifconfig' into a temporary file, then read it back in and use
>Python and regular expressions to try and extract the IP info from that.
That is basically how I do it. See here:
http://mail.python.org/pipermail/python-list/2
>> > I've been using MySQL up this day, but would like to convert my
>> > program to use Postgresql.
>>
>>I'm curious. Why?
>>Is there some advantage to Postgres over MySql?
>
>Postgres behaves a lot like Python in that it'll die early rather than try
>to guess at what the user means. Postgres han
>data = {}
>data['ids_to_process'] = ['1','2','3','5','7','11']
>
>query = '''
>UPDATE my_table
> SET state = 'processed'
> WHERE id IN ARRAY%(ids_to_process)s
>'''
>db.execute(query, data)
>
Sorry. It should look like ...
query = '''
UPDATE my_table
SET state = 'processed
>data = {}
>data['start_date'] = '2005-6-2'
>data['last_name'] = 'Johnson'
>
>query = '''
>SELECT *
> FROM my_table
> WHERE date >= '%(start_date)s'
> AND last_name = '%(last_name)s'
>''' % data
>results = my_database.Execute(query)
First up. This is a "bad idea".
It may be ok
>using autocomplete feature within Eclipse
Are you using pydev?
http://pydev.sourceforge.net/
Their website says:
"""
New Release: 0.9.3!!
Wohooo!! Code completion Rules! Check it out!
"""
So apparently this is something they are actively working on.
You may have an old version, or you may have
>Content-Type: text/html; format=flowed
>
>
[...]
What a mess.
You should to post to the list in plain text.
Someone might take the time to weed through that for your
question, but you will get a lot more help and a lot sooner
if you just configure your mailer to send plain text.
__
stem, or you could use pygame.
>
>Ok drat. I was hoping that it would play the files.
>
>
>
>>--
>>Lee Harr wrote:
>>
>>If you are on windows try the winsound module.
>
>And if I'm on Linux or programing for Mac?
>
>>>What I need to do is validate a date field (better if it's already done)
>>>and
>>>I want to know if anyone knows about a code to do that (a made code,
>>>don't
>>>mean you to do my work). I was hoping to find a calendar combo box as in
>>>Visual Basic DropDown Calendar
>>>
>>>
>>For which GUI s
>What I need to do is validate a date field (better if it's already done)
>and
>I want to know if anyone knows about a code to do that (a made code, don't
>mean you to do my work). I was hoping to find a calendar combo box as in
>Visual Basic DropDown Calendar
For which GUI system?
py-qt has Da
>I can't get:
>
>import wave as w
>
>... to play a .wav music file. I tried w.play() but got an error that
>module has no attribute 'play'.
>What do I use to get it to play?
Strangely... I do not believe the wave module is meant to actually
_play_ a wav file. It looks to me like it is only inte
>>Inconsistent indentation styles are very
>>annoying in
>>other languages, but a fatal problem in Python.
>
>But there is no way to enforce standard settings. When new versions are
>installed or someone just makes a mistake the settings might change and
>you won't know until it's too late...possi
>The idea is to print out a multiplication table on the command line
>with numbers lining up in the ones column. I want to eventually
>emulate programs like top with their spacing. But this code is mostly
>for my amusement. How would you make this work?
>
Try print string formatting using %
>>>p
>import os
os.system("fec=cam`date +%Y%m%d%H%M%S`.jpg")
>0
os.system("echo $fec")
>0
os.system("mv hola.txt grabacion/$fec")
>0
Each system() call gets a fresh shell, and a fresh env ...
>>>import os
>>>os.environ['foo'] = 'bar'
>>>os.system('echo $foo')
bar
0
>>>os.system('foo=zzz')
>Does anyone know of a Web Calendar written in Python?
I believe that SchoolBell is using Zope 3 ...
http://www.schooltool.org/schoolbell
_
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.m
Pickling simply converts an object to a string (unpickling does the
opposite,
convert a string to an object). The dump() function writes the generated
string
directly to a file, but you can use the dumps() function to get the
generated
string as such and do something else with it (e.g. put it in
We are developing a CBT based "Free Software" for our
social activities. We are using PyGTK alongwith Glade.
We want to print a document through Printer and also
we want to provide "Sound" support in our software.
Has somebody worked on PyGTK or Python? We are not
getting the PyGTK API's for sound
I have apparent interference between doctests embedded in the
docstrings of different methods, and this interference also appears to
be influenced by seemingly irrelevant things such as whether the
module has a (non-doctest-containing) docstring or not.
I, and what hair I've not yet torn out, woul
I'm a newbie. My friend asked me for a help. He wanted to backup his files
into multi disks zip file. Is there any possibilities for me to help him
by
using python?
Err... you probably could, but why reinvent the wheel? WinZip?
winzip is not free, and I always found it terribly annoying.
Info-ZI
Hello,
I am looking for a Python-script for Zope which counts
the objects (files) in the current folder and all its subfolders,
but I don't know how to implement this script. Can somebody
help me, please? Or ist there a newsgroup/mailing list which
can help me to find a solution for this problem?
T
I have a python script that runs on my webserver every fifteen minutes. It
has run for several months with absolutely no problems. Suddenly,
yesterday
morning I got an email from cron with an import error for sre_constants
(see
below)
File "/usr/lib/python2.2/sre_compile.py", line 15, in ?
I have heard a lot of really good things about SQLObject:
http://sqlobject.org/
However, that requires a more full-featured database, like postgresql.
According to the docs SQLObject supports SQLite:
http://sqlobject.org/docs/SQLObject.html#requirements
Wups. I even looked at that page before post
Just a quick query. I want to store dates and work with them in my
SQLite database.
There's no specific need for any calculations to done on one side or
another (i.e. it's a single user database).
I googled how to work with dates in SQL, and I got one like this -
SELECT * FROM totp
WHERE wk BETWEEN
Sorry. I sent this yesterday but forgot the subject.
Hope this helps point you in the right direction ...
I attempting to control xfmedia,
http://spuriousinterrupt.org/projects/xfmedia/ , via it's remote from
python and I can not get a connection.
s = socket.fromfd('/tmp/xfmedia_remote.1001.0', s
I attempting to control xfmedia,
http://spuriousinterrupt.org/projects/xfmedia/ , via it's remote from
python and I can not get a connection.
s = socket.fromfd('/tmp/xfmedia_remote.1001.0', socket.AF_UNIX,
socket.SOCK_STREAM)
i get this error
", line 1, in ?
f = open('/tmp/xfmedia_remote.1001.0')
I have two questions. Once a MxN world is generated how would you
search for nearest neighbors (to see who is connected) and then color
Does this help?
import random
PERSON, EMPTY = '*', '.'
def get_threshold():
perc = raw_input("Please enter a thresold between 0-1. ")
perc = float(perc)
I'm trying to communicate between Python and Java and using
os.popen(). But thing dont work...The Java program reads strings from
stdin and the python program just writes to stdout.
-first call the java program using:
handlers = os.popen('java StdIn)
-then:
I'm using tempfile. The doc says it is opened 'w+b' so that it can be
read and written without closing and reopening.
But, for the life of me, I can't find any way to rewind it so I can
read what I wrote.
import tempfile
import os
fd, name = tempfile.mkstemp()
os.write(fd, 'foo')
3
os.lseek(fd, 0
class greating:
# I think the word you are looking for is
# "greeting"
def __init__(self):
self.OK = False
self.lowValue = 1
self.highValue = 6
def opening(self):
print """
Please choose from the following options.
1) - Normal Unit test with sta
Is there a module containing a function for listing the unique k-element
subsets of an n-item list? I have written some code (right now I only
need it for 2 element subsets):
Apparently not, but maybe this will help:
http://www.google.com/search?q=python+recipe+list+combinations
http://aspn.activ
I am not sure if this is the right place, apologies if
not.
http://pygame.org/
http://pygame.org/info.shtml#maillist
Now how can I get this to be on more than one line and
bigger (for my simple game I need a much more detailed explanation).
http://mu.arete.cc/pcr/
http://mu.arete.cc/pcr/proj/text
50 matches
Mail list logo