LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-21-2010, 01:04 PM   #1
gary_in_springhill
Member
 
Registered: Mar 2008
Posts: 136

Rep: Reputation: 21
pyqt3 list without comma?


I'm trying to compose a line of numbers each single digit taken from a variable eg: 1010001 each variable digit is either a 0 or 1 made from variable layer1 through 7. I need to add each layer variable to the last to compose the number with no commas or spaces and add it directly after the -p option in the show_command line
I used array and list and the commas mess up the command and inserting "pens" in the show command interpertes it literally instead of the list or array value?? The insert should look something like 1000110

Code:
pens = [layer1,layer2,layer3,layer4,layer5,layer6,layer7]
show_command = 'hp2xx -q -d75 -I -t -c1234567 -pINSERT HERE hpgl-hot-folder/temp.plot'
self.child = Popen(show_command, shell=True)
any ideas?
thanks
 
Old 03-21-2010, 05:05 PM   #2
gary_in_springhill
Member
 
Registered: Mar 2008
Posts: 136

Original Poster
Rep: Reputation: 21
got it

I was making it much harder than it was...

Code:
pens = `layer1`
	pens += `layer2`
	pens += `layer3`
	pens += `layer4`
	pens += `layer5`
	pens += `layer6`
	pens += `layer7`
	show_command = 'hp2xx -q -d75 -I -t -c1234567 -p'+(pens)+' hpgl-hot-folder/temp.plot'
	self.child = Popen(show_command, shell=True)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pyqt3 readline question gary_in_springhill Programming 2 03-09-2010 05:49 PM
[SOLVED] pyqt3 in slackware 13 Quercus ruber Slackware 8 01-12-2010 02:16 PM
How to delete Comma in a comma separated file with double quotes as quote character pklcnu Linux - Newbie 2 03-24-2009 05:50 PM
sorting a list into comma separated list nixlearn Linux - Newbie 22 12-03-2008 06:21 AM
bash syntax: looping through a comma-separated list David the H. Linux - General 10 09-06-2007 10:23 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration