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, even from the
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 much
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
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
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,
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?
You
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
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
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 to last time and
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, Apr
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 need to
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
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 top of
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 8.0. In xterm
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
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,
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
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:
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'
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 handles bad data
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 now, as long
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 found
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 intended
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...possibly weeks
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 %
print
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')
0
os.system('echo $foo')
bar
0
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!
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
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 and
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,
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.
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?
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
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:
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 static
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
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/
39 matches
Mail list logo